What Happens to Router’s MAC Address Once Packet is Forwarded?

framemac addressnetworkingppprouter

What happens with link layer LAN Ethernet header data once the once the frame reaches the main home router and is forwarded to the first network core router?

Routers are network layer devices and forward based on the IP destination address. Local network switches forward based on MAC address in frame headers. To get the frame to the home router, router MAC address is placed in frame header originating at the host, but getting the frame from home router to the next one in WAN, the MAC address plays no role, since this is done based on IP.

So, what happens with MAC address once the frame reaches the home router and is forward to the next one? Is is deleted? Are there protocols to discover the MAC address of the next router (like ARP in the local network); is MAC address of the next router even needed?

Best Answer

When a packet crosses a subnet boundary (e.g. by reaching a LAN's router), the MAC address is discarded because it means absolutely nothing outside of the subnet in which it originated. It is not possible to recover the MAC address of somebody else's machine if your only method of getting to them involves a router. (The original MAC address is not transmitted to the next hop.) The Layer 3 data, which is the payload of the Layer 2 packet, needs to be repackaged.

When the router needs to send the packet to the next router in the chain, what happens depends on the Layer 2 protocol. If Ethernet is still being used, there will be some MAC address in the sent packets. (You could build routers that communicate with each other over serial ports.) It is theoretically possible to avoid using ARP even with Ethernet, since routing tables could map destination IP addresses to physical ports, removing the switch-like functionality of mapping MAC addresses to those ports. Nevertheless, there is still a field for a MAC address in all Ethernet packets.

Related Question