# SR-TE Disjoint Planes using Anycast SIDs

Load **sr-te.dual.plane.init.cfg**

```
configure
load bootflash:sr-te.dual.plane.init.cfg
commit replace
y
```

<figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FBouPFjjzkAKP7u7Wc5UL%2Fimage.png?alt=media&#x26;token=3f8178d9-c3b3-4a04-9cff-e3d2e6003fe9" alt=""><figcaption></figcaption></figure>



The core routers (R3, R5, R4, R6, R9, R10) are in two separate “planes”: odd and even. The IGP costs have been adjusted so that core links between routers in different planes are high, but links connecting each PE to each plane are the same (10). Also, each router has already configured its TE RID and is distributing LS under the IGP.



Using Anycast SID, configure two policies on R1 for endpoint R7 as follows:

* Color 10 uses the “odd” plane
* Color 20 uses the “even” plane



R3, R5 and R9 should use 101.101.101.1/32 as the anycast address. R4, R6 and R10 should use 100.100.100.1/32 as the anycast address.













































## Answer <a href="#ddde74c6-06dc-4d7f-8ca8-fd9e24b12964" id="ddde74c6-06dc-4d7f-8ca8-fd9e24b12964"></a>

```
#R3, R5, R9
int lo101
 ip add 101.101.101.1/32
!
router isis 1
 int lo101
  add ipv4 uni
   prefix-sid index 101 n-flag-clear

#R4, R6, R10
int lo100
 ip add 100.100.100.1/32
!
router isis 1
 int lo100
  add ipv4 uni
   prefix-sid index 100 n-flag-clear

#R1
segment-routing traffic-eng
 segment-list R7_VIA_ODD
  index 1 address ipv4 101.101.101.1
  index 2 address ipv4 7.7.7.1
 !
 segment-list R7_VIA_EVEN
  index 1 address ipv4 100.100.100.1
  index 2 address ipv4 7.7.7.1
 !
 policy R7_VIA_ODD
  color 10 end-point ipv4 7.7.7.1
  candidate-paths pref 100
   explicit segment-list R7_VIA_ODD 
 !
 policy R7_VIA_EVEN
  color 20 end-point ipv4 7.7.7.1
  candidate-paths pref 100
   explicit segment-list R7_VIA_EVEN
```



## Explanation <a href="#eba3268d-9e7b-418a-90f2-e7148051101f" id="eba3268d-9e7b-418a-90f2-e7148051101f"></a>

This topology is “dual plane” because we have two separate network planes: even nodes, and odd nodes. Link metrics between nodes of each plane are set high to discourage traffic crossing over from one plane to another. Only in the event of multiple link failures will traffic cross over.



To start, we configure Anycast SIDs for each plane: 100.100.100.1/32 for all even nodes, and 101.101.101.1/32 for all odd nodes. Remember to clear the N flag for an Anycast SID.

```
#R3, R5, R9
int lo101
 ip add 101.101.101.1/32
!
router isis 1
 int lo101
  add ipv4 uni
   prefix-sid index 101 n-flag-clear

#R4, R6, R10
int lo100
 ip add 100.100.100.1/32
!
router isis 1
 int lo100
  add ipv4 uni
   prefix-sid index 100 n-flag-clear
```



Next, we can use explicit paths on R1 which simply use either one of these Anycast SIDs as the first index, and R7 as the last index. Once traffic is on the correct plane, it can simply be IGP-routed towards R7.

```
#R1
segment-routing traffic-eng
 segment-list R7_VIA_ODD
  index 1 address ipv4 101.101.101.1
  index 2 address ipv4 7.7.7.1
 !
 segment-list R7_VIA_EVEN
  index 1 address ipv4 100.100.100.1
  index 2 address ipv4 7.7.7.1
 !
 policy R7_VIA_ODD
  color 10 end-point ipv4 7.7.7.1
  candidate-paths pref 100
   explicit segment-list R7_VIA_ODD 
 !
 policy R7_VIA_EVEN
  color 20 end-point ipv4 7.7.7.1
  candidate-paths pref 100
   explicit segment-list R7_VIA_EVEN
```



## Verification <a href="#id-350de66c-6c25-42a8-9609-9ed82b89f44a" id="id-350de66c-6c25-42a8-9609-9ed82b89f44a"></a>

We can see that both policies are up, and that R1 correctly resolved the MPLS label for each SID descriptor (IP address):

<figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FGZBLOSbpFHGpkJx0k2mb%2Fimage.png?alt=media&#x26;token=e04a67f2-f32e-41e0-9835-4378e23a95bd" alt=""><figcaption></figcaption></figure>



If we look at the forwarding details for these policies, we can see the next hop is correct for each one. The ODD policy has a nexthop of R3, and the EVEN policy has a nethop of R4.

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FwCTnSdquVOc1QrYN0iwn%2Fimage.png?alt=media&#x26;token=407152c4-35fe-473d-b687-4d5d952a370b" alt=""><figcaption></figcaption></figure></div>



By setting the corresponding color on routes advertised from R7, we can verify the policies are working correctly:

```
#R7
extcommunity-set opaque TEST
  10
end-set
!
route-policy TEST
  set extcommunity color TEST
end-policy
!
router bgp 100
 vrf BLUE
  neighbor 192.168.107.107
   address-family ipv4 unicast
    route-policy TEST in
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FPdISzvF6PzsSAGupPHyO%2Fimage.png?alt=media&#x26;token=246fdec6-c123-4ae0-a2da-d9962eb862b6" alt=""><figcaption></figcaption></figure></div>



```
#R7
extcommunity-set opaque TEST
  20
end-set
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2F2lOypL7CFxZJoZSWCHeY%2Fimage.png?alt=media&#x26;token=b7e7f8d1-59e2-4514-9e98-1011000f88d6" alt=""><figcaption></figcaption></figure></div>



### Summary <a href="#id-23769ae5-8bda-4992-aa68-5b0bca3e813e" id="id-23769ae5-8bda-4992-aa68-5b0bca3e813e"></a>

This method does not seem particularly scalable, as you cannot use ODN. Instead, configuring link colors (affinity) different for links in each plane might be an easier way to get this behavior with ODN policies, so that you don’t need a “full mesh” of SR-TE policies between all PEs.
