The introduction to multicast article discussed how a multicast router communicates with hosts and then decides whether to forward or stop the multicast traffic on a subnet. But how does a multicast router receive the group traffic? How is the multicast traffic forwarded from a source so that all the group users receive it? This chapter provides answers to those questions.
This article first overview the methods of Multicast routing protocols including Dence mode and Spars mode and explains the usage of Reverse Path Forwarding (RPF) Check.
Overview of Multicast Routing Protocols
Routers can forward a multicast packet by using either a dense-mode multicast routing protocol or a sparse-mode multicast routing protocol . This section of the article examines the basic concepts of multicast forwarding using dense mode, the Reverse Path Forwarding (RPF) check, and multicast forwarding using sparse mode, all of which help to solve the multicast routing problem.
Multicast Forwarding Using Dense Mode
Dense-mode routing protocols assume that the multicast group application is so popular that every subnet in the network has at least one receiver wanting to receive the group traffic. Therefore, the design of a dense-mode routing protocol instructs the router to forward the multicast traffic on all the configured interfaces, with some exceptions to prevent looping.
For example, a multicast packet is never forwarded out the interface on which it was received. The figure below shows how a dense-mode routing protocol receives a multicast on one interface, and then forwards copies out all other interfaces.
The figure above shows the dense-mode logic on R1, with R1 flooding copies of the packet out all interfaces except the one on which the packet was received. Although the figure shows only one router, other routers can receive these multicasts and repeat the same process. All subnets will receive a copy of the original multicast packet.
Dense-mode protocols assume that all subnets need to receive a copy of the packets; however, dense-mode protocols do allow routers to ask to not receive traffic sent to a particular multicast group. Dense-mode routers typically do not want to receive multicast packets for a particular group if both of the following are true:
- The router does not have any active downstream routers that need packets for that group.
- The router does not know of any hosts on directly connected subnets that have joined that group.
When both of these conditions are true, the router needs to inform its upstream router not to send traffic for the group, which it does by using a special message called a Prune message. Protocols such as DVMRP, PIM-DM, and MOSPF are the dense-mode routing protocols.
Reverse Path Forwarding Check
Routers cannot simply use logic by which they receive a multicast packet and then forward a copy of it out all other interfaces, without causing multicast packets to loop around the internetwork. To prevent such loops, routers do not forward multicasts out the same interface on which they were received. Multicast routers use a Reverse Path Forwarding (RPF) check to prevent loops. The RPF check adds this additional step to a dense-mode router’s forwarding logic:
RPF Looks at the source IP address of the multicast packet. If my route that matches the source lists an outgoing interface that is the actual interface on which the packet was received, the packet passes the RPF check. If not, do not replicate and forward the packet.
The figure below shows an example in which R3 uses the RPF check on two separate copies of the same original multicast packet.
A multicast router does not forward any multicast packet unless the packet passes the RPF check. The RPF check implements a strategy by which routers accept packets that arrive over the shortest path, and discard those that arrive over longer routes. Multicast routing protocols cannot use the destination address to help routers forward a packet, because that address represents the group traffic. So, multicast routing protocols use the RPF check to determine whether the packet arrived at the router using the shortest-path route from the source to the router.
Multicast Forwarding Using Sparse Mode
The fundamental difference between dense-mode and sparse-mode routing protocols relates to their default behavior. By default, dense-mode protocols keep forwarding the group traffic unless a downstream router sends a message stating that it does not want that traffic.
Sparse-mode protocols do not forward the group traffic to any other router unless it receives a message from that router requesting copies of packets sent to a particular multicast group. A downstream router requests to receive the packets only for one of two reasons:
- The router has received a request to receive the packets from some downstream router.
- A host on a directly connected subnet has sent an Internet Group Management Protocol (IGMP) Join message for that group.
The PIM sparse-mode operation begins with the packet being forwarded to a special router called the rendezvous point (RP) . When the group traffic arrives at an RP, unlike the dense mode design, the RP does not automatically forward the group traffic to any router; the group traffic must be specifically requested by a router.