This is the second post in a series on IP Multicast. The first can be found here. In this post I’ll be looking at the different addresses used to identify Multcast groups at L2 and L3. First, a key point:
Hosts are not assigned Multicast addresses. Sources send traffic to a multicast address which members of a Group subscribe to.
You could think of the IPv4 and ethernet broadcast addresses (both are just all binary 1s) as a special case multicast address which every host is forced to subscribe to. To send a broadcast packet, a host populates the destination address IP header field with 255.255.255.255. The TCP/IP stack will then encapsulate that packet into a frame with destination MAC address FFFF.FFFF.FFFF. No host will ever have this address so no switch will have an entry for it in its MAC address table, which means the traffic is flooded out of every port in the VLAN. As an aside, you can see how if a NIC fails hot, it is going to hammer all the hosts on that VLAN – which is a good reason to keep VLANs small.
As with unicast and broadcast traffic, addresses are needed at Layer 3 and Layer 2. With both IPv4 and IPv6 the Layer 2 address of a group is a function of its Layer 3 address.
So, to send a multicast packet, the host selects the Group address it wishes to direct traffic to and populates the destination address in the IP header with the Group address. The TCP/IP stack then encapsulates the packet into a frame with the appropriate destination MAC address, as derived from the Group address. This is why switches need to be multicast compatible to forward traffic efficiently. If they are not, the traffic is just flooded out of every port in the VLAN since the destination MAC address will be unknown – which looks just like broadcast traffic.
Layer 3 address – IPv4
Multicast addresses are from IANA Class D range:
- those starting with binary 110
Common network control plane multicast reserved addresses are within 224/8. Within that, 18.104.22.168/24 is reserved for multicasting on a local segment. Routers will not forward traffic to this range. Some examples follow but see RFC 1700
page 56 for further details:
- 22.214.171.124 – all ipv4 systems on the segment
- 126.96.36.199 – all ipv4 routers on the segment
- 188.8.131.52 – all OSPFv2 routers on a multiaccess network
- 184.108.40.206 – OSPFv2 designated routers on a multiaccess network
- 220.127.116.11 – RIPv2 routers
- 18.104.22.168 – EIGRP routers
- 22.214.171.124 – PIM routers
- 126.96.36.199 – VRRP routers
- 188.8.131.52-21 – ISIS over IP
- 184.108.40.206 – IGMPv3
- 220.127.116.11 – HSRP
- 18.104.22.168 – mDNS
22.214.171.124/24 is reserved by IANA and designated the Internetwork Control Block. It is used for traffic which must be routed through the public Internet.
- 126.96.36.199 – Multicast NTP
- 188.8.131.52 – Cisco multicast router AUTO-RP-ANNOUNCE
- 184.108.40.206 – Cisco multicast router AUTO-RP-DISCOVERY
- 220.127.116.11 – H.323 Gatekeeper discovery
18.104.22.168/8 is reserved for administrative scoping and, like RFC1918 addresses should be filtered at site border routers.
A nice summary and further assigned address ranges can be found on the Wikipedia Multicast
Note: Although I used CIDR notation above, there are no subnets in the Class D range. Hence there are 228 possible multicast groups.
Layer 3 addresses – IPv6
These are described fully in RFC 4921
. They are the addresses starting with binary 11111111
. Here are some common network control plane IPv6 multicast addresses:
- FF01::1 – All IPv6 nodes on a segment
- FF02::2 – All IPv6 routers on a segment
- FF02::5 – All OSPF routers on a segment
- FF02::6 – All OSPF designated routers on a segment
- FF02::9 – All RIPng routers on a segment
- FF02::A – All EIGRP routers on a segment
- FF02::D – PIM routers on a segment
- FF02::1:2 – DHCP Servers and Relay agents on a segment
- FF05::1:3 – DHCP Server (site scope)
- FF05::101 – NTP
- FF0x::FB – mDNS, where x is the flags bit
Layer 2 addresses – Ethernet
If the Group Member’s NIC is multicast ready, it will derive a multicast MAC address from the IPv4 layer 3 address using the reserved MAC address 0100.5E00.0000 and the lower 23 bits of the multicast IPv4 Group address. As an example, the MAC address used to forward traffic to the 22.214.171.124 would be 0100.5E00.0005.
IANA owns the OUI 0100.5E00.0000 – 0100.5EFF.FFFF
(see RFC 5342
). From this they allocated 223
addresses IPv4 multicast.
- The eighth (Individual/Group) bit is set 1 to indicate a multicast MAC address. See RFC 1112.
- The 25th bit is always zero, leaveing 00.0000 – 7F.FFFF for use.
This scheme does leave some scope for ambiguity as we are using 223 ethernet addresses to represent 228 Multicast Groups. Each MAC address could represent 25 Multicast Groups. If two groups happen to exist on a LAN then all hosts in each group will receive traffic for both groups. This is still an improvement on broadcast traffic, which is always received by all hosts on the subnet, especially given that the chances of it happening are small.
If the Layer 3 protocol is IPv6 the the lowest two nibbles are OR’d with the MAC address 33:33:00:00:00:00. For example, 2000:BAAD:CAFE::2:1 would become 33:33:00:02:00:01.
There a a couple of benefits to this method of mapping L3 to L2 addresses. Firstly we don’t need ARP or any multicast equivalent. Secondly, at L2 a source host only needs to send frames to one MAC address and all hosts subscribed to the Group will receive the traffic – which is the whole point.
This post is intended as a quick round up of multicast addresses. In the next post in this series I’ll look at Multicast Groups.