Concepts / Switches

Switches

Broadcast domain

Also called broadcast, layer 2 network, LAN

The set of devices a broadcast reaches: one network at the link layer.

The problem

Some questions, like ARP's "who has this IP address?", must reach every device on the network at once.

  1. Alice wants carol's MAC, so she sends an ARP request to ff:ff:ff:ff:ff:ff, the broadcast address.
  2. A switch always floods a broadcast: out of every port but the one it came in on.
  3. Bob and carol both get it; only carol, who has 10.0.1.12, answers.
  4. Everyone a broadcast reaches is one broadcast domain: here, everything on officeSwitch.
Hub, switch, router: who hears what
Hub, switch, router: who hears what

A switch still floods a broadcast out of every port; a router does not forward it, so each network behind a router is its own broadcast domain.

What you'd see

$ tcpdump -e -nn -i eth0 arp
18:49:23.292092 b6:a0:12:30:a8:0b > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 10.0.1.12 (ff:ff:ff:ff:ff:ff) tell 10.0.1.10, length 28
  • Recorded on bob while alice looked for carol.
  • > ff:ff:ff:ff:ff:ff: the frame is for everyone, so bob's card takes it although the question is not his.
  • who-has 10.0.1.12 … tell 10.0.1.10: alice asks for carol's MAC.

Guess first

A router joins officeSwitch to a second network. Does alice's broadcast reach the devices over there?

Show answer

No. Routers do not forward broadcasts, so each network behind a router is its own broadcast domain. VLANs split one switch the same way.

In short

ARP requests and DHCP discovers are broadcasts (to ff:ff:ff:ff:ff:ff), heard by every device in the domain. Routers do not forward broadcasts, so each network behind a router is its own domain. VLANs split one switch into several.

See it on real machines

Read next

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Sign in with Google or email to start.

Start this lab