Octet

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

TypeIPv4MAC
UnicastAny host addressThe host's MAC
Broadcast255.255.255.255 (limited), or the subnet's last address (directed)ff:ff:ff:ff:ff:ff
Multicast224.0.0.0/4, link-local 224.0.0.0/2401:00:5e plus low 23 bits
AnycastA normal unicast address used in many placesNormal unicast MAC

Details interviewers like

  • Directed broadcast to a remote subnet is not forwarded by Cisco routers by default (no ip directed-broadcast has 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.8 and CDNs use it. It suits short transactions; a route change mid-session can move a TCP flow to another instance.

Traps

  • Calling anycast "send to all". It goes to one, the nearest.
How did you do?Book 4.3 MulticastBook 3.3 Internet (IP)