1

If a router receives a packet whose IP destination address is not in its routing table, I believe it will send it to its default port.

Suppose that we erase that entry from the table. Now, I think that the router will send an ARP request in order to find where to forward it. I have two questions regarding this process:

  • If there is no ARP response (i.e. there is no route from the router to the destination address), will it discard it and send an ICMP message to the origin stating that the destination was unreachable?
  • Will in any case a router discard a packet just because the destination address is not in its routing table (assuming there is no 'default' entry)? Or will it always check if it is possible to reach the destination via ARP requests?
5

ARP is a LAN protocol that resolves a layer-3 to a layer-2 address. A router, like any host will use ARP for a host that is on a LAN to which it is directly connected.

Routers will look at the destination address on a packet, and try to find a match in its routing table. If it cannot find a match it will drop the packet and send an ICMP message to the source to tell it that is has no route to the destination network.

The default IPv4 network, 0.0.0.0/0, or default IPv6 network, ::/0, encompasses every IP address for the protocol, and every address for the protocol will match a route to the default network. Having a default route in the routing table prevents the router from dropping packets with unknown destinations.

  • Thanks for your answer! One last question. From your answer I understand that routers use ARP just to check if the host is directly connected to it. Does this mean that routers do not use ARP to find direct connections with other routers? I mean, if some host A wants to send a packet to host B, and there are two hops between them, the first router doesn't use ARP to find the MAC address of the second one, does it? – Tendero Feb 18 '18 at 22:26
  • ARP is a LAN protocol. It does nothing for devices on separate LANs. If a host is on a different LAN, the sending host uses ARP to find the layer-2 address of its configured gateway (router). The layer-2 frame would then be addresses to its gateway, but the layer-3 packet would be addressed to the destination host. – Ron Maupin Feb 18 '18 at 22:29
  • @Tendero, routers strip off the layer-2 frame, losing the original layer-2 addresses. A router will create a new frame for the next link. On a LAN, you usually use layer-2 protocols that use MAC addresses, but not all layer-2 protocols, especially WAN protocols, do. Some use other addressing (DLCIs for frame relay, or VPI/VCI for ATM), and some use no addressing (PPP only has two possible endpoints, so it doesn't need addressing). ARP resolves the layer-3 to a layer-2 address for protocols where it is necessary. – Ron Maupin Feb 18 '18 at 22:33
  • 1
    @tendero "that routers use ARP just to check if the host is directly connected to it" No. Routers (and hosts) check their routing table to find if they have a direct connection to the destination. ARP is necessary to make use of this direct connection or the direct connection to the next routing hop when Ethernet or another MAC-based L2 is used. – Zac67 Mar 2 '18 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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