2

Say a source sends a packet to its destination via router A and router B.

In the forwarding table of router A, it will only have the mapping between the IP address of destination and that of one of its own interfaces (egress interface). We do not know the IP address of ingress interface of B.

Given the fact that ARP must know an IP in its own subnet before it translate IP address to MAC address, how Link Layer at egress interface of A will be able to look up the MAC (or equivalent) address of the ingress interface of B?

  • I don't really understand what you are doing and need more information, f. e. how looks your routing table and how are the routers A and B are connected? – Winnie Tigger Jun 8 '18 at 9:52
  • Don't make the mistake of assuming all layer-2 protocols use MAC addresses. Many routers use protocols (PPP, ATM, frame relay, etc.) that do not use MAC addresses. The IEEE LAN protocols use MAC addressing, but other protocols will use something else, or nothing at all, for addressing. ARP is specific to IPv4 and IEEE LAN protocols. – Ron Maupin Jun 8 '18 at 14:27
1

When you set Router Interface as next hop for a Network, the router assumes that the Network is directly connected to that Interface. In your example, Router A will assume that the Network is directly connected to Egress interface, there is no concept of Router B. It will send out ARP requests for each destination, and when it receives a response back, it will forward the packet out based on the response it gets back.

Now, how does that work. Router B needs to be configured to supportProxy ARP. It will respond to ARP requests from Router A, and will reply back with the MAC address of its ingress interface.

  • Or maybe the link between A and B is a p2p link that does not use ARP. – hertitu Jun 20 '18 at 22:58
2
  • Each routing table entry needs to hold at least the destination (subnet) and the next hop's IP address for multi-point interfaces.
  • For point-to-point interfaces (most often tunnels) the table entry needs to have the destination (subnet) and the interface.
  • Each multi-point interface needs to know its own IP address and the network mask (=the local scope).
  • Point-to-point interfaces might not have an IP address. Any transmitted packet is just received on the other side.
  • a next hop's MAC address (where applicable) is resolved through ARP and cached in the local ARP table, usually separate from the routing table

If router B is not adjacent to the source it has no meaning, neither its IP address nor its MAC address. Source sends to router A (possibly its default gateway), router A consults its own routing table and forwards to router B which then forwards to destination.

The link layer (broadcast domain) is usually equivalent to the IP subnet. Accordingly, the link layer shared by source and router A ends at router A. Between router A and router B there is another link layer, and a third between router B and destination.

  • thanks, could you link some doc of your first point? My understanding is all route tables only have the destination's IP and egress IP. It seems to me that my understanding is not always right – Flowing Cloud Jun 11 '18 at 21:28
  • Check WP if you believe them. ;-) A local route print will also show you next-hop entries. – Zac67 Jun 12 '18 at 11:07

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.