# DMZ Link BW Lab2

**Topology**: russo-spv4

<figure><img src="/files/chh3Zxizcro0weNNfghm" alt=""><figcaption></figcaption></figure>

Load **bgp-dmz-bw\.init.cfg**

```
#R1-R10
config replace flash:bgp-dmz-bw.init.cfg

#XR11-14
configure
load bootflash:bgp-dmz-bw.init.cfg
commit replace
y
```

The core, BGP, etc, is all pre-configured.

<figure><img src="/files/fmfwCP0xMxy4dQmUnsVj" alt=""><figcaption></figcaption></figure>

Configure DMZ-link bandwidth for AS 173 so that traffic from XR4 towards AS 137 is load shared in a 2:1 ratio between CSR4 (2) and XR1 (1). Do this for all address-families (ipv4/ipv6/vpnv4/vpnv6).

## Answer <a href="#id-514507b4-efa7-41e9-8652-991b5e52733e" id="id-514507b4-efa7-41e9-8652-991b5e52733e"></a>

```
#R4
int Gi2.546
 bandwidth 2000000
!
router bgp 173
 address-family ipv4
  neighbor 10.4.6.6 dmzlink-bw
  neighbor 173.0.0.14 send-community both
 exit-address-family
 !
 address-family vpnv4
  neighbor 10.4.6.6 dmzlink-bw
 exit-address-family
 !
 address-family ipv6
  neighbor 173.0.0.14 send-community both
  neighbor FD00:10:4:6::6 dmzlink-bw
 exit-address-family
 !
 address-family vpnv6
  neighbor 10.4.6.6 dmzlink-bw
 exit-address-family

#XR1
int GigabitEthernet0/0/0/0.571
 bandwidth 1000
!
router bgp 173
 neighbor 10.7.11.7
  dmz-link-bandwidth
 neighbor fd00:10:7:11::7
  dmz-link-bandwidth

#XR4
router bgp 173
 address-family ipv4 unicast
  maximum-paths ibgp 2 unequal-cost
 address-family ipv6 unicast
  maximum-paths ibgp 2 unequal-cost
 vrf DMZ
  address-family ipv4 unicast
   maximum-paths ibgp 2 unequal-cost
  address-family ipv6 unicast
   maximum-paths ibgp 2 unequal-cost
```

## Explanation/Verification <a href="#a0c3477b-0068-406c-ae7f-76d915c4db57" id="a0c3477b-0068-406c-ae7f-76d915c4db57"></a>

Enabling UCMP on IOS-XR is a little easier than on IOS-XE. First, IOS-XR fully supports DMZ link-BW UCMP for all address-families. But in this lab, on XR4 there is an additional configuration we must do. By default, XR4 has a lower IGP cost to XR1 (2) versus CSR4 (3). We must either make these equal, or better yet, tell the router to ignore the IGP cost and allow multipath for unequal-cost nexthops.

```
#XR4
router bgp 173
 address-family ipv4 unicast
  maximum-paths ibgp 2 unequal-cost
 address-family ipv6 unicast
  maximum-paths ibgp 2 unequal-cost
 vrf DMZ
  address-family ipv4 unicast
   maximum-paths ibgp 2 unequal-cost
  address-family ipv6 unicast
   maximum-paths ibgp 2 unequal-cost
```

We must deal with the IOS-XE & IOS-XR interoperability issue for the DMZ BW extcommunity value. R4 will present the value in the BGP table as kilobytes (250,000 KB):

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

However, R4 will send this value (250,000) to XR4. XR4 will consider this as bytes per second, and display it in kbps in the CLI. 250,000 bytes = 2,000,000 bits = 2,000 kbps.

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

Above, we can see that XR1’s LB extcommunity value is easier to understand. 1,000 kbps was converted to a value of 125,000 bytes in the extcommunity value. XR4 converts this back to 1,000 kbps (1Mbps).

As you can see, this causes any link BW reported from an IOS-XE router to an XR router to be translated into a *much* lower value than it should be. And likewise, an XR value sent to an XE router is translated to a much higher value than it should be.

On XR4 we can verify that UCMP is working for all address-families. First we’ll check global IPv4 and IPv6.

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

We can also see the hash buckets in the FIB. I’m not exactly sure why there are so many, but it appears to be 42:21 which reduces to 2:1.

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

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

Lastly we can check routes for the DMZ VRF.

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

The verbose CEF output looks the same as above, so it is not displayed here.


---

# 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/dmz-link-bw-lab2.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.
