RPF check mechanism
An IPv6 multicast routing protocol uses the reverse path forwarding (RPF) check mechanism to ensure IPv6 multicast data delivery along the correct path and to avoid data loops.
RPF check process
An IPv6 multicast device performs the RPF check on an IPv6 multicast packet as follows:
Chooses an optimal route back to the packet source separately from the IPv6 unicast and IPv6 MBGP routing tables.
In RPF check, the "packet source" means difference things in difference situations:
For a packet that travels along the SPT, the packet source is the IPv6 multicast source.
For a packet that travels along the RPT, the packet source is the RP.
For a bootstrap message originated 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 IPv6 PIM."
Selects one of the optimal routes as the RPF route as follows:
If the device uses the longest prefix match principle, the route with a higher prefix length becomes the RPF route. If the routes have the same prefix length, the route with a higher route preference becomes the RPF route. If the routes have the same route preference, the IPv6 MBGP route becomes the RPF route.
For more information about the route preference, see Layer 3—IP Routing Configuration Guide.
If the device 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 route preference, the IPv6 MBGP route becomes the RPF route.
In the RPF route, the outgoing interface is the RPF interface and the next hop is the RPF neighbor.
Determines whether the packet arrived at the RPF interface.
If the packet arrived at the RPF interface, the RPF check succeeds and the packet is forwarded.
If the packet arrived at the non-RPF interface, the RPF check fails and the packet is discarded.
RPF check implementation in IPv6 multicast
Implementing an RPF check on each received IPv6 multicast packet would heavily burden the device. The use of an IPv6 multicast forwarding table is the solution to this issue. When the device creates an IPv6 multicast forwarding entry for an IPv6 (S, G) packet, it sets the RPF interface of the packet as the incoming interface of the (S, G) entry. After the device receives another (S, G) packet, it looks up its IPv6 multicast forwarding table for a matching (S, G) entry.
If no match is found, the device first determines the RPF route back to the packet source. Then, it creates a forwarding entry with the RPF interface as the incoming interface and performs one of the following tasks:
If the receiving interface is the RPF interface, the RPF check succeeds and the device forwards the packet out of all outgoing interfaces.
If the receiving interface is not the RPF interface, the RPF check fails and the device discards the packet.
If a match is found and the matching forwarding entry contains the receiving interface, the device forwards the packet out of all outgoing interfaces.
If a match is found but the matching forwarding entry does not contain the receiving interface, the device determines the RPF route back to the packet source. Then, the device performs one of the following tasks:
If the RPF interface is the incoming interface, it means that the forwarding entry is correct but the packet traveled along a wrong path. The packet fails the RPF check, and the device discards the packet.
If the RPF interface is not the incoming interface, it means that the forwarding entry has expired. The device replaces the incoming interface with the RPF interface and matches the receiving interface against the RPF interface. If the receiving interface is the RPF interface, the device forwards the packet out of all outgoing interfaces. Otherwise, it discards the packet.
Figure 96: RPF check process
As shown in Figure 96, assume that IPv6 unicast routes are available on the network. IPv6 MBGP is not configured. IPv6 multicast packets travel along the SPT from the multicast source to the receivers. The IPv6 multicast forwarding table on Device C contains the (S, G) entry, with Port A as the RPF interface.
If an IPv6 multicast packet arrives at Device C on Port A, the receiving interface is the incoming interface of the (S, G) entry. Device C forwards the packet out of all outgoing interfaces.
If an IPv6 multicast packet arrives at Device C on Port B, the receiving interface is not the incoming interface of the (S, G) entry. Device C searches its IPv6 unicast routing table and finds that the outgoing interface to the source (the RPF interface) is Port A. This means that the (S, G) entry is correct but the packet traveled along a wrong path. The packet fails the RPF check, and Device C discards the packet.