# Lab6 RR with Add-Path

Load **unix:lab6.init.cfg**

```
configure replace unix:lab6.init.cfg
```

R8 has been removed as an RR. R5 is setting LP=50 on routes received from R6, so that R4 is the preferred egress point in the core.

Configure add path so that R7 will reflect both a primary and backup path to all iBGP route reflector clients. On the clients, configure PIC so that the backup path is pre-installed as a repair route.

## Answer <a href="#d8206852-8b4a-49e2-8e85-ee22e24df124" id="d8206852-8b4a-49e2-8e85-ee22e24df124"></a>

<https://www.youtube.com/watch?v=8UHvzzMBGv0&list=PL3Y9eZjZCcsejbVWD3wJIePqe3NiImqxB&index=8>

```
#R7 (RR)
router bgp 65000
 add ipv4
  bgp additional-paths send receive
  bgp additional-paths select best 2
 add ipv6
  bgp additional-paths send receive
  bgp additional-paths select best 2
 !
 template peer-policy IBGP_V4V6
  advertise additional-paths best 2
 exit-peer-policy

#R2, R3, R4
router bgp 65000
 add ipv4
  bgp additional-paths send receive
  bgp additional-paths select best 2
  bgp additional-paths install
 add ipv6
  bgp additional-paths send receive
  bgp additional-paths select best 2
  bgp additional-paths install

#R5
router bgp 65000
 add ipv4
  bgp additional-paths send receive
  bgp additional-paths select best 2
  bgp additional-paths install
 add ipv6
  bgp additional-paths send receive
  bgp additional-paths select best 2
  bgp additional-paths install
 !
 template peer-policy IBGP_V4V6
  advertise additional-paths best 2
 exit-peer-policy
```

## Explanation <a href="#c4234583-7d2f-457f-9f71-51848ae31086" id="c4234583-7d2f-457f-9f71-51848ae31086"></a>

First we must enable the Add Path capability on all routers. This is a negotiated capability in the OPEN message, and once configured, the router will immediately tear down the existing session. The capability can be configured under the address-family (done above), or on a per-neighbor basis.

```
router bgp 65000
 add ipv4
  bgp additional-paths send receive
 add ipv6
  bgp additional-paths send receive

!
! or
!

router bgp 65000
!
template peer-policy IBGP_V4V6
  additional-paths send receive
 exit-peer-policy
```

The RR does not need to locally install a repair path. It only sends the best 2 routes (a primary and a backup route) to clients. To do this, we select the best 2, and advertise the best 2.

```
#R7 (RR)
router bgp 65000
 add ipv4
  bgp additional-paths select best 2
 add ipv6
  bgp additional-paths select best 2
 !
 template peer-policy IBGP_V4V6
  advertise additional-paths best 2
 exit-peer-policy
```

All RR clients except for R5 must select the best 2 and install them. They do not need to advertise additional paths to the RR.

```
#R2, R3, R4
router bgp 65000
 add ipv4
  bgp additional-paths select best 2
  bgp additional-paths install
 add ipv6
  bgp additional-paths select best 2
  bgp additional-paths install
```

R5 must additionally send the backup path, otherwise it hides its eBGP path from R7.

```
#R5
router bgp 65000
 template peer-policy IBGP_V4V6
  advertise additional-paths best 2
 exit-peer-policy
```

## Verification <a href="#id-3c76325a-bdc9-48db-bc29-8b301887bd42" id="id-3c76325a-bdc9-48db-bc29-8b301887bd42"></a>

On each iBGP session we should see that the add path capability has been negotiated, and that each router is capable of sending and receiving additional paths.

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

On R7, verify that it is receiving two paths for R6’s loopbacks. Each path is kept separate using a unique pathid (0x0 and 0x1). The paths via R5 have a lower LP, so these are the “best2” paths.

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

On each RR client, it will receive both paths from the RR. The path IDs are used by the Add Path feature to ensure that a second Update for the same prefix does not implicitly withdraw the first Update. The paths via R5 are used as repair routes.

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


---

# Agent Instructions: 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/bgp-multi-homing-xe/lab6-rr-with-add-path.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.
