73
The specific process of RPF check is as follows:
1.
The router chooses an optimal route from the unicast routing table, the MBGP routing table, and
the static multicast routing table, respectively:
{
The router searches its unicast routing table and automatically chooses an optimal unicast
route to the packet source address. The outgoing interface of the route is the RPF interface
and the next hop is the RPF neighbor. The router considers the path of the packet that the
RPF interface receives from the RPF neighbor as the shortest path that leads back to the
source.
{
The router searches its MBGP routing table and automatically chooses an optimal MBGP
route to the packet source address. The outgoing interface of the route is the RPF interface
and the next hop is the RPF neighbor.
{
The router searches its static multicast routing table and automatically chooses an optimal
static multicast route to the packet source address. The route explicitly defines the RPF
interface and the RPF neighbor.
2.
The router selects one of the optimal routes as the RPF route according to the following
principles:
{
If the router uses the longest match principle, it selects the longest matching route as the
RPF route. If the routes have the same mask, the router selects the route that has the
highest priority as the RPF route. If the routes have the same priority, the router selects a
route as the RPF route in the order of static multicast route, MBGP route, and unicast route.
{
If the router does not use the longest match principle, it selects the route that has the
highest priority as the RPF route. If the routes have the same priority, the router selects a
route as the RPF route in the order of static multicast route, MBGP route, and unicast route.
The packet source can mean different things in different situations:
•
For a packet traveling along the SPT from the multicast source to the receivers or the RP, the
packet source for RPF check is the multicast source.
•
For a packet traveling along the RPT from the RP to the receivers, the packet source for RPF
check is the RP.
•
For a packet traveling along the source-side RPT from the multicast source to the RP, the
packet source for RPF check is the RP.
•
For a bootstrap message from the bootstrap router (BSR), the packet source for RPF check is
the BSR.
For more information about the concepts of SPT, RPT, source-side RPT, RP, and BSR, see
"
RPF check implementation in multicast
Implementing an RPF check on each received multicast packet would bring 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 a multicast packet, it sets the RPF interface of the packet as the
incoming interface of the forwarding entry. After the outer receives a multicast packet from an
interface, it searches its multicast forwarding table for a matching entry:
•
If no match is found, the router 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 makes the
following judgments:
{
If the receiving interface is the RPF interface, the RPF check succeeds and the router
forwards the packet to all outgoing interfaces.
{
If the receiving interface is not the RPF interface, the RPF check fails and the router
discards the packet.
•
If a match is found and the receiving interface is the incoming interface of the entry, the router
forwards the packet to all outgoing interfaces.