Lecture #24 - Multicasting

Datagram Addressing and Delivery

In most cases IP datagrams are sent in a unicast manner, that is from one host to another. Alternatively, we can send a broadcast and address every device in the subnet.

However, there are times when the same information needs to be sent to multiple receivers. This can be achieved using replicated unicast, which involves sending the same datagram multiple times using unicast. This increases overhead at the sender, both in terms of processing and bandwidth.

Alternatively we could send the data using broadcast. This however would require all devices on the network to receive and process the traffic, even if it was not intended for them.

As a result, it would be benefical to have a mechanism that allows us to send datagrams in a broadcast fashion, but to a limited group of receivers - this is where IP multicast comes in.

The Argument for Multicasting

The diagram below shows the number of packets traversing each link in the network, just to get one (identical) packet to each destination.

This does not scale well. In links close to the source, the traffic is heavy, and it is all copies of the same thing.

A more efficient way is to send the minimum number of packets and have the routers duplicate/distribute them where necessary. This is the approach implemented by multicasting.

What is Required?

IP Addresses

IPv4 reserves the address range from 224.0.0.0/24 through to 239.255.255.255 for multicast destination addresses (the source address is the normal address of the originating host computer).

The 224.0.0.0 through 224.0.0.255 range is reserved for use by routing protocols, network topology discovery and other network maintenance functions.

Some of the well defined IP multicast addresses include:

MAC Addresses

An Ethernet network card is designed so that it will only receive frames addressed to its "hard coded" MAC address or to the Ethernet broadcast address (ff:ff:ff:ff:ff:ff). Obviously neither of these options work well for multicasting. As a result, a MAC addressing scheme needed to be created that would allow mappings from IP multicast addresses to MAC addresses. Additionally, the network card needs to be "multicast aware".

IANA "owns" a set of Ethernet addresses (from 0100.5e00.0000 to 0100.5e7f.ffff) that can be used to map IP multicast addresses using the bottom 23 address bits. Unfortunately, it is 1/32 of the size required - 32 IP addresses map to the same Ethernet address. With a little care, this range of MAC addresses can be used to implement a set of IP multicast addresses.

If the "Broadcast or Multicast" bit is set, it indicates the frame is intended for all or a group of hosts on the network.

Protocols

Internet Group Managment Protocol (IGMP)

One of the key requirements of multicasting is that of a host being able to join or leave a multicast group. This involves interaction between the host and the local multicast router.

The Internet Group Management Protocol is used to register hosts in a multicast group on a particular LAN. It does this by sending a message to the local multicast router. Multicast routers periodically send out queries to discover which groups are active on a particular subnet.

PIM - Protocol Independent Multicasting, Dense Mode

Dense Mode PIM works by periodically flooding the network (wherever there is a PIM-DM neighbour, a directly connected member or a manually configured interface). PIM-DM works well where there are many closely spaced receivers (hence the name Dense Mode).

Branches that don't have any receivers send "prune" messages back toward the source of the data, so that unnecessary traffic is avoided.

Typically, flooding is done every 3 minutes and pruning takes around 3 seconds per router (so there is a repeating cycle involving a "brief" flood of multicast traffic).

PIM-DM relies on a unicast routing protocol (eg. EIGRP, OSPF, BGP, static routes) to discover and propagate the network topology. PIM doesn't do any topology discovery itself.

In delivering multicast packets PIM-DM, in essence, uses Reverse Path Forwarding ie. Hosts use IGMP to send "join" messages toward the multicast source. The multicast source sends data packets in the opposite direction to the "join" messages (toward the receiving hosts).

PIM - Protocol Independent Multicasting, Sparse Mode

Sparse Mode PIM only sends multicast traffic to those subnets with active receivers (ones that have requested the traffic).

Sparse Mode PIM uses a Rendezvous Point - a router to which "join" messages are sent by both senders and receivers. This creates a distribution tree whose root is the RP:

Initially, multicast data is sent via the RP, even though this may be far from optimal. If the data rate warrants, the routers may negotiate the use of Shortest Path Forwarding from the source, creating a distribution tree rooted at the source:

Bidirectional PIM

Sparse Mode PIM is unidirectional (from source to destination).

Bidir-PIM allows efficient many-to-many multicasting. In order to maintain a loop free network, the distribution tree must remain rooted to the Rendezvous Point - it is the common point of contact for all participating hosts.

References