Explain unicast, multicast, broadcast and anycast.
Show the answer
Say this first
Unicast is one sender to one receiver. Broadcast is one to everyone in the layer 2 domain. Multicast is one
to the group of receivers that asked for it, using class D addresses 224.0.0.0/4 and IGMP in IPv4. Anycast is
one address announced from several places, so packets go to the nearest instance by routing metric. IPv6 has
no broadcast at all; it uses multicast instead.
Go deeper
Addresses
| Type | IPv4 | MAC |
|---|---|---|
| Unicast | Any host address | The host's MAC |
| Broadcast | 255.255.255.255 (limited), or the subnet's last address (directed) | ff:ff:ff:ff:ff:ff |
| Multicast | 224.0.0.0/4, link-local 224.0.0.0/24 | 01:00:5e plus low 23 bits |
| Anycast | A normal unicast address used in many places | Normal unicast MAC |
Details interviewers like
- Directed broadcast to a remote subnet is not forwarded by Cisco routers by default
(
no ip directed-broadcasthas been the default since IOS 12.0) because of smurf attacks. - Switches flood multicast like broadcast unless IGMP snooping tells them which ports have receivers.
- Anycast in IPv4 is purely a routing trick: the same prefix is announced by BGP from many sites. DNS root
servers, public resolvers like
8.8.8.8and CDNs use it. It suits short transactions; a route change mid-session can move a TCP flow to another instance.
They will ask next
Why does IPv6 not need broadcast?
Everything broadcast did is done with multicast groups. NDP uses solicited-node multicast, so only hosts whose address ends in the same 24 bits get the query, instead of every host on the link.
Traps
- Calling anycast "send to all". It goes to one, the nearest.
How did you do?Book 4.3 MulticastBook 3.3 Internet (IP)