RPF Check
Reverse path forwarding (RPF) check is a mechanism that determines
whether a multicast packet is valid. RPF check works as follows: After
receiving a multicast packet, a router looks up the packet source
address in the unicast routing table, Multicast Border Gateway Protocol
(MBGP) routing table, Multicast Interior Gateway Protocol (MIGP) routing
table, and multicast static routing table to select an optimal route
as an RPF route for the packet. If the interface on which the packet
has arrived is an RPF interface, the RPF check succeeds, and the packet
is forwarded. Otherwise, the RPF check fails, and the packet is dropped.
If all the MIGP, MBGP, and MSR routing
tables have candidate routes for the RPF route, the system selects
one optimal route from each of the routing table. If the routes selected
from each table are Rt_urt (migp), Rt_mbgp, and Rt_msr, the system
selects the RPF route based on the following rules:
- By default, the system selects the RPF route based on the route
priority.
- The system compares the priorities of Rt_urt (migp), Rt_mbgp,
and Rt_msr. The route with the smallest priority value is preferentially
selected as the RPF route.
- If Rt_urt (migp), Rt_mbgp, and Rt_msr have the same priority,
the system selects the RPF route in descending order of Rt_msr, Rt_mbgp,
and Rt_urt (migp).
- If the multicast longest-match command is run
to control route selection based on the route mask:
- The system compares the mask lengths of Rt_urt (migp), Rt_mbgp,
and Rt_msr. The route with the longest mask is preferentially selected
as the RPF route.
- If Rt_urt (migp), Rt_mbgp, and Rt_msr have the same mask length,
the system compares their priorities. The route with the smallest
priority value is preferentially selected as the RPF route.
- If Rt_urt (migp), Rt_mbgp, and Rt_msr have the same mask length
and priority, the system selects the RPF route in descending order
of Rt_msr, Rt_mbgp, and Rt_urt (migp).
For example, on the network shown in Figure 1, Device C receives packets on both Port 1 and Port 2 from the
same source. The routing table on Device C shows that the RPF interface for this source is Port
2. Therefore, the RPF check fails for the packet on Port 1 but succeeds
for the packet on Port 2. Then, Device C drops the packet on Port 1 but forwards that packet
on Port 2.
Figure 1 RPF check process