Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 
Community Member

basic routing question

iam a ccna student

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

while a ping command is enterd

thanks in advance

Hall of Fame Super Blue

Re: basic routing question


PC1 ( -> ( R1 ( -> ( R2 ( -> ( PC2

PC1 has default-gateway of

PC2 has default-gateway of

R1 has static route "ip route"

R2 has static route "ip route"

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 is entered on PC1

2) PC1 compares address with it's own subnet mask which is and this

results in a network of

3) PC1 knows that it is on the network because it compares it's own address with it's

own subnet mask of This results in network 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

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 = / Destination IP =

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 It is not

a directly connected network so it consults it's routing table and finds a route to pointing to (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. ->

10) R2 receives the packet and examines the destination network. It realises that 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 = / Destination IP =

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.


Community Member

Re: basic routing question

thanks a lot , is there any diffrence when telnet is done instead of ping

Hall of Fame Super Blue

Re: basic routing question


No difference, what i described is the same for all TCP/IP communication.


Community Member

Re: basic routing question

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 wants to communicate with PC B with the subnet of 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.

Hope I've answered your question...

CreatePlease to create content