PDA

View Full Version : Try this


learn25
10-31-2007, 02:30 AM
This is a pretty interesting one. Just for fun. hehe :)

Suppose this scenario

PC------R1--------R2

-No routing protocol is configured
-No static route is configured either
-Interfaces are configured with the right IP and correct mask and the interfaces are up.
-PC one got configured the correct IP default gateway


Questions

a)Will the ICMP packege reach R2 from PC if you try pinging it? why?
b)Will PC get any echo reply from R2 when you ping it from PC? why?

avinash
10-31-2007, 06:52 AM
Dear Friend(s).

a)Will the ICMP packege reach R2 from PC if you try pinging it? why?

ANS) Yes it will reach R2, as R1 knows the network configured on its serial interface and it will route the packet to R2.

R2#debug ip icmp (this will show that R2 is receiving ICMP echo request)

b)Will PC get any echo reply from R2 when you ping it from PC? why?

ANS) PC will not get the reply back instead you'll get "Request timed out".

To send ICMP echo reply to PC's network, R2 must have the network (PC's) in its routing table (this can be achieved only by Static/Default/Dynamic Routing).

I Hope this clarifies.

A.

PS: E&OE

avinash
11-08-2007, 01:42 AM
Dear Mr Lammle,

Sorry, I am a bit confused about an ICMP destination unreachable message.

The Routers routing table will have the entry for the directly connected Networks (As per table below). So don't you think Router 1 will be able to route a packet to Router 2's IP 192.168.20.2. Since Router 2 doesn't have any entry for Network 192.168.10.0/24 it will not be able to route a packet back to PC's IP 192.168.10.2 hence Request Timed Out will be displayed on PC.

PC--Router1---Router2

PC's- IP Address : 192.168.10.2/24 Default Gateway : 192.168.10.1
Router1- Fa0/0 - 192.168.10.1/24
Router1- Serial0/0- 192.168.20.1/24
Router2- Serial0/0- 192.168.20.2/24

Router1#Sh ip route

C 192.168.10.0/24 Directly connected F0/0
C 192.168.20.0/24 Directly connected S0/0

Router2#Sh ip route

C 192.168.20.0/24 Directly connected S0/0


Best Regards,

A.

aguilera
11-13-2007, 09:52 AM
avinash, you are correct!

You may pass go. You may collect $200.

The PC will send data to it's default gateway and let the router deal with it.

R1 cracks open the frame, looks at the packet destination and checks to see if that destination network is in it's (R1's) routing table.

If the destination network is in R1's routing table then R1 will hand that packet off to the interface listed in the routing table.

Once the interface gets the packet it encapsulates it and pushes it out.

Now R2 gets the frame, cracks it open, looks at the destination network and checks if that destination network is in it's routing table and if so hands it off to the interface listed in it's routing table.

All is good until .... now. Why well now is when the routers interface needs to respond to the sender (PC in a network that is not in R2's routing table.)

avinash did a great job explaining what would happen in the answers avinash provided.

Thanks again avinash!

ciao,
D. Aguilera

vinchez
02-01-2010, 05:58 AM
Gr8 learn25, avinash & aguilera, same question stuck my mind & I was struggling to justify it myself for that matter.

Alright, one more thing can anybody tell me, where the Host/PC will receive ICMP echo repy ' Request Time Out' from???
I think it should be from the router R1 only, because Router R2 has'nt got any means to decide where to send echo reply. Please correct if I'm wrong!!!
:p

Pramod.purohit
02-01-2010, 02:57 PM
confusing!!!

if I ping R2 serial interface from PC I get request time out but at the same time if I on icmp debuging on R2 it says

ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2

10.0.0.2 is the ip address of R2's serial interface and 20.0.0.2 is the ip of host.

I tried it on PT it can be differ on real equipements. But if R2 is sending echo reply then why PC is not getting???

it can be possible that after generating echo reply packet R2 would be looking in its routing table for a route to network 20.0.0.2.



Then PC is getting request time out neither from R1 nor from R2. the TTL time of icmp packet expires then only request time out message comes.

please correct me if I am wrong

vinchez
02-04-2010, 12:27 AM
confusing!!!

if I ping R2 serial interface from PC I get request time out but at the same time if I on icmp debuging on R2 it says

ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2
ICMP: echo reply sent, src 10.0.0.2, dst 20.0.0.2

10.0.0.2 is the ip address of R2's serial interface and 20.0.0.2 is the ip of host.

I tried it on PT it can be differ on real equipements. But if R2 is sending echo reply then why PC is not getting???

it can be possible that after generating echo reply packet R2 would be looking in its routing table for a route to network 20.0.0.2.



Then PC is getting request time out neither from R1 nor from R2. the TTL time of icmp packet expires then only request time out message comes.

please correct me if I am wrong




I've also tried hands on PT5.0 the same thing, by turning on debug ip icmp on R2. Though R2 does synthesize packet with ICMP echo reply, it doesn't hv any routes for host's network. I think RTO msgs ain't generated on its own, but it's a layer-3 activity. Because of ICMP packet itself may get dropped at R2 only, R1, by no means, is to receive echo reply packets frm R2. So in this case, echo reply is originated at R1 only as a layer-3 device.