SR-TE with AS Primary/Secondary Paths

Load basic.isis.sr.vpnv4.enabled.cfg

configure
load bootflash:basic.isis.sr.vpnv4.enabled.cfg
commit replace
y

VPNv4 is fully setup and working with CEs 101, 102, 107, 108.

Configure two SR-TE policies on R1 with R7 as the endpoint:

  • Color 20 uses an explicit path via R4

  • Color 10 uses a dynamic path based on TE metric

Configure R7 so that all traffic destined towards CE107 prefixes uses color 20 primarily, and falls back to color 10 if a path using color 20 cannot be calculated.

Answer

#R1
segment-routing
 traffic-eng
  segment-list R7_VIA_R4
   index 1 address ipv4 4.4.4.1
   index 2 address ipv4 7.7.7.1
  !
  policy R7_COLOR_10
   color 10 end-point ipv4 7.7.7.1
   candidate-paths preference 100 dynamic
  !
  policy R7_COLOR_20
   color 20 end-point ipv4 7.7.7.1
   candidate-paths
    preference 100
     explicit segment-list R7_VIA_R4
!
router isis 1
 distribute link-state

#R7
extcommunity-set opaque COLOR10
  10
end-set
!
extcommunity-set opaque COLOR20
  20
end-set
!
route-policy CE107_IN
  set extcommunity color COLOR10 additive
  set extcommunity color COLOR20 additive
end-policy
!
router bgp 100
 vrf BLUE
  neighbor 192.168.107.107
   address-family ipv4 unicast
    route-policy CE107_IN in
!
router isis 1
 add ipv4 uni
  mpls traffic-eng router-id lo1
  mpls traffic-eng level-2
!
mpls traffic-eng

Explanation

When BGP serivce routes contain multiple colors, the valid path with the highest color is used. This allows for primary/backup SR-TE steering. R7 can set multiple colors, and the highest color will be used by default. But if a valid SR-TE policy for that color does not exist, the next color is tried. If no valid SR-TE policies exist for any of the attached colors, the IGP path is simply used.

To set multiple colors with an RPL, we seem to require the additive keyword on multiple set lines. It does not appear you can set multiple colors in a single line.

#R7
extcommunity-set opaque COLOR10
  10
end-set
!
extcommunity-set opaque COLOR20
  20
end-set
!
route-policy CE107_IN
  set extcommunity color COLOR10 additive
  set extcommunity color COLOR20 additive
end-policy

R1 will receive the BGP service routes with multiple colors attached. Notice that SR policy color 20 is used:

We can cause the color 20 policy to become invalid by removing R4’s prefix SID from its loopback. This will cause the first SID descriptor in the segment-list to fail to be resolved to a label (4.4.4.1).

#R4
router isis 1
 interface Loopback1
  address-family ipv4 unicast
   no prefix-sid index 4

The BGP service route now uses the color 10 policy:

Last updated