Router – How Router Knows MAC Address of Next Hop with Only Egress Interface in Forwarding Table

mac address

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?

Best Answer

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.