Skip to content

Unicast, broadcast, and flooding

Module
Ethernet and Local Delivery
Difficulty
Easy
Updated
Tested on
Ubuntu 24.04.5 LTS, netlab 1.0, GNU Bash 5.2.21, tcpdump 4.99.4
Prerequisites
On this page

If the switch does not know where phone is, it cannot choose phone’s cable from its table. Does the frame stop there? You will compare three deliveries while phone listens. The destination address stays separate from the switch’s knowledge about that destination.

Finish How switches learn. Use two VM terminals. Terminal 1 starts at the VM prompt; terminal 2 enters laptop. Before each case, leave machine shells and run netlab reset from the VM terminal. Keep modes off. Do not carry a learned table from one case into another.

Keep the same listener in all three cases. arp or icmp keeps frames asking who has an address as well as ping traffic. Here arp selects those address questions and answers; Reaching Another Device explains them. The word or keeps either kind. Keep -n for numeric addresses and -e for link headers. Stop with Ctrl+C after terminal 2 finishes.

First send a ping from laptop to router. Read the table from the VM: laptop and router are learned. Only then enter phone and start its listener. The second ping uses the learned destination.

Predict whether phone will see that second echo request.

Listen with a learned destination
learner@rootvolt:~$ netlab shell laptop -- ping -c 1 10.77.10.1[sudo] password for learner: PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data.
64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.349 ms

--- 10.77.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.349/0.349/0.349/0.000 mslearner@rootvolt:~$ netlab shell sw-home -- bridge fdb show br sw-home dynamic02:77:10:00:00:10 dev laptop master sw-home 
02:77:10:00:00:01 dev router master sw-home learner@rootvolt:~$ netlab shell phonelearner@phone:~$ sudo tcpdump -i eth0 -n -e arp or icmp[sudo] password for learner: tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes^C0 packets captured
0 packets received by filter
0 packets dropped by kernellearner@phone:~$ exitlogoutlearner@rootvolt:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Terminal 1 prepares the table before entering phone and listening.
Steps (23)
  1. Type netlab shell laptop -- ping -c 1 10.77.10.1
  2. Press Enter
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter
  6. Output: PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data. 64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.349 ms --- 10.77.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.349/0.349/0.349/0.000 ms
  7. Type netlab shell sw-home -- bridge fdb show br sw-home dynamic
  8. Press Enter
  9. Output: 02:77:10:00:00:10 dev laptop master sw-home 02:77:10:00:00:01 dev router master sw-home
  10. Type netlab shell phone
  11. Press Enter
  12. Type sudo tcpdump -i eth0 -n -e arp or icmp
  13. Press Enter
  14. Output: [sudo] password for learner:
  15. Type the password (the terminal shows nothing)
  16. Press Enter
  17. Output: tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
  18. Terminal 2 on laptop finished sending. Return to terminal 1.
  19. Press Ctrl + C
  20. Output: 0 packets captured 0 packets received by filter 0 packets dropped by kernel
  21. Type exit
  22. Press Enter
  23. Output: logout
Send from terminal 2 on laptop
learner@laptop:~$ ping -c 1 10.77.10.1PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data.
64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.075 ms

--- 10.77.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.075/0.075/0.075/0.000 mslearner@laptop:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Terminal 2 on laptop pings router again while phone listens.
Steps (3)
  1. Type ping -c 1 10.77.10.1
  2. Press Enter
  3. Output: PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data. 64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.075 ms --- 10.77.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.075/0.075/0.075/0.000 ms
Check your answer

Phone’s listener reports zero captured frames. The switch sends the request through its router port. Router’s reply uses the laptop port. Neither frame needs phone’s cable.

A unicast frame names one destination interface. When that destination is learned, the switch can send it through the matching port. This is the delivery that made phone’s earlier web capture quiet.

Repeat the setup, then wait for aging as in the previous lesson. sleep 310 leaves the VM idle for slightly longer than the 300-second aging time. Read the empty table before starting phone’s listener. Laptop still remembers router’s address in this run, so it sends directly to router’s MAC address.

Predict: does phone act on a flooded frame that is not addressed to it?

Wait for aging, then listen for a flooded frame
learner@rootvolt:~$ netlab shell laptop -- ping -c 1 10.77.10.1[sudo] password for learner: PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data.
64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.488 ms

--- 10.77.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.488/0.488/0.488/0.000 mslearner@rootvolt:~$ netlab shell sw-home -- bridge fdb show br sw-home dynamic02:77:10:00:00:10 dev laptop master sw-home 
02:77:10:00:00:01 dev router master sw-home learner@rootvolt:~$ netlab shell sw-home -- cat /sys/class/net/sw-home/bridge/ageing_time30000learner@rootvolt:~$ sleep 310learner@rootvolt:~$ netlab shell sw-home -- bridge fdb show br sw-home dynamiclearner@rootvolt:~$ netlab shell phonelearner@phone:~$ sudo tcpdump -i eth0 -n -e arp or icmp[sudo] password for learner: tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes18:17:43.682341 02:77:10:00:00:10 > 02:77:10:00:00:01, ethertype IPv4 (0x0800), length 98: 10.77.10.10 > 10.77.10.1: ICMP echo request, id 203, seq 1, length 64^C1 packet captured
1 packet received by filter
0 packets dropped by kernellearner@phone:~$ exitlogoutlearner@rootvolt:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Terminal 1 learns the two addresses, waits for their table entries to expire, then listens on phone.
Steps (31)
  1. Type netlab shell laptop -- ping -c 1 10.77.10.1
  2. Press Enter
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter
  6. Output: PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data. 64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.488 ms --- 10.77.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.488/0.488/0.488/0.000 ms
  7. Type netlab shell sw-home -- bridge fdb show br sw-home dynamic
  8. Press Enter
  9. Output: 02:77:10:00:00:10 dev laptop master sw-home 02:77:10:00:00:01 dev router master sw-home
  10. Type netlab shell sw-home -- cat /sys/class/net/sw-home/bridge/ageing_time
  11. Press Enter
  12. Output: 30000
  13. Type sleep 310
  14. Press Enter
  15. Type netlab shell sw-home -- bridge fdb show br sw-home dynamic
  16. Press Enter
  17. Type netlab shell phone
  18. Press Enter
  19. Type sudo tcpdump -i eth0 -n -e arp or icmp
  20. Press Enter
  21. Output: [sudo] password for learner:
  22. Type the password (the terminal shows nothing)
  23. Press Enter
  24. Output: tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
  25. Terminal 2 on laptop finished sending. Return to terminal 1.
  26. Output: 18:17:43.682341 02:77:10:00:00:10 > 02:77:10:00:00:01, ethertype IPv4 (0x0800), length 98: 10.77.10.10 > 10.77.10.1: ICMP echo request, id 203, seq 1, length 64
  27. Press Ctrl + C
  28. Output: 1 packet captured 1 packet received by filter 0 packets dropped by kernel
  29. Type exit
  30. Press Enter
  31. Output: logout
Send from terminal 2 on laptop
learner@laptop:~$ ping -c 1 10.77.10.1PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data.
64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.134 ms

--- 10.77.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.134/0.134/0.134/0.000 mslearner@laptop:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Terminal 2 sends another ping to router after the switch table is empty.
Steps (3)
  1. Type ping -c 1 10.77.10.1
  2. Press Enter
  3. Output: PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data. 64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.134 ms --- 10.77.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.134/0.134/0.134/0.000 ms
Check your answer

The frame reaches phone’s cable, but phone does not act on it. Phone’s system drops a frame whose destination is neither its own address nor broadcast. Tcpdump asks to see everything on the cable by default. That is why its output can show the flooded frame anyway.

Flooding sends a frame through every other switch port when the destination’s port is unknown. The incoming port is excluded. This capture shows one echo request to 02:77:10:00:00:01. It does not show the reply. The request taught laptop’s location again, so the returning frame can go only toward laptop.

In a fresh lab, start phone’s listener before laptop’s first ping to router. Laptop first sends a question to ff:ff:ff:ff:ff:ff. All its bits are ones. A broadcast frame uses this destination to address everyone on the local network.

Listen for a broadcast
learner@rootvolt:~$ netlab shell phone[sudo] password for learner: learner@phone:~$ sudo tcpdump -i eth0 -n -e arp or icmp[sudo] password for learner: tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes18:13:40.789304 02:77:10:00:00:10 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 10.77.10.1 tell 10.77.10.10, length 28^C1 packet captured
1 packet received by filter
0 packets dropped by kernellearner@phone:~$ exitlogoutlearner@rootvolt:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Terminal 1 listens on phone before the fresh lab has carried laptop's first question.
Steps (18)
  1. Type netlab shell phone
  2. Press Enter
  3. Output: [sudo] password for learner:
  4. Type the password (the terminal shows nothing)
  5. Press Enter
  6. Type sudo tcpdump -i eth0 -n -e arp or icmp
  7. Press Enter
  8. Output: [sudo] password for learner:
  9. Type the password (the terminal shows nothing)
  10. Press Enter
  11. Output: tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on eth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes
  12. Terminal 2 on laptop finished sending. Return to terminal 1.
  13. Output: 18:13:40.789304 02:77:10:00:00:10 > ff:ff:ff:ff:ff:ff, ethertype ARP (0x0806), length 42: Request who-has 10.77.10.1 tell 10.77.10.10, length 28
  14. Press Ctrl + C
  15. Output: 1 packet captured 1 packet received by filter 0 packets dropped by kernel
  16. Type exit
  17. Press Enter
  18. Output: logout
Send from terminal 2 on laptop
learner@laptop:~$ ping -c 1 10.77.10.1PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data.
64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.131 ms

--- 10.77.10.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.131/0.131/0.131/0.000 mslearner@laptop:~$ 

Step-by-step replay of a verified session · Recorded on Ubuntu 24.04.5 LTS, networking lab (netlab 1.0), GNU Bash 5.2.21. Terminal 2 starts laptop's first ping to router in this lab run.
Steps (3)
  1. Type ping -c 1 10.77.10.1
  2. Press Enter
  3. Output: PING 10.77.10.1 (10.77.10.1) 56(84) bytes of data. 64 bytes from 10.77.10.1: icmp_seq=1 ttl=64 time=0.131 ms --- 10.77.10.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.131/0.131/0.131/0.000 ms

Phone captures only the broadcast question. Router answers directly to laptop. That answer teaches router’s port, so the later echo request also avoids phone. A ping command can therefore cause frames with different delivery rules.

Three Ethernet delivery cases Each case is a separate star around sw-home. Arrows show laptop sending through the switch. Copy labels identify router for known unicast, and phone and router for unknown unicast and broadcast. Known unicast laptop sw-home phone router copy Unknown unicast laptop sw-home phone router copy copy Broadcast laptop sw-home phone router copy copy
Three Ethernet delivery cases Each case is a separate star around sw-home. Arrows show laptop sending through the switch. Copy labels identify router for known unicast, and phone and router for unknown unicast and broadcast. Known unicast laptop sw-home phone router copy Unknown unicast laptop sw-home phone router copy copy Broadcast laptop sw-home phone router copy copy
Each case is a separate star around sw-home. Arrows show laptop's frame reaching router alone for known unicast, and phone and router for unknown unicast or broadcast. A copy label names each receiving device.

“A broadcast goes to the whole Internet.” This capture concerns the home network. The next lesson checks the router boundary directly.

“Flooding is an attack.” The quiet table expired during an ordinary wait. Flooding delivered the next request without any attack. A flooded unicast keeps its original destination; it does not become broadcast.

A capture’s visibility and a program’s reception are different questions. First ask whether the frame reached the interface, then read its destination. Times and ping identifiers change between runs; compare direction and delivery instead.

Suppose the table knows only phone. Predict receivers for four frames: laptop to phone, laptop to router, router to laptop, then phone to broadcast. Carry source learning forward after every frame; do not restart the table between them. Write your answers, then repeat the unknown-destination and broadcast replays above, resetting before each. Capture on phone and compare the destination addresses. Explain why both frames reached phone’s cable.

Solution

The receivers are phone; phone and router; laptop; then laptop and router. The first frame teaches laptop. The second still lacks router’s location. The third teaches router and uses laptop’s learned entry.

The unknown-destination capture shows router’s unicast address, while the broadcast capture shows the all-ones address. Flooding and broadcast delivery both send a copy toward phone.

The broadcast question is an ARP request. Reaching Another Device explains what it asks and how its answer is used.

  • Known unicast uses the destination’s learned port.
  • Unknown unicast is flooded without changing its destination.
  • Broadcast addresses everyone within its local boundary.

Next, Broadcast domains and boundaries finds where that boundary lies.