RPF check mechanism

A multicast routing protocol relies on the existing unicast routes, MBGP routes, or static multicast routes to create multicast routing entries. When creating multicast routing entries, the multicast routing protocol uses the reverse path forwarding (RPF) check to ensure the multicast data delivery along the correct paths. The RPF check also helps avoid data loops.

A multicast routing protocol uses the following tables to perform an RPF check:

A static multicast routing table is used for RPF check rather than multicast routing.

RPF check process

A router performs the RPF check on a multicast packet as follows:

  1. The router chooses an optimal route back to the packet source separately from the unicast routing table and the static multicast routing table.

    A "packet source" means different things in different situations:

    • For a packet that travels along the SPT, the packet source is the multicast source.

    • For a packet that travels along the RPT, the packet source is the RP.

    • For a bootstrap message from the BSR, the packet source is the BSR.

    For more information about the concepts of SPT, RPT, source-side RPT, RP, and BSR, see "Configuring PIM."

  2. The router selects one of the two optimal routes as the RPF route as follows:

    • If the router uses the longest prefix match principle, the route with a higher subnet mask becomes the RPF route. If the routes have the same mask, the route with a higher route preference becomes the RPF route. If the routes have the same route preference, the unicast route becomes the RPF route.

      For more information about the route preference, see Layer 3—IP Routing Configuration Guide.

    • If the router does not use the longest prefix match principle, the route with a higher route preference becomes the RPF route. If the routes have the same preference, the unicast route becomes the RPF route.

    The RPF route determines the RPF interface and the RPF neighbor.

    • If the RPF route is a unicast route, the outgoing interface of the route is the RPF interface, and the next hop is the RPF neighbor.

    • If the RPF route is a static multicast route, the RPF interface and RPF neighbor are those specified in the route.

  3. The router checks whether the packet arrived at the RPF interface. If yes, the RPF check succeeds and the packet is forwarded. If not, the RPF check fails and the packet is discarded.

RPF check implementation in multicast

Implementing an RPF check on each received multicast packet brings a big burden to the router. The use of a multicast forwarding table is the solution to this issue. When the router creates a multicast forwarding entry for an (S, G) packet, it sets the RPF interface of the packet as the incoming interface of the (S, G) forwarding entry. After the router receives another (S, G) packet, it looks up the multicast forwarding table for the matching (S, G) entry.

Figure 22: RPF check process

As shown in Figure 22, assume that unicast routes are available in the network and no static multicast routes have been configured on Switch C. Multicast packets travel along the SPT from the multicast source to the receivers. The multicast forwarding table on Switch C contains the (S, G) entry, with VLAN-interface 20 as the incoming interface.