Router Functions – Dividing LANs and Subnets

arplanlayer2layer3router

The figure below is part of a networking homework question.
enter image description here

The question asks about the source/destination IP and MAC addresses of frames sent throughout the system. My question doesn't touch on that directly, rather I want to better understand the effect router one (R1 in the diagram) has on the system. Does R1 split the system into two separate LANs, or a single LAN with two subnets? I'm asking because I think the answer will impact the extent to which ARP messages are propagated throughout the system. If R1 split the system into two separate LANs, I think R1 would block ARP messages from one LAN from entering the other LAN. If we're dealing with the same LAN with two subnets, I'm not so sure.

Best Answer

ARP requests are broadcast, and broadcasts are bounded by layer-3 devices, such as routers. Frames are layer-2 PDUs, and are also bounded by routers. Routers will strip off the layer-2 frame header before forwarding the layer-3 packet, which is the payload of the layer-2 frame. Hence, layer-2 frame addresses are only relevant or seen in the layer-2 LAN.

MAC addresses are the layer-2 frame addresses of some layer-2 LAN protocols (IEEE LAN protocols, such as ethernet, Wi-Fi, token ring, etc.). Some layer-2 protocols use 48-bit MAC addresses, some use 64-bit MAC addresses, some use something else, and some use nothing at all for addressing.

Layer-3 addresses, such as IPv4 or IPv6 addresses, are used to move layer-3 packets between different layer-3 networks. In almost all cases, each layer-2 LAN will use a different layer-3 network. There are corner cases where this may not be true, but they are special and have nothing to do with what you are studying.

Layer-2 addresses are used to deliver directly from one host to another host on the layer-2 LAN. ARP (Address Resolution Protocol) is used to resolve a layer-2 address from a layer-3 address so that the packet can be encapsulated in a layer-2 frame. For hosts on the same layer-2 LAN, there will be a one-to-one correspondence between the layer-3 address and the layer-2 address. If the destination layer-3 address is on a different layer-3 network, the host will use ARP to get the layer-2 address of its configured gateway (the host that knows how to reach other networks, usually a router), and the layer-3 packet is encapsulated in a layer-2 frame with the layer-2 address of the gateway, even though the layer-3 address is for a different host on a different network.

The gateway will strip off the layer-2 frame, inspect the layer-3 destination address, make a decision on which interface to forward the layer-3 packet, and create a new layer-2 frame for the packet on the new interface.