CCIE SPv5.1 Labs
  • Intro
    • Setup
  • Purpose
  • Video Demonstration
  • Containerlab Tips
  • Labs
    • ISIS
      • Start
      • Topology
      • Prefix Suppression
      • Hello padding
      • Overload Bit
      • LSP size
      • Default metric
      • Hello/Hold Timer
      • Mesh groups
      • Prefix Summarization
      • Default Route Preference
      • ISIS Timers
      • Log Neighbor Changes
      • Troubleshooting 1 - No routes
      • Troubleshooting 2 - Adjacency
      • IPv6 Single Topology
      • IPv6 Single Topology Challenge
      • IPv6 Multi Topology
      • IPv6 Single to Multi Topology
      • Wide Metrics Explained
      • Route Filtering
      • Backdoor Link
      • Non-Optimal Intra-Area routing
      • Multi Area
      • Authentication
      • Conditional ATT Bit
      • Troubleshooting iBGP
      • Troubleshooting TE Tunnel
    • LDP
      • Start
      • Topology
      • LDP and ECMP
      • LDP and Static Routes
      • LDP Timers
      • LDP Authentication
      • LDP Session Protection
      • LDP/IGP Sync (OSPF)
      • LDP/IGP Sync (ISIS)
      • LDP Local Allocation Filtering
      • LDP Conditional Label Advertisement
      • LDP Inbound Label Advertisement Filtering
      • LDP Label Advertisement Filtering Challenge
      • LDP Implicit Withdraw
      • LDP Transport Address Troubleshooting
      • LDP Static Labels
    • MPLS-TE
      • Start
      • Topology
      • Basic TE Tunnel w/ OSPF
      • Basic TE Tunnel w/ ISIS
      • TE Tunnel using Admin Weight
      • TE Tunnel using Link Affinity
      • TE Tunnel with Explicit-Null
      • TE Tunnel with Conditional Attributes
      • RSVP message pacing
      • Reoptimization timer
      • IGP TE Flooding Thresholds
      • CSPF Tiebreakers
      • TE Tunnel Preemption
      • TE Tunnel Soft Preemption
      • Tunneling LDP inside RSVP
      • PE to P TE Tunnel
      • Autoroute Announce Metric (XE)
      • Autoroute Announce Metric (XR)
      • Autoroute Announce Absolute Metric
      • Autoroute Announce Backup Path
      • Forwarding Adjacency
      • Forwarding Adjacency with OSPF
      • TE Tunnels with UCMP
      • Auto-Bandwidth
      • FRR Link Protection (XE, BFD)
      • FRR Link Protection (XE, RSVP Hellos)
      • FRR Node Protection (XR)
      • FRR Path Protection
      • FRR Multiple Backup Tunnels (Node Protection)
      • FRR Multiple Backup Tunnels (Link Protection)
      • FRR Multiple Backup Tunnels (Backwidth/Link Protection)
      • FRR Backup Auto-Tunnels
      • FRR Backup Auto-Tunnels with SRLG
      • Full Mesh Auto-Tunnels
      • Full Mesh Dynamic Auto-Tunnels
      • One-Hop Auto-Tunnels
      • CBTS/PBTS
      • Traditional DS-TE
      • IETF DS-TE with MAM
      • IETF DS-TE with RDM
      • RDM w/ FRR Troubleshooting
      • Per-VRF TE Tunnels
      • Tactical TE Issues
      • Multicast and MPLS-TE
    • SR
      • Start
      • Topology
      • Basic SR with ISIS
      • Basic SR with OSPF
      • SRGB Modifcation
      • SR with ExpNull
      • SR Anycast SID
      • SR Adjacency SID
      • SR LAN Adjacency SID (Walkthrough)
      • SR and RSVP-TE interaction
      • SR Basic Inter-area with ISIS
      • SR Basic Inter-area with OSPF
      • SR Basic Inter-IGP (redistribution)
      • SR Basic Inter-AS using BGP
      • SR BGP Data Center (eBGP)
      • SR BGP Data Center (iBGP)
      • LFA
      • LFA Tiebreakers (ISIS)
      • LFA Tiebreakers (OSPF)
      • Remote LFA
      • RLFA Tiebreakers?
      • TI-LFA
      • Remote LFA or TILFA?
      • TI-LFA Node Protection
      • TI-LFA SRLG Protection
      • TI-LFA Protection Priorities (ISIS)
      • TI-LFA Protection Priorities (OSPF)
      • Microloop Avoidance
      • SR/LDP Interworking
      • SR/LDP SRMS OSPF Inter-Area
      • SR/LDP Design Challenge #1
      • SR/LDP Design Challenge #2
      • Migrate LDP to SR (ISIS)
      • OAM with SR
      • SR-MPLS using IPv6
      • Basic SR-TE with AS
      • Basic SR-TE with AS and ODN
      • SR-TE with AS Primary/Secondary Paths
      • SR-TE Dynamic Policies
      • SR-TE Dynamic Policy with Margin
      • SR-TE Explicit Paths
      • SR-TE Disjoint Planes using Anycast SIDs
      • SR-TE Flex-Algo w/ Latency
      • SR-TE Flex-Algo w/ Affinity
      • SR-TE Disjoint Planes using Flex-Algo
      • SR-TE BSIDs
      • SR-TE RSVP-TE Stitching
      • SR-TE Autoroute Include
      • SR Inter-IGP using PCE
      • SR-TE PCC Features
      • SR-TE PCE Instantiated Policy
      • SR-TE PCE Redundancy
      • SR-TE PCE Redundancy w/ Sync
      • SR-TE Basic BGP EPE
      • SR-TE BGP EPE for Unified MPLS
      • SR-TE Disjoint Paths
      • SR Converged SDN Transport Challenge
      • SR OAM DPM
      • SR OAM Tools
      • Performance-Measurement (Interface Delay)
    • SRv6
      • Start
      • Topology
      • Basic SRv6
      • SRv6 uSID
      • SRv6 uSID w/ EVPN-VPWS and BGP IPv4/IPv6
      • SRv6 uSID w/ SR-TE
      • SRv6 uSID w/ SR-TE Explicit Paths
      • SRv6 uSID w/ L3 IGW
      • SRv6 uSID w/ Dual-Connected PE
      • SRv6 uSID w/ Flex Algo
      • SRv6 uSID - Scale (Pt. 1)
      • SRv6 uSID - Scale (Pt. 2)
      • SRv6 uSID - Scale (Pt. 3) (UPA Walkthrough)
      • SRv6 uSID - Scale (Pt. 4) (Flex Algo)
      • SRv6 uSID w/ TI-LFA
    • Multicast
      • Start
      • Topology
      • Basic PIM-SSM
      • PIM-SSM Static Mapping
      • Basic PIM-SM
      • PIM-SM with Anycast RP
      • PIM-SM with Auto-RP
      • PIM-SM with BSR
      • PIM-SM with BSR for IPv6
      • PIM-BiDir
      • PIM-BiDir for IPv6
      • PIM-BiDir with Phantom RP
      • PIM Security
      • PIM Boundaries with AutoRP
      • PIM Boundaries with BSR
      • PIM-SM IPv6 using Embedded RP
      • PIM SSM Range Note
      • PIM RPF Troubleshooting #1
      • PIM RPF Troubleshooting #2
      • PIM RP Troubleshooting
      • PIM Duplicate Traffic Troubleshooting
      • Using IOS-XR as a Sender/Receiver
      • PIM-SM without Receiver IGMP Joins
      • RP Discovery Methods
      • Basic Interdomain Multicast w/o MSDP
      • Basic Interdomain Multicast w/ MSDP
      • MSDP Filtering
      • MSDP Flood Reduction
      • MSDP Default Peer
      • MSDP RPF Check (IOS-XR)
      • MSDP RPF Check (IOS-XE)
      • Interdomain MBGP Policies
      • PIM Boundaries using MSDP
    • MVPN
      • Start
      • Topology
      • Profile 0
      • Profile 0 with data MDTs
      • Profile 1
      • Profile 1 w/ Redundant Roots
      • Profile 1 with data MDTs
      • Profile 6
      • Profile 7
      • Profile 3
      • Profile 3 with S-PMSI
      • Profile 11
      • Profile 11 with S-PMSI
      • Profile 11 w/ Receiver-only Sites
      • Profile 9 with S-PMSI
      • Profile 12
      • Profile 13
      • UMH (Upstream Multicast Hop) Challenge
      • Profile 13 w/ Configuration Knobs
      • Profile 13 w/ PE RP
      • Profile 12 w/ PE Anycast RP
      • Profile 14 (Partitioned MDT)
      • Profile 14 with Extranet option #1
      • Profile 14 with Extranet option #2
      • Profile 14 w/ IPv6
      • Profile 17
      • Profile 19
      • Profile 21
    • MVPN SR
      • Start
      • Topology
      • Profile 27
      • Profile 27 w/ Constraints
      • Profile 27 w/ FRR
      • Profile 28
      • Profile 28 w/ Constraints and FRR
      • Profile 28 w/ Data MDTs
      • Profile 29
    • VPWS
      • Start
      • Topology
      • Basic VPWS
      • VPWS with Tag Manipulation
      • Redundant VPWS
      • Redundant VPWS (IOS-XR)
      • VPWS with PW interfaces
      • Manual VPWS
      • VPWS with Sequencing
      • Pseudowire Logging
      • VPWS with FAT-PW
      • MS-PS (Pseudowire stitching)
      • VPWS with BGP AD
    • VPLS
      • Start
      • Topology
      • Basic VPLS with LDP
      • VPLS with LDP and BGP
      • VPLS with BGP only
      • Hub and Spoke VPLS
      • Tunnel L2 Protocols over VPLS
      • Basic H-VPLS
      • H-VPLS with BGP
      • H-VPLS with QinQ
      • H-VPLS with Redundancy
      • VPLS with Routing
      • VPLS MAC Protection
      • Basic E-TREE
      • VPLS with LDP/BGP-AD and XRv RR
      • VPLS with BGP and XRv RR
      • VPLS with Storm Control
    • EVPN
      • Start
      • Topology
      • EVPN VPWS
      • EVPN VPWS Multihomed
      • EVPN VPWS Multihomed Single-Active
      • Basic Single-homed EVPN E-LAN
      • EVPN E-LAN Service Label Allocation
      • EVPN E-LAN Ethernet Tag
      • EVPN E-LAN Multihomed
      • EVPN E-LAN on XRv
      • EVPN IRB
      • EVPN-VPWS Multihomed IOS-XR (All-Active)
      • EVPN-VPWS Multihomed IOS-XR (Port-Active)
      • EVPN-VPWS Multihomed IOS-XR (Single-Active)
      • EVPN-VPWS Multihomed IOS-XR (Non-Bundle)
      • PBB-EVPN (Informational)
    • BGP Multi-Homing (XE)
      • Start
      • Topology
      • Lab1 ECMP
      • Lab2 UCMP
      • Lab3 Backup Path
      • Lab4 Shadow Session
      • Lab5 Shadow RR
      • Lab6 RR with Add-Path
      • Lab7 MPLS + Add Path ECMP
      • Lab8 MPLS + Shadow RR
      • Lab9 MPLS + RDs + UCMP
    • BGP Multi-Homing (XR)
      • Start
      • Topology
      • Lab1 ECMP
      • Lab2 UCMP
      • Lab3 Backup Path
      • Lab4 “Shadow Session”
      • Lab5 “Shadow RR”
      • Lab6 RR with Add-Path
      • Lab7 MPLS + Add Path ECMP
      • Lab8 MPLS + “Shadow RR”
      • Lab9 MPLS + RDs + UCMP
      • Lab10 MPLS + Same RD + Add-Path + UCMP
      • Lab11 MPLS + Same RD + Add-Path + Repair Path
    • BGP
      • Start
      • Conditional Advertisement
      • Aggregation and Deaggregation
      • Local AS
      • BGP QoS Policy Propagation
      • Non-Optimal eBGP Routing
      • Multihomed Enterprise Challenge
      • Provider Communities
      • Destination-Based RTBH
      • Destination-Based RTBH (Community-Based)
      • Source-Based RTBH
      • Source-Based RTBH (Community-Based)
      • Multihomed Enterprise Challenge (XRv)
      • Provider Communities (XRv)
      • DMZ Link BW Lab1
      • DMZ Link BW Lab2
      • PIC Edge in the Global Table
      • PIC Edge Troubleshooting
      • PIC Edge for VPNv4
      • AIGP
      • AIGP Translation
      • Cost-Community (iBGP)
      • Cost-Community (confed eBGP)
      • Destination-Based RTBH (VRF Provider-triggered)
      • Destination-Based RTBH (VRF CE-triggered)
      • Source-Based RTBH (VRF Provider-triggered)
      • Flowspec (Global IPv4/6PE)
      • Flowspec (VRF)
      • Flowspec (Global IPv4/6PE w/ Redirect)
      • Flowspec (Global IPv4/6PE w/ Redirect) T-Shoot
      • Flowspec (VRF w/ Redirect)
      • Flowspec (Global IPv4/6PE w/ CE Advertisement)
    • Intra-AS L3VPN
      • Start
      • Partitioned RRs
      • Partitioned RRs with IOS-XR
      • RT Filter
      • Non-Optimal Multi-Homed Routing
      • Troubleshoot #1 (BGP)
      • Troubleshoot #2 (OSPF)
      • Troubleshoot #3 (OSPF)
      • Troubleshoot #4 (OSPF Inter-AS)
      • VRF to Global Internet Access (IOS-XE)
      • VRF to Global Internet Access (IOS-XR)
    • Inter-AS L3VPN
      • Start
      • Inter-AS Option A
      • Inter-AS Option B
      • Inter-AS Option C
      • Inter-AS Option AB (D)
      • CSC
      • CSC with Option AB (D)
      • Inter-AS Option C - iBGP LU
      • Inter-AS Option B w/ RT Rewrite
      • Inter-AS Option C w/ RT Rewrite
      • Inter-AS Option A Multi-Homed
      • Inter-AS Option B Multi-Homed
      • Inter-AS Option C Multi-Homed
    • Russo Inter-AS
      • Start
      • Topology
      • Option A L3NNI
      • Option A L2NNI
      • Option A mVPN
      • Option B L3NNI
      • Option B mVPN
      • Option C L3NNI
      • Option C L3NNI w/ L2VPN
      • Option C mVPN
    • BGP RPKI
      • Start
      • RPKI on IOS-XE (Enabling the feature)
      • RPKI on IOS-XE (Validation)
      • RPKI on IOS-XR (Enabling the feature)
      • Enable SSH in Routinator
      • RPKI on IOS-XR (Validation)
      • RPKI on IOS-XR (RPKI Routes)
      • RPKI on IOS-XR (VRF)
      • RPKI iBGP Mesh (No Signaling)
      • RPKI iBGP Mesh (iBGP Signaling)
    • NAT
      • Start
      • Egress PE NAT44
      • NAT44 within an INET VRF
      • Internet Reachability between VRFs
      • CGNAT
      • NAT64 Stateful
      • NAT64 Stateful w/ Static NAT
      • NAT64 Stateless
      • MAP-T BR
    • BFD
      • Start
      • Topology
      • OSPF Hellos
      • ISIS Hellos
      • BGP Keepalives
      • PIM Hellos
      • Basic BFD for all protocols
      • BFD Asymmetric Timers
      • BFD Templates
      • BFD Tshoot #1
      • BFD for Static Routes
      • BFD Multi-Hop
      • BFD for VPNv4 Static Routes
      • BFD for VPNv6 Static Routes
      • BFD for Pseudowires
    • QoS
      • Start
      • QoS on IOS-XE
      • Advanced QoS on IOS-XE Pt. 1
      • Advanced QoS on IOS-XE Pt. 2
      • MPLS QoS Design
      • Notes - QoS on IOS-XR
    • NSO
      • Start
      • Basic NSO Usage
      • Basic NSO Template Service
      • Advanced NSO Template Service
      • Advanced NSO Template Service #2
      • NSO Template vs. Template Service
      • NSO API using Python
      • NSO API using Python #2
      • NSO API using Python #3
      • Using a NETCONF NED
      • Python Service
      • Nano Services
    • MDT
      • Start
      • MDT Server Setup
      • Basic Dial-Out
      • Filtering Data using XPATH
      • Finding the correct YANG model
      • Finding the correct YANG model #2
      • Event-Driven MDT
      • Basic Dial-In using gNMI
      • Dial-Out with TLS
      • Dial-In with TLS
      • Dial-In with two-way TLS
    • App-Hosting
      • Start
      • Lab - iperf3 Docker Container
      • Notes - LXC Container
      • Notes - Native Applications
      • Notes - Process Scripts
    • ZTP
      • Notes - Classic ZTP
      • Notes - Secure ZTP
    • L2 Connectivity Notes
      • 802.1ad (Q-in-Q)
      • MST-AG
      • MC-LAG
      • G.8032
    • Ethernet OAM
      • Start
      • Topology
      • CFM
      • y1731
      • Notes - y1564
    • Security
      • Start
      • Notes - Security ACLs
      • Notes - Hybrid ACLs
      • Notes - MPP (IOS-XR)
      • Notes - MPP (IOS-XE)
      • Notes - CoPP (IOS-XE)
      • Notes - LPTS (IOS-XR)
      • Notes - WAN MACsec White Paper
      • Notes - WAN MACsec Config Guide
      • Notes - AAA
      • Notes - uRPF
      • Notes - VTY lines (IOS-XR)
      • Lab - uRPF
      • Lab - MPP
      • Lab - AAA (IOS-XE)
      • Lab - AAA (IOS-XR)
      • Lab - CoPP and LPTS
    • Assurance
      • Start
      • Notes - Syslog on IOS-XE
      • Notes - Syslog on IOS-XR
      • Notes - SNMP Traps
      • Syslog (IOS-XR)
      • RMON
      • Netflow (IOS-XE)
      • Netflow (IOS-XR)
Powered by GitBook
On this page
  • Answer
  • Explanation
  • What happens if a router in the path does not have BiDir enabled?
  • What if R10 enables PIM-BiDir but treats the group as non-BiDir?
  • A note on using PIM-SM with PIM-BiDir
  1. Labs
  2. Multicast

PIM-BiDir

Load multicast.init.cfg

#IOS-XE
config replace flash:multicast.init.cfg
 
#IOS-XR
configure
load bootflash:multicast.init.cfg
commit replace
y

Configure CSR9 as the RP for 239.1.1.0/24 and XR4 as the RP for 239.2.2.0/24. Advertise the RP mapping using BSR. Use BiDir for these groups.

Answer

#R5-R10
ip pim bidir-enable

#XR4
multicast-routing
 address-family ipv4
  interface Loopback0 enable
!
ipv4 access-list XR4_BIDIR_GROUP
 10 permit ipv4 239.2.2.0/24 any
!
router pim
 address-family ipv4
  bsr candidate-bsr 1.0.0.14
  bsr candidate-rp 1.0.0.14 group-list XR4_BIDIR_GROUP bidir

#R9
int Lo0
 ip pim sparse-mode
!
ip access-l standard R9_BIDIR_GROUP
 permit 239.1.1.0 0.0.0.255
!
ip pim bsr-candidate lo0
ip pim rp-candidate Loopback0 group-list R9_BIDIR_GROUP bidir

Explanation

BiDir is essentially an extension to PIM-SM. The RPT built from the receivers to the RP works exactly the same way. However, the PIM Register process is gone. Instead, multicast traffic is allowed to flow up the shared tree towards the RP. In order for this to work, the RPF check needs to be removed. A different loop prevent mechanism needs to be deployed. PIM-BiDir uses a spanning tree to enforce a loop free topology. You can think of this just as how classic STP works.

In PIM-BiDir, the “root port” is the BiDir Upstream port, which is the RPF interface towards the RP. The “Designated Ports” are elected via the DF (Designated Forwarder) election. This is a special PIM packet that each router originates on every link for every BiDir RP. A DF port is selected per-RP. Only one router can be elected DF on a given segment. The router with the best metric, or highest interface IP address is elected. The DF election PIM packet looks as follows:

Any ports that are not elected as DF on a router are placed into “blocking.” This is how a loop free topology is implemented in PIM-BiDir.

The benefit of PIM-BiDir is that there is no (S, G) state. This provides scalability when you have lots of senders and receivers. PIM-BiDir is suitable for multicast traffic such as video conferencing, in which every receiver is also a sender. All traffic is forwarded via the blanket (*, G) PIM-BiDir entry.

The downside to PIM-BiDir is that the RP must be 100% in the traffic flow. You should place the RP in a central location, because traffic will never switchover to a (S, G) entry in PIM-BiDir.

To enable PIM-BiDir on IOS-XE we need an explicit global statement. This is not required on IOS-XR; PIM-BiDir is already enabled by default.

#IOS-XE
ip pim bidir-enable

The RP also must be associated with BiDir mode. This can be done statically, using AutoRP or using BSR. In this lab we use BSR.

#XR4
multicast-routing
 address-family ipv4
  interface Loopback0 enable
!
ipv4 access-list XR4_BIDIR_GROUP
 10 permit ipv4 any 239.2.2.0/24
!
router pim
 address-family ipv4
  bsr candidate-bsr 1.0.0.14
  bsr candidate-rp 1.0.0.14 group-list XR4_BIDIR_GROUP bidir

#R9
int Lo0
 ip pim sparse-mode
!
ip access-l standard R9_BIDIR_GROUP
 permit 239.1.1.0 0.0.0.255
!
ip pim bsr-candidate lo0
ip pim rp-candidate Loopback0 group-list R9_BIDIR_GROUP bidir

At this point, we should see that all routers in the domain learn of the two RPs and the groups they are acting as RP for. We should also see that they are associated with BiDir mode.

On IOS-XR we can confirm that these two ranges are operating in BiDir mode:

The router learns that these ranges are BiDir, because there is a BiDir flag on the group range in the BSR message:

Next, the DF election takes place on every segment to enforce the strict loop free topology. Let’s “zoom in” on the election between R7-XR1-XR4, because this has a potential for a loop.

Let’s look at the DF election for R9 as the RP. R7 identifies its interface towards XR4 as the best path to R9, so this is the BiDir upstream port (or “root port” in STP terms) - marked as U. R7 and XR4 share their route AD/metric towards R9 with each other, and XR4 wins the DF election - marked as DF. So far our topology looks like this:

Next, R7 and XR1 run the DF election process. XR1 and R7 both have a 110/3 (AD/metric) route towards R9, so XR1 wins for higher IP address. XR1’s BiDir upstream interface is the interface towards XR4. On the XR1-XR4 interface, XR4 wins the election, with a metric of 110/2 towards R9. Since R7’s interface towards XR1 is neither a upstream interface, nor DF, R7 is effectively “blocking” on this port. We now have enforced a loop free topology.

We can see the results of the DF election using the following commands:

To actually enforce the results of the DF election, and therefore achieve a loop free topology, only certain interfaces are added to the (*, G) entry for the BiDir groups. For example, let’s look at (*, 239.1.1.0/24) on R7:

Above, the BiDir upstream is the interface towards XR4, as we identified previously. This is essentially an outgoing interface, as well as an incoming interface. Additionally, all ports for which the router is DF are added to the incoming interface list. A multicast packet arrive on this incoming interface is sent out the BiDir-upstream interface towards the RP. Notice that the interface towards XR1 is not present here. The loop free topology is enforced by only adding the upstream and DF ports to the incoming interface list. Traffic is not accepted on non-DF ports.

We can also see this on XR1. All of its interfaces are either DF or upstream ports, so all are present in the incoming interface list. Only the BiDir-upstream port is present in the outgoing interface list:

Let’s examine what happens when we start sending multicast traffic. R1 pings 239.1.1.1:

#R1
ping 239.1.1.1

R7 accepts the traffic as it arrives on an incoming interface in the (*, 239.1.1.0/24) entry, and R7 forwards to XR4. R7 does not add a (S, G) entry for this. XR4 does the same, and forwards towards R9. R9 finds no interested receivers for (*, 239.1.1.1) so R9 drops the traffic. We can see this in a pcap. The ping is seen taking three hops: R1-R7, R7-XR4, XR4-R9:

This is another downside of PIM-BiDiR - there is no PIM Register Stop. So R9 cannot let a FHR know that it has no interested receivers. Instead, this traffic will use up unnecessary bandwidth in the network. It will always be sent all the way to the RP, and then dropped at the RP.

Let’s now join a receiver, using R2. R2 must run PIM-BiDir mode as well. It will automatically learn of the RPs via BSR too. Without using BiDir mode, R5 will sense that R2 is not running BiDir. R5 notices the lack of the BiDir capability flag set in the PIM Hello. R5 will not forward traffic to R2 even though it receives an IGMP join from R2. This is because R5 sees that R2 is a PIM neighbor but it is not participating in the DF election, so R5 must err on the side of caution in order to not form a loop. Keep in mind this is all done just to see an ICMP reply from R2. You could alternatively just watch the mfib counters on R5 and not run PIM on R2 at all.

#R2
ip multicast-routing distributed
ip pim bidir-enable
!
int gi2.525
 ip pim sparse-mode
 ip igmp join-group 239.1.1.1

On R5, we see that a (*, G) state was created. The interface that R5 received the IGMP report on is added to the OIL. The RPF interface is inherited from the (*, 239.1.1.0/24) entry and is both an IIF and outgoing interface.

A PIM Join makes its way to R9. This is the exact same process as in regular PIM-SM.

In PIM-BiDir, (*, G) state only exists on the shared tree between the RP and receivers as in normal PIM-SM. Traffic is forwarded from sources only based on a blanket (*, G) entry such as (*, 239.1.1.0/24).

R1 pings 239.1.1.1 and receives a reply from R2:

On routers between the sender and the RP, there is no (S, 239.1.1.1) or even (*, 239.1.1.1) state. All traffic is forwarded via the (*, 239.1.1.0/24) entry:

On routers between the RP and the receiver, the (*, G) state is present due to the PIM Join process.

This is what makes PIM-BiDir scalable: all traffic is forwarded based on (*, G/32) or (*, G/X) entries. (S, G) entries are never created.

Let’s briefly look at XR as the LHR. We’ll join the same group on R4.

#R4
ip multicast-routing distributed
ip pim bidir-enable
!
int GigabitEthernet2.543
 ip pim sparse-mode
 ip igmp join-group 239.1.1.1

We’ll now look at the MRIB on XR3. The IA flag means “inherit accept,” so the (*, G) entry inherits all the acceptance interfaces found in the blanket (*, G/X) entry. The interface towards R4 is added to the OIL for the specific (*, G) entry.

In many ways, PIM-BiDir is actually more simple than PIM-SM. There is no PIM Register or Register stop process, there is no (S, G) tree the RP must join, and there is no SPT switchover process. The complexity just comes from the loop free topology enforcement, which uses a DF election process and ensures that no non-DF/upstream interfaces are added to the incoming interface list.

Let’s also test the reverse direction. We’ll set R1 to join 239.1.1.1.

#R1
ip multicast-routing distributed
ip pim bidir-enable
!
int gi2.517
 ip pim sparse-mode
 no ip igmp ver 3
 ip igmp join-group 239.1.1.1

R9 now has three interfaces added to the OIL. One interface towards each receiver.

When R2 pings 239.1.1.1, we see a reply from R1, R2 (itself) and R4:

What happens if a router in the path does not have BiDir enabled?

Let’s disable BiDir on R10:

#R10
no ip pim bidir-enable

R10 shows us that it still learns of the RPs and that they are in BiDir mode, but warns us that BiDir is disabled locally.

R10 still has the mroute states, but these are not functioning correctly. R10 can only add its own BiDir upstream to the incoming interface list, because it is not running DF election on its interfaces.

Additionally, R5 cannot send a PIM Join towards R10 for the (*, 239.1.1.1) entry. This appears to be because R5 knows that R10 is not BiDir capable, so it will not use its as the RPF neighbor. Strangely, R5 does still use R10 as the RPF neighbor for the /24 entries.

Traffic can flow neither down or up the shared tree.

What if R10 enables PIM-BiDir but treats the group as non-BiDir?

What if R10 does enable PIM-BiDir but it treats 239.1.1.0/24 as non-BiDir? Let’s test this out by removing BSR in our network so we can define the RP statically on each router.

#R5-R10, R1-R2
ip pim bidir-enable
ip pim rp-address 1.0.0.9 bidir

#XR1-4
router pim
 address-family ipv4
  rp-address 1.0.0.9 bidir

#XR4
router pim
 address-family ipv4
  no bsr candidate-bsr 1.0.0.14
  no bsr candidate-rp 1.0.0.14 group-list XR4_BIDIR_GROUP bidir

#R9
no ip pim bsr-candidate lo0
no ip pim rp-candidate Loopback0 group-list R9_BIDIR_GROUP bidir

After the RP information cached from BSR times out, we should be left with only a single static RP mapping on all routers.

On R10 we’ll now set the RP as non-bidir mode:

#R10
no ip pim rp-address 1.0.0.9 bidir
ip pim rp-address 1.0.0.9

The same symptoms appear. R5 sees that R10 is not participating in a DF election for RP 1.0.0.9. So R5 does not use R10 as the RPF neighbor for its (*, 239.1.1.1) entry. Therefore traffic downstream from the RP does not get delivered to R2. Additionally, traffic cannot travel upstream through R10, because R10 has no (*, G) state to match the traffic against.

A note on using PIM-SM with PIM-BiDir

PIM-SM and PIM-BiDir can co-exist in the network without any issues. However, on IOS-XE you cannot use the same loopback as the RP for both SM and BiDir at the same time. This is because the command show ip pim rp-candidate Lo0 will override the previous command. For example:

ip pim rp-candidate Loopback0 group-list PIM_SM
ip pim rp-candidate Loopback0 group-list PIM_BIDIR bidir

This becomes just:

ip pim rp-candidate Loopback0 group-list PIM_BIDIR bidir

Instead, you need to use two separate loopbacks:

ip pim rp-candidate Loopback0 group-list PIM_SM
ip pim rp-candidate Loopback1 group-list PIM_BIDIR bidir

Note that this is also the case for static RP and AutoRP.

ip pim rp-add 1.0.0.9 PIM_SM
ip pim rp-add 1.0.0.9 PIM_BIDIR bidir  <---- This just replaces the previous command

ip pim send-rp-announce lo0 scope 255 group-list PIM_SM
ip pim send-rp-announce lo0 scope 255 group-list PIM_BIDIR bidir <---- This just replaces the previous command

However, on IOS-XR, this is not an issue. You can reuse the same loopback address for both modes.

router pim
 address-family ipv4
  rp-address 1.0.0.14 PIM_SM
  rp-address 1.0.0.14 PIM_BIDIR bidir
  auto-rp candidate-rp Loopback0 scope 255 group-list PIM_SM interval 60
  auto-rp candidate-rp Loopback0 scope 255 group-list PIM_BIDIR interval 60 bidir
  bsr candidate-rp 1.0.0.14 group-list PIM_SM priority 192 interval 60
  bsr candidate-rp 1.0.0.14 group-list PIM_BIDIR priority 192 interval 60 bidir
PreviousPIM-SM with BSR for IPv6NextPIM-BiDir for IPv6

Last updated 1 month ago