Cross-Over Cable Communication – Why Hosts in Different Networks Can’t Connect

ethernetlayer1layer3packet-tracerping

Let us say, i have two computers (hosts) A and B. Where A has been assigned an IP address of 192.168.1.10/24 and host B has been assigned an IP address of 192.168.2.11/24.
And both of them has been connected to each other over a Ethernet cross-over cable.

Now I see that both the computers can't communicate with each other! Ping fails from either sides. I am simulating this using Cisco Packet Tracer.

Could someone explain why there is a problem here? Why can't two hosts communicate here?


To give more clarity to the question i am adding the visualization.

enter image description here

Default gateway address is set to 192.168.1.1 and 192.168.2.1 respectively on host A and host B


PS: After seeing lot of answer my fellow community members' response, i would like to make it clear that – I understand placing a router between the 2 hosts would make it work. However I was looking for a technical reason why the networked system with the above mentioned topology fail to work! I was looking at what are all the protocol that are triggered in this scenario for the communication between the hosts A and B and which protocol would fail and for what reason.

Best Answer

A host knows if the destination address is on a different network (the same way that you do, by masking the host and destination addresses with the host mask). If the destination is on the same network, then it will send the layer-3 packet in a layer-2 frame directly to the destination, otherwise it will send the layer-3 packet in a layer-2 frame directly to its router. Routers are what route packets between networks. For a host on one network to reach a host on a different network requires a router to route the packets between networks.

A router will look at the destination layer-3 address, and it will look in its routing table to see if it has a path to the destination network. If it does not, it drops the packet, otherwise, it forwards the packet out the interface toward the destination.

Related Topic