PIM Sparse Mode Configuration: RP, RPF Check and Verification - 夜莺博客

PIM Sparse Mode Configuration: RP, RPF Check and Verification

PIM sparse mode is the multicast routing mode you will meet in production, and it fails in a very specific way: the (*,G) entry exists, the receiver joined, and no traffic arrives because the reverse path forwarding (RPF) check is failing. This guide configures PIM-SM from scratch on Cisco IOS XE - enabling multicast routing, turning on PIM on the right interfaces, choosing an RP design, and reading the multicast route table - then walks through the verification and troubleshooting steps that isolate RPF failures in minutes instead of hours.

Enable multicast routing and PIM

Router(config)# ip multicast-routing
Router(config)# ip multicast-routing distributed        ! platform dependent
Router(config)# interface Loopback0
Router(config-if)# ip address 10.0.0.1 255.255.255.255
Router(config-if)# ip pim sparse-mode
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ip pim sparse-mode
Router(config-if)# ip pim dr-priority 100
Router(config-if)# ip pim query-interval 1

Every interface that should participate - toward sources, receivers, and the RP - needs ip pim sparse-mode. A common mistake is enabling PIM only on the interface facing receivers; without PIM toward the source the register process never completes and the (S,G) entry never leaves the shared tree.

Define the rendezvous point

! Static RP - the simplest, most deterministic option
Router(config)# ip pim rp-address 10.0.0.1 10

! Anycast RP - same address on two routers, MSDP between them
Router(config)# ip pim rp-address 10.0.0.1 10 override
Router(config)# ip msdp peer 10.0.0.2 connect-source Loopback0
Router(config)# ip msdp originator-id Loopback0

! Auto-RP with sparse-mode listener
Router(config)# ip pim autorp listener
Router(config)# ip pim send-rp-announce Loopback0 scope 16 group-list 10
Router(config)# ip pim send-rp-discovery Loopback0 scope 16

! BSR - standards based
Router(config)# ip pim bsr-candidate Loopback0 0
Router(config)# ip pim rp-candidate Loopback0 group-list 10 interval 60

An access list such as access-list 10 permit 224.0.0.0 15.255.255.255 limits which groups a candidate RP serves. Static RP is the fallback everyone should know: it removes an entire class of "the group never left the shared tree" problems, and it is the fastest way to prove that the rest of your configuration works.

The RPF check explained in one paragraph

When a multicast packet arrives, the router looks up the source address (or the RP address when only a shared-tree entry exists) in the unicast routing table. If the packet arrived on the interface the unicast table points at, the check passes and traffic is forwarded down the outgoing interface list. If not, the packet is silently dropped. Almost all "multicast is broken" tickets are unicast routing problems wearing a multicast costume.

Verification commands that actually answer the question

Router# show ip mroute
Router# show ip mroute 239.1.1.1
Router# show ip mroute count
Router# show ip rpf 10.20.30.40
Router# show ip pim rp mapping
Router# show ip pim neighbor
Router# show ip pim interface
Router# show ip pim bsr-router
Router# debug ip mrouting 239.1.1.1
Router# mrinfo 10.20.30.40

Read a mroute entry left to right: the incoming interface must match show ip rpf for the source, the outgoing interface list must contain the interface toward the receiver, and a (*,G) entry with RPF nbr set but no traffic is the classic sign that the RP is filtering or that the source never registers. show ip mroute count separates "no packets are arriving" from "packets arrive and are dropped", which halves the search space immediately.

Tuning and protection

Router(config)# ip pim spt-threshold 100 group-list 20
Router(config)# ip pim spt-threshold infinity group-list 21
Router(config)# ip pim register-rate-limit 100
Router(config)# ip pim accept-register list 30
Router(config)# ip pim bsr-border
Router(config-if)# ip pim sparse-mode border lan

spt-threshold infinity keeps low-rate groups on the shared tree, which reduces state on core routers at the cost of slightly longer paths. register-rate-limit and an accept-register access list protect the RP from a misbehaving source that floods registers. On WAN interfaces use ip pim bsr-border so candidate messages never leak across an administrative boundary.

Putting it together

Design order matters: pick RP redundancy first, enable PIM everywhere inside the multicast domain, and verify unicast reachability of sources and RP before you look at anything multicast-specific. Pair this with a working Layer 2 foundation - see IGMP snooping configuration for the access layer and VRF-lite when multicast must stay inside a tenant. For packet-level proof that joins are leaving the host, capture with the filters in our tcpdump guide.

原文链接:https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/ipmulti_pim/configuration/xe-16-10/imc-pim-xe-16-10-book/imc-basic-cfg.html