> For the complete documentation index, see [llms.txt](https://ccie-sp.gitbook.io/ccie-spv5.1-labs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ccie-sp.gitbook.io/ccie-spv5.1-labs/labs/multicast/pim-bidir-for-ipv6.md).

# PIM-BiDir for IPv6

Load **multicast.init.cfg**

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

Configure XR4 as the RP for all IPv6 multicast groups. Advertise the RP mapping using BSR. Use BiDir for these groups.

## Answer <a href="#fbf84b44-8ef7-4d25-9df9-0fbfb2a2977e" id="fbf84b44-8ef7-4d25-9df9-0fbfb2a2977e"></a>

```
#XR4
multicast-routing
 address-family ipv6
  interface Loopback0 enable
!
router pim
 address-family ipv6
  bsr candidate-bsr 2001::14
  bsr candidate-rp 2001::14 bidir
```

## Explanation <a href="#id-7688d994-f023-4fc5-8744-a2b71748fe78" id="id-7688d994-f023-4fc5-8744-a2b71748fe78"></a>

PIM-BiDir for IPv6 works the same way as IPv4. The DF election is used to ensure a loop free topology for upstream traffic that is unconditionally forwarded towards the RP.

To begin, we can confirm that we learn the RP mapping via BSR, and that XR4 identified as the RP in bidir mode. For IPv6 PIM, BiDir support is enabled by default on both IOS-XE and IOS-XR. The **BD** flag appears to mean BiDir.

<div align="left"><figure><img src="/files/QMhdboZ8Z3Qs6Yb9v6Ux" alt=""><figcaption></figcaption></figure></div>

<div align="left"><figure><img src="/files/3U5D2NQlOZcEV0rfBa7l" alt=""><figcaption></figcaption></figure></div>

To make this simpler, we will just join a group from R5’s loopback. This mimicks a host joining on a physical interface.

```
#R5
int lo0
 ipv6 mld join-group ff08::5
```

We see on the RP that the tree is built to the receiver and the outgoing interface is the link to XR1.

<div align="left"><figure><img src="/files/AhdhXXI64Q3GUK6e47fM" alt=""><figcaption></figcaption></figure></div>

Let’s now ping this group from R1:

<div align="left"><figure><img src="/files/ZWgbcdcTSJnwXvxL0AxF" alt=""><figcaption></figcaption></figure></div>

At R7, the traffic is forwarded towards the BiDir RP unconditionally. Interestingly, we see no entries at all under **show ipv6 mroute** or **show ipv6 pim topology**. However, we can see the ff00::/8 BiDir entry using **show ipv6 mrib route**:

<div align="left"><figure><img src="/files/9U3kJr37sQD5pRRovRWV" alt=""><figcaption></figcaption></figure></div>

R7 is accepting on all interfaces that are DF or upstream interfaces, and only forwarding out the upstream interface. Just like BiDir for IPv4, we can check the DF election results. R7 did not win the DF election with XR1, so this interface is not available as an incoming interface.

<div align="left"><figure><img src="/files/wCSSHDYt2qqXvagvhocf" alt=""><figcaption></figcaption></figure></div>

A similar command can be used on IOS-XR:

<div align="left"><figure><img src="/files/zoCMqFVlR5o5eI1tYLhZ" alt=""><figcaption></figcaption></figure></div>

### A note on IPv6 PIM-SM with PIM-BiDir <a href="#id-956de98f-94fe-4260-b750-5998c815c6f9" id="id-956de98f-94fe-4260-b750-5998c815c6f9"></a>

For IPv4 on IOS-XE, we cannot use the same loopback for the RP for both PIM-SM and PIM-BIDIR. This is because the command overrides itself when you try to use the same loopback for two separate PIM RP commands.

This is again an issue for IPv6 when using BSR on IOS-XE.

```
ipv6 pim bsr candidate rp 2001::9 group-list PIM_SM_V6
ipv6 pim bsr candidate rp 2001::9 group-list PIM_BIDIR_V6 bidir <---- This just replaces the previous command
```

However, it is not an issue when using static IPv6 RP assignment on IOS-XE:

```
ipv6 pim rp-address 2001::7 PIM_SM_V6
ipv6 pim rp-address 2001::7 PIM_BIDIR_V6 bidir  <--- Both commands are taken
```

Like we saw for IPv4 on IOS-XR, IPv6 on IOS-XR allows both commands for either BSR or static RP.

```
router pim
 address-family ipv6
  rp-address 2001::14 PIM_SM_V6
  rp-address 2001::14 PIM_BIDIR_V6 bidir
!
! or
!
router pim
 address-family ipv6
  bsr candidate-rp 2001::14 group-list PIM_SM_V6 priority 192 interval 60
  bsr candidate-rp 2001::14 group-list PIM_BIDIR_V6 priority 192 interval 60 bidir
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ccie-sp.gitbook.io/ccie-spv5.1-labs/labs/multicast/pim-bidir-for-ipv6.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
