3

If you have the destination MAC address you need in your ARP cache, surely it shouldn't have to go through the router? Or is that the point - only the router can be sure to have all of its subnet's MAC addresses?

As a follow up: do computers on the same subnet ever regularly talk to each other without going through a router? Which protocols, if any, would do that?

0

By definition, frames (what you have is a broadcast MAC address which goes on an ethernet frame, not an IP packet which uses a broadcast IP address) do not cross a layer-3 boundary. A router will strip off a layer-2 frame before forwarding the layer-3 packet encapsulated in the layer-2 frame. The router will create a new layer-2 frame with which to encapsulate the layer-3 packet for the next hop. Layer-2 broadcasts are not forwarded across a layer-3 boundary; neither are layer-3 broadcasts, except in special cases.

MAC addresses are only significant on the layer-2 domain because they are only needed for the layer-2 frame. A router will have an ARP cache for each ethernet interface which it has, just as a PC would have an ARP cache for each ethernet interface which it has. Neither a PC nor a router is sure to have all the MAC addresses for every device in the layer-2 domain.

Routers are only needed when a host needs to communicate with a host on a different layer-3 network. Any host can communicate with any other host on the same layer-2 network (there are some corner cases like Private VLANs where this may not be true) without going through a router.

  • Okay, so let's say I'm 192.168.0.1 and I'm ARPing 192.168.0.2. Would .0.2 pick up the broadcast straight from .0.1 without any other hops? I'm really just trying to understand how layer 2 broadcast traffic works. – Hugh Mulligan Jan 21 '16 at 23:46
  • There are no other hops on the same layer-2 domain; every host is on the same LAN. Hops are layer-3 (routers). Hubs will repeat every layer-2 frame out every hub port, and switches will flood the broadcasts, multicasts, and unknown unicasts out every switch port. Every host on the layer-2 domain will see a broadcast like ARP, interrupt what it is doing, and process it to see if it needs to do something with the broadcast. – Ron Maupin Jan 22 '16 at 0:01
  • Ah, so hubs and switches are responsible for every device in a LAN receiving those frames? By the sound of it, a sender will dispatch just one ff:ff:ff:ff:ff:ff frame to its hub and then the hub will relay this to all other ports. – Hugh Mulligan Jan 22 '16 at 0:55
  • Yes. Hubs are layer-1 devices which are basically the same thing as a cable, so everything connected to a hub is in the same collision and broadcast domains. Switches are layer-2 devices which divide layer-2 into collision domains, but do nothing to the layer-2 frames so they are all still on the same broadcast domain. Every host in the same layer-2 broadcast domain will receive all broadcasts in the broadcast domain. Routers are layer-3 devices which break up layer-2 broadcast domains since they will not forward broadcasts. – Ron Maupin Jan 22 '16 at 0:59
  • Gotcha. And I assume that using a wireless connection changes nothing because it's still a layer-1 medium. Likewise, two devices can directly talk to each other without a hub/switch when not broadcasting, just as they could if they had an Ethernet cable connecting them. Thanks for your help. You've made this so much clearer and I know where to turn my attention to next. – Hugh Mulligan Jan 22 '16 at 1:14
3

Routers interconnect layer-3 networks (i.e. IPv4, IPv6, ...) while MAC and ARP (specifically, ethernet) are layer-2 concepts. A router is not necessary for ethernet to function, or machines within the same layer-2 network to talk to each other.

Yes, computers within the same subnet talk to each other all the time.

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.