PIM uses the unicast routing table to perform RPF checks. This procedure is the core of multicast routing. When the router receives a multicast packet, it looks at the source IP address for the packet.

The router looks up the source IP address in the unicast routing table and determines the outgoing interface for this packet. If this outgoing interface does not match the interface where the packet was received, the router drops the packet. This behavior intends to eliminate potential packet loops, which may occur when routers flood multicast packets. Only the immediate upstream router (with respect to the source of the multicast stream) is allowed to send us multicast packets.

RPF failures occur in two general situations: packets being flooded out of the wrong interface (good, prevents looping) or unicast shortest paths not matching multicast distribution trees (bad, PIM-enabled interface does not follow the unicast routing table). Situations of the second type generally occur in the following cases:

  • Duplicate paths to the multicast source exist, and PIM is not enabled on all links. In this situation, the router may receive multicast packets on an interface that is not on the shortest path to the source. As an extreme solution to this situation, PIM might be enabled on the links where IGP is not running.
  • There are multiple routing protocols in the network, and the router might have paths to the source learned via different protocols. In this situation, the router may receive multicast packets on an interface running RIP, while thinking the shortest path to the source is via OSPF.

Additionally, temporary RPF failures may happen in situations where the network is unstable and the routers keep changing their shortest path tables. The best way to find and isolate the RPF issue in your lab is probably to run the debug ip mfib pak command on all routers, starting from the one closest to the destination and moving upstream to the source. This command will show you process-switched multicast packets and signal any RPF issues. Note that you may need to enter the commands no ip mfib cef input and no ip mfib cef output on all interfaces where multicast packets are received; this will disable cef switching of multicast packets on the interfaces where it is specified.

The easiest way to deal with an RPF failure is to manually provide RPF information using the ip mroute command. This command is local to the router and specifies the RPF next-hop or interface for the given subnet. The syntax for the command is ip mroute <SOURCE> <MASK> [RPF-IP-Address|<Interface-Name>] [distance] . It is important to understand that this command does not specify any unicast forwarding rules. Instead, it creates an ordered table of entries to look up for RPF information. When a multicast packet is received, the router will first try to find a matching entry in the mroute table, to determine the RPF interface. Note that the mroute table is ordered in the same way in which you enter the ip mroute commands, so you should enter the most specific mroutes first. When the router finds RPF information in both the mroute table and the unicast routing table, it prefers mroute information, because it has a better distance (zero). However, connected routes still have preference over any other RPF source. You may change the mroute administrative distance to make it less preferred than the unicast routing table information.