# Full Mesh Dynamic Auto-Tunnels

Load **mpls.te.base.config.with.ospf.cfg**

```
#IOS-XE
config replace flash:mpls.te.base.config.with.ospf.cfg

#IOS-XR
configure
load bootflash:mpls.te.base.config.with.ospf.cfg
commit replace
y
```

Using the full mesh dynamic auto-tunnel feature, configure CSR4, CSR5, and CSR8 for a full mesh of TE tunnels. Do not use an ACL to specify the tunnel destinations on the routers. They should dynamically learn of the TE tunnel endpoints.

## Answer <a href="#id-336cd891-bed9-4494-b8b2-e5392258561c" id="id-336cd891-bed9-4494-b8b2-e5392258561c"></a>

```
#CSR4, 5, 8

mpls traffic-eng auto-tunnel mesh
!
interface Auto-Template1
 ip unnumbered Loopback0
 tunnel mode mpls traffic-eng
 tunnel destination mesh-group 10
 tunnel mpls traffic-eng path-option 1 dynamic
 tunnel mpls traffic-eng autoroute announce
!
router ospf 1
 mpls traffic-eng mesh-group 10 lo0 area 0
```

## Explanation <a href="#id-2527b04d-e307-4a84-80c1-735ab421147e" id="id-2527b04d-e307-4a84-80c1-735ab421147e"></a>

Using auto-tunnel mesh with OSPF is even more scalable than regular auto-tunnel mesh. With “regular” auto-tunnel mesh, we must specify the tunnel destinations using an ACL. This ACL is referenced by the auto-template tunnel destination.

IOS-XE supports doing dynamic discovery of auto-tunnel mesh endpoints using OSPF. XRv does not support this. This feature is also not supported in ISIS. The router advertises a type 4 Opaque-Area LSA (router information) that includes the mesh-group and its loopback IP address. Any other routers that have an auto-template using the mesh-group number as a the tunnel destination build a dynamic tunnel to the specified IP address in the LSA.

For example, we can see R8’s advertised type 4 Opaque-Area LSA which advertises the mesh group (10) and Lo0 address:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FVA9ajBcN2jLJUw7NwwAN%2Fimage.png?alt=media&#x26;token=d982e2b9-2404-4579-9f79-bf3f6f5126a5" alt=""><figcaption></figcaption></figure></div>

This is very similar to BGP auto-discovery of VPN endpoints, for example for VPLS or EVPN.

We can prove that IOS-XR does not support this feature because it cannot decode the TLV in R8’s Router Information Opaque-Area LSA:

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FbJl5vDkX0lqqUXPb0Q02%2Fimage.png?alt=media&#x26;token=2b03ed69-2128-4b78-a335-9f69fc3575b0" alt=""><figcaption></figcaption></figure></div>

CSR4, CSR5, and CSR8 should now have a full mesh of tunnels. We were able to use the exact same config template on all routers, which is extremely scalable from a configuration standpoint. (Although not very scalable in terms of state in the network for a full mesh of TE tunnels). But the drawback is that this is not supported on IOS-XR.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FUWQRBQ6UmboEO2CVcPzM%2Fimage.png?alt=media&#x26;token=11005e86-2b6c-42c2-bbe5-9032d6a72310" alt=""><figcaption></figcaption></figure></div>
