- Bronze, 100 points or more
Hi every body!
My book shows the following code:
! echo reply received.
N network unreachable
U destination unreachable
M can not fragment the packet
? unknown packet received.
Who sends these codes? the destination machine or the router connected to destination machine?
let say i ping h3(18.104.22.168) from R1. Assume the host H3 is not powered on, so R2 interface connected to H3 is down as well. Since R2 has no path/route for 22.214.171.124 as the int is down, R3 will send the reply with code " U" to source(R1). In this case the last router(R2) not the intended destination (H3) sent the reply with code " u".
The replies with codes " N,U,M " are sent by routers not hosts( e.g win xp).
Thanks a lot and have a nice day!
Please take a look at this URL:
The router will know about the existence of H2.
R would have an ip address associated to a mac-address on its arp table (same segment). If that information is missing from the arp table is the R's job to reply to any request as R is the last hop routing device.
R will send the ICMP information back to the source.
R holds the subnet for 126.96.36.199/8 but on this example, H2 is not a router so from R to H2 is a simply Layer2 connection. H2 is not providing any routing information to R and viceversa.
If you change your scenario and have H2 as a router, the answer would be different.
The reason 'R' is able to send back 'u' code to h1 is due to having h2 on its routing table.
On a typical environment, if h2 was a subnet announced on 'R' and h2 is turned off, the subnet would disappear. Again the answer depend upon what 'R' knows.
If 'R' has reachability information towards h2, it thinks it could get there but in reality it doesn't. In addition, 'R' is still announcing 'h2' as a reachable network thru him so when the packet comes to 'R', it's 'R' job to tell everyone, that it can't reach that network hence 'u' packet.
You would see this kind of behavior on FW environment, where the route is on the routing table but devices are unable to reach it due to FW rules.
Hope this is clear enough and if it isn't I suggest labbing it up :)
If 'R' has a route to h2 and h2 isn't replying to ping packets, on 'R' device the message will be 'request time-out' but 'R' will inform any device that uses 'R' as transit that the destination is unreachable.
The reason 'R' has to reply with an ICMP 'Destination Unreachable' is that 'R' is still drawing traffic for that destination. If 'R' had no routes towards that destination, then all adjacent devices would timeout on their own.
! is sent by the destination
N can be sent by any router in the path
U same as N
M same as N but also can be sent by the destination.
? same as N but also can be sent by the destination.