I'm trying to understand how the use of switches and routers in the same network work. This is related to this other question of mine.
Suppose we have this network (I know this may not be a realistic scenario, but I think it's useful for didactic purposes):
'Subred' states for 'Subnet' in Spanish. r1 and r2 are routers. sw1 and sw2 are switches.
Suppose that from pc1 we want to send a ping to pc5. I don't know if Sw2 will take part in this process or not. If there were no switches, the procedure would be the usual: ARP request from pc1 looking for its default gateway, ARP response the other way around, Echo request with destination 126.96.36.199, r1 performs ARP request looking for r2, etc., etc., etc.
But with the switch Sw2 there, I get confused big time. My questions are:
- Would pc1 and pc5 be able to communicate directly, as they are in the same layer-2 network (but different layer-3)?
- Would it be possible for the hosts to communicate if all routers were replaced by switches? There would be full layer-2 connection, but none layer-3 connection. I don't know how would the network be in that case.
- In this case, if the switches were all replaced by routers, wouldn't the network stay the same? I mean, no connection between hosts would be lost... So, could we just use all routers and expect the network to behave the same way?