i have a doubt its basic ,answer is very simple to the masters , two routers r connected serially point to point , one pc is attached to each routers ethernet interface , the pc r in differnt network , i want to know the step by step process that takes place in communicating between pc's of differnt network throught the routers ,consider a static route is configured in the routers to achieve two way communications
R1 has static route "ip route 192.168.6.0 255.255.255.0 192.168.10.2"
R2 has static route "ip route 192.168.5.0 255.255.255.0 192.168.10.1"
Lets also assume that all the arp caches on the PC's are empty and that PC1 pings PC2 on it's
IP address and not it's name.
1) Ping 192.168.6.2 is entered on PC1
2) PC1 compares 192.168.6.2 address with it's own subnet mask which is 255.255.255.0 and this
results in a network of 192.168.6.0.
3) PC1 knows that it is on the network 192.168.5.0 because it compares it's own address with it's
own subnet mask of 255.255.255.0. This results in network 192.168.5.0. So PC1 now knows that PC2
is on a different network.
4) PC1 looks in it's routing table and because it only has a default-gateway entry of 192.168.5.1
this is the next hop destination to the send the packet.
5) On the same ethernet subnet a mac-address is needed to send from one machine to another. PC1 arps out for
the mac-address of R1's ethernet interface.
6) R1 responds with it's mac-address for it's ethernet interface.
7) PC1 puts the packet into the wire. Source IP = 192.168.5.2 / Destination IP = 192.168.6.2
Source Mac address = PC1's NIC mac-address / Destination Mac address = R1's ethernet interface mac-address
8) R1 receives packet. R1 now looks at the destination IP address of the packet which is 192.168.6.2. It is not
a directly connected network so it consults it's routing table and finds a route to 192.168.6.0/24 pointing to
192.168.10.2 (R2's serial interface).
9) R1 using either HDLC or PPP encapsulates the packet and sends it to R2. The source IP and destination IP
address in the packet have not changed ie. 192.168.5.2 -> 192.168.6.2
10) R2 receives the packet and examines the destination network. It realises that 192.168.6.2 is on a directly
connected interface. It now needs the mac-address of PC2. So it arps out for the mac-address. PC2 sends a packet
back to R2 with it's mac-address.
11) R2 sends the packet to PC2. Source IP = 192.168.5.2 / Destination IP = 192.168.6.2
Source Mac address = R2's ethernet interface / Destination Mac address = PC2's mac-address.
The return packet is handled with the same logic. The only difference is because PC1 and R1 exchanged arp messages and PC2 and R2 exchanged arp messages when the return packet is sent there is no need to redo the arps.
Key thing to note is that throughout it's journey the src and dst IP address in the packet never changed (assuming there is no NAT going on). What does change at every L3 hop is the physical media address.
Ok...Lets define names for the PCs and Routers to follow the same naming convention. Lets say that on one side is PC A connecting to Router A and on the other side is PC B connecting to Router B. Now lets assume that PC A with an IP address of the subnet 10.0.0.0 wants to communicate with PC B with the subnet of 192.168.0.0. When PC A launches a ping command an ARP (address resolution protocol) packet is generated asking all the machines on the local network if the desired IP address matches the address on their NIC card. If so the machines reply with their mac address. But in our case the router replies with its ethernet interface's Mac address because only it knows the 192.168 network. So PC A sends the ping packets to the router ethernet interface. Once the router receives the packet it first removes the layer 2 frame to extract the routing information and find out that this packet is destined to 192.168 network. It then matches this network entry among the list of routing entries in its routing table. Finding a match it sends the packets to the outbound interface that was listed in the routing table. On the serial link interface the packet is encapsulated by PPP or HDLC information which is removed once the packet is reached at the other end. Router B similarly try to find the network in its routing table and therefore forwards the traffic to the ethernet interface. The ethernet interface generates an arp request asking for the mac address of PC B. Finally, when PC B replies its mac address the router creates a layer 2 frame with destination mac address and IP address of PC B and send it out on the ethernet network.
This is how the communication will be carried over in your defined scenario.
Hi everyone, I would like to thank you in advance for any help you can provide a newcomer like myself!
Im studying the 100-105 book by Odom and am currently on the topic of Port security. I purchased a used 2960 and I'm trying to follow a...
While deploying a number of 18xx/2802/3802 model access points (APs), which run AP-COS as their operating platform. It can be observed on some occasions that while many of their access points were able to join the fabric WLC withou...
I am going to design and build an LAN network under a tunnel underground with long distance between the switches.
I will have 2 Catalyst switches and 8 Industrial IE3000, and they will be connected with fiber.
For now I am planning on use Layer-2 s...