Multicast: Overview

The way an IP packet delivered from server to client or vice versa is mostly known as unicast delivery. A server will need to know the client’s IP Address and assign this client’s IP address to the IP packet to be delivered. The more clients the server has, the more packets should be created and more bandwidth consumed.

Multicast works by sending an IP packet to a multicast IP address and client will listen to this multicast IP address to receive the IP packet. There is no need for the server to create multiple IP packets as the multicast IP address will send this packet to all of the clients.

Think of multicast like a radio broadcast. The radio station will send its program to particular radio channel and the receiver just need to tune-in to the radio channel to get the message.

Multicast was introduced by Steve Deering in RFC 1112 titled Host Extensions for IP Multicasting in 1989.

The multicast IP addresses range is 224.0.0.0 – 239.255.255.255. Below are few of multicast IP addresses that are commonly known:

224.0.0.1   - All multicast hosts.
224.0.0.2   - All multicast routers.
224.0.0.5   - All OSPF Routers.
224.0.0.6   - All OSPF DR Routers.
224.0.0.9   - All RIPv2 routers.
224.0.0.10  - All EIGRP routers.
224.0.0.13  - PIMv2.
224.0.0.18  - VRRP.
224.0.0.22  - IGMPv3 (SSM). 
224.0.0.102 - HSRPv2 / GLBP.
224.0.1.39  - Cisco multicast AUTO-RP-ANNOUNCE. 
224.0.1.40  - Cisco multicast AUTO-RP-DISCOVERY.

Interestingly, unicast routing protocol (OSPF, EIGRP, and RIP) utilizes multicast to communicate between their peers. It really make sense to use multicast to talk to relevant peer rather than using unicast (or even broadcast) which rather inefficient. Using multicast will make the communication exclusive and avoid sending the packet to non-relevant end.

Multicast is used commonly in an area where traffic is exclusive to its member and unidirectional. For example video stream, using multicast will only require the source to generate 1 stream and send it to the multicast address and the client will just need to join the multicast address to view the video content. No multiple streams required for many clients. Similar approach is used for TV broadcast and stock ticker application.

The traffic flows from Sender (S) or we usually call it Server and it is unidirectional (with the exception PIM-Bidir), Client will never send multicast packet to the Group (G) as the client will only join the Group and listen.

There is also a specific MAC address to be used in relevant to the IP address. For example, a Sender is sending a packet to a multicast group 224.1.1.1, in Layer 2 domain, this will be translated to 01-00-5E-81-01-01. The first 25 bits are always 0000 0001 . 0000 0000 . 0101 1110 . 0 and the rest of the bits are the translation of the last 23 bits of the IP address. Look at the break down below.

First 25 bits multicast MAC address = 0000 0001 . 0000 0000 . 0101 1110 . 0

224.1.1.1 (dec)   = 1110 0000 . 0000 0001 . 0000 0001 . 0000 0001 (binary)
Take last 23 bits = XXXX XXXX . X000 0001 . 0000 0001 . 0000 0001 

Combined (bin) = 0000 0001 . 0000 0000 . 0101 1110 . 0000 0001 . 0000 0001 . 0000 0001
Combined (hex) =    0    1 .    0    0 .    5    E .    0    1 .    0    1 .    0    1

Let’s do another example for 224.129.1.1.

First 25 bits multicast MAC address = 0000 0001 . 0000 0000 . 0101 1110 . 0

224.129.1.1 (dec) = 1110 0000 . 1000 0001 . 1000 0001 . 1000 0001 (binary)
Take last 23 bits = XXXX XXXX . X000 0001 . 1000 0001 . 1000 0001 

Combined (bin) = 0000 0001 . 0000 0000 . 0101 1110 . 0000 0001 . 0000 0001 . 0000 0001
Combined (hex) =    0    1 .    0    0 .    5    E .    0    1 .    0    1 .    0    1 

It appears that both 224.1.1.1 and 224.129.1.1 have exactly the same MAC address! So does anything on the first octet of the IP Address will not be translated and will also have the same MAC address. This is something to keep in mind when designing the multicast network or creating multicast application.

Since the MAC address is now predictable, there are two benefits implied:

  1. Multicast source or sender has to deliver only a single frame to the multicast MAC address group for the members to receive.
  2. Since the MAC address is always known, ARP is not required. In the same subnet, There is no other protocol required to deliver the multicast message.

Leave a Reply