0

Looking back at some notes i've been making while going along trying to learn for ICND1 (still very early days), I have this question which I found while trying to quiz myself

"If a router doesn’t know where to send data what 2 options does the router have?"

So my first response would be for it to sent an ARP request across that broadcast domain.

I'm thinking the second option may be to check the routing table for the next router, and then if no idea from that go to the gateway of last resort?

Or would it be to simply reject the data?

1 Answer 1

3

A router only sends an ARP request for the next hop or if the destination is located on a locally connected subnet. ARP uses a limited broadcast that cannot cross another router.

A router forwards packets based on its routing table. Entries in the routing table are populated by either

  • a subnet is directly connected to the router
  • an entry is configured statically by the admin
  • an entry is learned by a routing protocol

If a router doesn't know where to route a packet (ie. it has no route to the destination) it drops the packet. It is supposed to return an ICMP Destination network unreachable to the source but not all routers do that.

The gateway of last resort is the gateway of the default route entry - the default route 0.0.0.0/0 fits all destinations, ie. the router will never drop a packet lacking a route if a default route is set.

5
  • Aah thank you, so if it doesnt know where to send it to, then if its within the range of the locally connected subnet, to send an ARP, and if not then drops the packet (maybe with the ICMP Destination Unreachable message). I guess there may be some interpretation in the question itself of "doesn't know where to send the data" ie has it already established that its not within its own subnet
    – Feverdog
    Feb 3, 2019 at 16:33
  • "if it doesnt know where to send it to, then if its within the range of the locally connected subnet" @Feverdog, if the destination network is directly connected to the router, then the router knows where to send it. Directly connected networks are automatically placed in the routing table, routers route packets based on the routing table. The destination address on the packet must match a network in the routing table (meaning the router knows where to send it), or if there is no routing table match, the router drops the packet (because it doesn't know where to send it).
    – Ron Maupin
    Feb 3, 2019 at 16:48
  • Thanks Ron - so basically it seems to be an invalid question - as there's only one thing it can do, which is to drop the packet
    – Feverdog
    Feb 3, 2019 at 17:12
  • @Feverdog, yes, routing is deterministic. If a router has no destination, it simply drops the packet. In networking, the earlier a packet is dropped, the better, because the upper-layer protocols will learn sooner that data is lost and can send replacement data sooner.
    – Ron Maupin
    Feb 4, 2019 at 3:53
  • ... and you don't waste bandwidth on the rest of the path. ;-)
    – Zac67
    Feb 4, 2019 at 7:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.