multicast IP routing

Multicast routing involves sending the same message to many endpoints. You may need to implement multicast routing if you have a video conferencing facility operating at your company or if you have audio chat facilities that involve conversations among groups. All routers are capable of managing multicast routing and it is a relatively simple task to set up the capability.

The multicast method doesn’t send a message to all addresses on a network segment – that is broadcasting. One more term that you need to know is “unicast.” This means routing a packet to one address. Unicast is the standard transport concept that involves sending a packet from one source to one destination through routers. With multicast, the packet needs to be replicated and sent out from one source to many destinations.

Reverse Path Forwarding

You probably know that all network transmissions follow rule sets, which are known as protocols. The main aim of a routing algorithm is to forward packets through routers onto the destination address that is written into the packet header. Multicast procedures are a little different. The packet also has the source address written into its header and when forwarding a multicast packet, routers use a methodology that is designed to take the packet away from the source. This is a difficult concept to envisage because you would think that the only way a packet could move across a network is to travel towards a given destination.

The methodology used for multicast IP routing is called “reverse path forwarding.” The reference table for a router tells it which of its interfaces it should copy a packet onto in order to forward a packet onto the IP address contained in the destination field in the packet header. In reverse path forwarding, the router table is a little different. Each record shows an upstream interface and a downstream interface. The upstream interface is the receiving point for packets arriving from the multicast sender. The downstream interface is the exit point for any packet arriving at the given upstream interface.

There will be many records in a reverse path forwarding routing table for the same source. This is how the packet gets sent out many times over. When the router receives a packet on the upstream interface, it sorts through its routing table and finds all of the routing records that contain a mapping of where to forward packets from that source. These paths are grouped by interface, so rather than source and destination address, the resulting records will present a list of unique incoming and outgoing interface pairs. In all of the pairs, the incoming interface will be the same.

The router reads the first entry for that upstream interface and sends out the packet to the corresponding downstream interface in that record. However, the work is not complete because it has gathered several records for that upstream interface. So it reads the next record gathered by the table search and sends the packet out to the downstream interface in that table entry. The router keeps going until it has run out of records that match the upstream interface that the packet arrived on. Thus, one packet arrived in at the router and got sent out several times over.

Assembling the routing table

Destinations for a multicast packet get put into the routing table on request. That is, the endpoints that expect to receive packets from the multicast source notify the router of their interest. It is like a subscription service. So, rather than the source of a multicast informing the router “from now on, every packet I send out should go to A, B, C, and D,” each of those recipients sends a message to the router saying “I want a copy of anything that you receive from Z.” So, this is how “reverse path forwarding” gets its name – the route is not organized as a push out to a destination, it is generated as a pull in from a source.

Multicast IP routing protocols

As you can see from the description of how multicast routing works, there are two phases to creating a multicast path. The first is the subscription process where recipients register their network IP addresses into the group. This procedure is outlined in the Internet Group Management Protocol (IGMP) which operates for IPv4 addresses. The subscription process for IPv6 addresses is dictated by the Multicast Listener Discovery protocol (MLD). Collectively, the registration protocols for multicast forwarding are termed “multicast group membership discovery protocols.”

Researchers are constantly looking for better ways to manage communications and so there are always new protocols under development for any networking task. There are other multicast group membership discovery protocols out there, but IGMP and MLD are the two that are in common usage today. Similarly, there are many theoretical protocols under consideration for the second phase of multicast routing, which is the actual transmission of messages. However, the system that is implemented on just about all routers in operation today is called Protocol Independent Multicast (PIM).

Packet duplication

Packet only get duplicated at the point where the routes to recipients split. This is why the router reads the interface name from its routing table rather than the destination addresses. So, if several recipients are beyond the next router, the forwarding router will only send out one copy to that intermediate router. All routers in the path have routing table entries for that multicast route.

The result of the use of interfaces rather than addresses when forwarding multicast packets is that those packets only get duplicated when the paths for several recipients divide. So, if five recipients are beyond one neighboring router, the forwarding router only sends one copy to that neighbor. This simple rule keeps traffic to a minimum. This is called “sparse mode multicast routing.”

Dense Mode multicast routing

Sparse mode multicast routing is very efficient and it keeps network traffic to a minimum. However, there is a second forwarding methodology that you should know about. This is called “dense mode multicast routing.” Initially, dense mode simplifies the reference to routing tables. However, the methodology soon builds up into practically the same system as sparse mode as far as routers are concerned.

In dense mode, the receiving router copies all multicast packets that it receives out to every interface that it has other than the interface on which it received the packet. Therefore, every router to which that node is connected will receive those multicast packets. The subscription notification is held at the router closest to a receiver. If there are several intermediate routers on a network, they will all duplicate the multicast packet and send it through to all of its neighboring routers. If you have path redundancy on your network, this method can result in a lot of superfluous traffic circulating back around between routers.

A second mechanism in the dense mode methodology cuts down all of that superfluous traffic. If a router that connects to endpoints doesn’t have any recipients for a multicast address in its routing table, it will notify its neighboring routers not to send it packets for that multicast address. So, the next time the first router in the path gets a packet in from the multicast sender, it will forward that packet on to all of its interfaces other than the ones that have told it not to. Eventually, this opt-out method cuts down traffic to more or less the same levels that are experienced under the sparse mode method. Dense mode is also referred to as “flooding.” The opt-out signal sent by routers is called a “prune message,” or “pruning.”

The following protocols employ dense mode:

  • Distance Vector Multicast Routing Protocol (DVMRP)
  • Multicast Open Shortest Path First (MOSPF)
  • PIM Dense Mode

Although the dense mode scenario will soon get the routing table populated, it is prone to feedback loops and can cause problems on a network when it is first implemented, so it is safer to avoid this option.

Multicast IP addresses

The TCP/IP system of network management allocates a unique address to every node connected to the network. That address has to be unique within the address space, so the addresses on a LAN only have to be unique within that private network and not throughout the world.

The address space includes a range of addresses that are reserved for multicast routing. Effectively, multicast IP addresses create phantom devices. There is an address to which other devices can send messages, but that address does not represent a physical device. Instead, it represents the multicast group.

In order to set up a multicast group, you first have to allocate a unique IP address for it. Once that address identifies the group, those interested recipients can then inform the router of their inclusion in the group.

When a node sends a communication to be distributed to all members of the group, the packets of those messages are addressed to the IP address that represents that group. The router references the members of that group and sends a copy of the incoming packet to the downstream interfaces that represent group members.

If you follow classful IP addressing, you should know that multicast addresses are Class D. They occupy an address range from 222.0.0.0 to 239.255.255.255. This block is divided up further into task ranges with addresses 222.0.0.0 to 224.0.0.225 reserved for the local subnetwork. All IPv6 multicast addresses have the prefix “ff.”

Implementing multicast IP routing

Fortunately, there are almost no circumstances where you would need to set up raw multicast routing directly. All multicast communication is managed by apps, such as a video conferencing system. Therefore, there is little manual intervention needed in order to implement multicast routing on your network.

The bulk of the work to make multicast routing happen occurs on the router. All network routers have this capability. Both the app and the router will communicate via IGMP. Your router may be shipped with multicast routing capabilities turned off. However, any application that requires this facility will check the router for you at the point of installation.

As an end-user application, a multicast facility rarely presents the user with the option of which IP address to use for a group. The administrator that sets up a group will be required to give the group a meaningful name, and the application will associate that name with the next available multicast IP address.

If you operate DHCP for IP address allocations on your network, you don’t need to worry about multicast address clashes. DHCP servers will not allocate addresses within the multicast IP address to real devices.

Multicast network activity

Even if you make sure to use Sparse Mode in your multicast implementation, you should be aware that interactive multicast activity creates a lot of network traffic. This is especially true of audio and video-based conferencing applications.

Not only do these systems increase traffic load, but they are time-critical. Live, interactive applications need their traffic to be delivered immediately. They cannot wait for buffering at the network devices that the traffic passes through.

Multicast routing on the internet

Multicast routing is not limited to private networks. You can also use this method to reach out to remote sites and service customers through the methodology. There are a number of business cases that currently employ multicast routing. These include IPTV and online training courses. In these cases, however, it is advisable that your business subscribes to a Cloud-based multicast platform rather than trying to manage all of that internet terminated traffic from your own network.

Multicast routing considerations

It is particularly important to check your network’s capacity before implementing any multicast application. If you can’t afford to expand your network capacity, then you should look into implementing traffic shaping measures, such as Class-based Quality of Service (QoS). Measuring bandwidth utilization and analysing new use scenarios requires supporting tools. So, you should consider buying a network traffic analyser. You also need to keep an eye on the health of your network devices in order to head off potential points of failure on the network – so consider installing a network monitor as well.

Do you use multicast routing on your network? Did you have to do anything to set it up or did the conferencing software that you installed set it all up for you? Leave a message in the Comments section below and share your experience with the community.