PIM uses reverse-path forwarding (RPF) to prevent routing
loops and to build a shortest-path tree from the receiver back to
the multicast source.
PIM uses reverse-path forwarding
(RPF) to prevent multicast routing loops by leveraging the unicast
routing table on the virtual router. When the virtual router receives
a multicast packet, it looks up the source of the multicast packet
in its unicast routing table to see if the outgoing interface associated
with that source IP address is the interface on which that packet
arrived. If the interfaces match, the virtual router duplicates
the packet and forwards it out the interfaces toward the multicast
receivers in the group. If the interfaces don’t match, the virtual
router drops the packet. The unicast routing table is based on the
underlying static routes or the interior gateway protocol (IGP)
your network uses, such as OSPF.
PIM also uses RPF to build a shortest-path tree to
a source, one PIM router hop at a time. The virtual router has the
address of the multicast source, so the virtual router selects as
its next hop back to the source the upstream PIM neighbor that the
virtual router would use to forward unicast packets to the source.
The next hop router does the same thing.
After RPF succeeds and the virtual router has a route entry in
its multicast routing information base (mRIB), the virtual router
maintains source-based tree entries (S,G) and shared tree entries
(*,G) in its multicast forwarding information base (multicast forwarding
table or mFIB). Each entry includes the source IP address, multicast
group, incoming interface (RPF interface) and outgoing interface
list. There can be multiple outgoing interfaces for an entry because
the shortest path tree can branch at the router, and the router
must forward the packet out multiple interfaces to reach receivers
of the group that are located down different paths. When the virtual
router uses the mFIB to forward a multicast packet, it matches an
(S,G) entry before it attempts to match a (*,G) entry.
If you are advertising multicast source prefixes into BGP (you
configured MP-BGP with
the IPv4 Address Family and the multicast Subsequent Address Family),
then the firewall always performs the RPF check on the BGP routes
that the firewall received under the multicast Subsequent Address
IP Multicast Information to see how to view the mFIB and
mRIB entries. Keep in mind that the multicast route table (mRIB)
is a separate table from the unicast route table (RIB).