SRv6 uSID w/ SR-TE
Load top1.vpnv4v6.srv6.usid.configured.cfg
#IOS-XR
configure
load top1.vpnv4v6.srv6.usid.configured.cfg
commit replace
y
#IOS-XE
config replace flash:top1.vpnv4v6.srv6.usid.configured.cfg
L3VPN for IPv4 and IPv6 is currently functional using SRv6 uSID in the core.
Configure XR9 and XR10 as PCEs and XR5, XR6, XR7 and XR8 as PCE clients.
The PCEP session should use IPv6.
Configure XR9 as the primary PCE.
Configure the XR1-XR3 link with high latency.
Color BGP routes received from CSR3 for low-latency ODN SR-TE.
The policy should be calculated via PCEP.
Traffic from CSR1 to CSR3 should take the path CSR1-XR5-XR1-XR2-XR4-XR7-CSR3
Answer
#XR9
pce
address ipv6 2001:db8:200::9
!
router isis 1
distribute link-state
#XR10
pce
address ipv6 2001:db8:200::a
!
router isis 1
distribute link-state
#XR5, XR6, XR7, XR8
segment-routing
traffic-eng
on-demand color 10
srv6
locator CCIE binding-sid dynamic behavior ub6-insert-reduced
!
dynamic
pcep
!
metric
type latency
!
pcc
source-address ipv6 2001:db8:200::<R#>
pce address ipv6 2001:db8:200::9
precedence 100
!
pce address ipv6 2001:db8:200::a
precedence 200
#XR1, XR3
performance-measurement
interface GigabitEthernet0/0/0/0.3013
delay-measurement
advertise-delay 1000000
#XR7
extcommunity-set opaque COLOR_10
10
end-set
!
route-policy SET_COLOR
set extcommunity color COLOR_10
end-policy
!
router bgp 100
vrf CUSTOMER
address-family ipv4 unicast
redistribute ospf CUSTOMER route-policy SET_COLOR
!
address-family ipv6 unicast
redistribute ospfv3 CUSTOMER route-policy SET_COLOR
Explanation
Using SRv6 with uSID allows us to use SR-TE which we are already familiar with. Everything works very similarly to using SR-TE with SR-MPLS. The main difference is that you must define the locator for the policy, and specify that the router will allocate a SID with behavior uB6-insert-reduced SRH.
segment-routing
traffic-eng
on-demand color 10
srv6
locator CCIE binding-sid dynamic behavior ub6-insert-reduced
Otherwise, everything else should already be familiar. First we configure PCEP. R9 will be primary PCE by giving it a lower precedence value.
#PCC
segment-routing
traffic-eng
pcc
source-address ipv6 2001:db8:200::<R#>
pce address ipv6 2001:db8:200::9
precedence 100
!
pce address ipv6 2001:db8:200::a
precedence 200
#PCE
pce
address ipv6 2001:db8:200::<R#>
!
router isis 1
distribute link-state
If we forget whether a higher or lower value is best, we can use the below show command to verify which PCE is being preferred:

On the egress PE, we set the color on the VPN routes. CSR3 is running OSPF as the PE-CE protocol, so XR7 sets the color as the routes are redistributed from OSPF into BGP.
#XR7
extcommunity-set opaque COLOR_10
10
end-set
!
route-policy SET_COLOR
set extcommunity color COLOR_10
end-policy
!
router bgp 100
vrf CUSTOMER
address-family ipv4 unicast
redistribute ospf CUSTOMER route-policy SET_COLOR
!
address-family ipv6 unicast
redistribute ospfv3 CUSTOMER route-policy SET_COLOR
We also set the latency value on the XR1-XR3 link to be high. Even though no other links have latency configured, the TE metric appears to be substituted for the latency value, so the policy will still be able to be calculated.
#XR1, XR3
performance-measurement
interface GigabitEthernet0/0/0/0.3013
delay-measurement
advertise-delay 1000000
Finally, we set the ODN policy on the ingress PEs.
segment-routing
traffic-eng
on-demand color 10
srv6
locator CCIE binding-sid dynamic behavior ub6-insert-reduced
!
dynamic
pcep
!
metric
type latency
XR5, upon receiving the colored route, asks the PCE to calculate an associated policy. This is successful, as we see on R9:

The details show us that the first SID is R2, and last is R7:

XR5 allocates a Binding SID for the policy, and reports it to both XR9 and XR10 (for redundancy).
There does not appear to be a way to verify the actual carrier SID that will be produced by this policy. In the CEF table we can see that the ultimate encapsulation uses fd00:0:7:e003, with the SRv6 SID fd00:0:2:: being inserted:

By taking a pcap, we can see that the destination address is the correct compressed CSID:

Further exploring the ODN policy
I found that the following config does not work.
segment-routing
traffic-eng
srv6
locator CCIE binding-sid dynamic behavior ub6-insert-reduced
!
on-demand color 10
dynamic
pcep
!
metric
type latency
The ODN policy does not come up until I specify srv6 under the ODN policy. It appears that without srv6 under the ODN policy, there is no way for the router to know that it is not an SR-MPLS policy.
segment-routing
traffic-eng
srv6
locator CCIE binding-sid dynamic behavior ub6-insert-reduced
!
on-demand color 10
srv6
!
dynamic
pcep
!
metric
type latency
Alternatively, I can just define the locator directly under the ODN policy itself.
segment-routing
traffic-eng
on-demand color 10
srv6
locator CCIE binding-sid dynamic behavior ub6-insert-reduced
!
dynamic
pcep
!
metric
type latency
Last updated