The following examples show end-to-end configurations used in implementing SR-ODN on the head-end router.
Configuring ODN Color Templates: Example
Configure ODN color templates on routers acting as SRv6-TE head-end nodes. The following example shows various ODN color templates:
-
color 20: minimization objective = te-metric; path computation at SR-PCE
-
color 30: minimization objective = delay-metric; path computation at SR-PCE
-
color 40: minimization objective = igp-metric; path computation at SR-PCE
-
color 50: minimization objective = igp-metric; path computation at SR-PCE; constraints = affinity
Configure the global SRv6 locator and BSID behavior:
Node1(config)# segment-routing
Node1(config-sr)# traffic-eng
Node1(config-sr-te)# srv6
Node1(config-sr-te-srv6)# locator Node1 binding-sid dynamic behavior ub6-insert-reduced
Node1(config-sr-te-srv6)# exit
Configure ODN color template 20 with TE metric:
Node1(config-sr-te)# on-demand color 20
Node1(config-sr-te-color)# srv6
Node1(config-sr-te-color-srv6)# exit
Node1(config-sr-te-color)# dynamic pcep
Node1(config-sr-te-color-dyn-pce)# exit
Node1(config-sr-te-color-dyn)# metric type te
Node1(config-sr-te-color-dyn)# exit
Node1(config-sr-te-color)# exit
Node1(config-sr-te)#
Configure ODN color template 30 with delay metric:
Node1(config-sr-te)# on-demand color 30
Node1(config-sr-te-color)# srv6
Node1(config-sr-te-color-srv6)# exit
Node1(config-sr-te-color)# dynamic pcep
Node1(config-sr-te-color-dyn-pce)# exit
Node1(config-sr-te-color-dyn)# metric type latency
Node1(config-sr-te-color-dyn)# exit
Node1(config-sr-te-color)# exit
Node1(config-sr-te)#
Configure ODN color template 40 with IGP metric:
Node1(config-sr-te)# on-demand color 40
Node1(config-sr-te-color)# srv6
Node1(config-sr-te-color-srv6)# exit
Node1(config-sr-te-color)# dynamic pcep
Node1(config-sr-te-color-dyn-pce)# exit
Node1(config-sr-te-color-dyn)# metric type igp
Node1(config-sr-te-color-dyn)# exit
Node1(config-sr-te-color)# exit
Node1(config-sr-te)#
Configure ODN color template 50 with IGP metric and affinity constraint:
Node1(config-sr-te)# on-demand color 50
Node1(config-sr-te-color)# srv6
Node1(config-sr-te-color-srv6)# exit
Node1(config-sr-te-color)# dynamic pcep
Node1(config-sr-te-color-dyn-pce)# exit
Node1(config-sr-te-color-dyn)# metric type igp
Node1(config-sr-te-color-dyn)# affinity exclude-any name brown
Node1(config-sr-te-color-dyn)# commit
Running Config
segment-routing
traffic-eng
srv6
locator Node1 binding-sid dynamic behavior ub6-insert-reduced
!
on-demand color 20
dynamic
pcep
!
metric
type te
!
!
!
on-demand color 30
srv6
!
dynamic
pcep
!
metric
type latency
!
!
!
on-demand color 40
srv6
!
dynamic
pcep
!
metric
type igp
!
!
!
on-demand color 50
srv6
!
dynamic
pcep
!
metric
type igp
!
affinity
exclude-any
name brown
!
!
!
!
!
!
Configuring BGP Color Extended Community Set: Example
The following example shows how to configure BGP color extended communities that are later applied to BGP service routes via
route-policies.
Note
|
In most common scenarios, egress PE routers that advertise BGP service routes apply (set) BGP color extended communities.
However, color can also be set at the ingress PE router.
|
Router(config)# extcommunity-set opaque color20-te
Router(config-ext)# 20
Router(config-ext)# end-set
Router(config)# extcommunity-set opaque color30-delay
Router(config-ext)# 30
Router(config-ext)# end-set
Router(config)# extcommunity-set opaque color40-igp
Router(config-ext)# 40
Router(config-ext)# end-set
Router(config)# extcommunity-set opaque color50-igp-excl-brown
Router(config-ext)# 50
Router(config-ext)# end-set
Running Config
extcommunity-set opaque color20-te
20
end-set
!
extcommunity-set opaque color30-delay
30
end-set
!
extcommunity-set opaque color40-igp
40
end-set
!
extcommunity-set opaque color50-igp-exclude-brown
50
end-set
Configuring RPL to Set BGP Color (Layer-3 Services): Examples
The following example shows various representative RPL definitions that set BGP color community.
Node1(config)# route-policy SET_COLOR_LOW_TE
Node1(config-rpl)# set extcommunity color color20-te
Node1(config-rpl)# pass
Node1(config-rpl)# end-policy
Node1(config)# route-policy SET_COLOR_LOW_LATENCY
Node1(config-rpl)# set extcommunity color color30-delay
Node1(config-rpl)# pass
Node1(config-rpl)# end-policy
Node1(config)# route-policy SET_COLOR_HI_BW
Node1(config-rpl)# set extcommunity color color40-igp
Node1(config-rpl)# pass
Node1(config-rpl)# end-policy
Node1(config)# route-policy SET_COLOR_HI_BW_exclude-brown
Node1(config-rpl)# set extcommunity color color50-igp-exclude-brown
Node1(config-rpl)# pass
Node1(config-rpl)#end-policy
Running Config
route-policy SET_COLOR_LOW_TE
set extcommunity color color20-te
pass
end-policy
!
route-policy SET_COLOR_LOW_LATENCY
set extcommunity color color30-delay
pass
end-policy
!
route-policy SET_COLOR_HI_BW
set extcommunity color color40-igp
pass
end-policy
!
route-policy SET_COLOR_HI_BW_exclude-brown
set extcommunity color color50-igp-exclude-brown
pass
end-policy
Applying RPL to BGP Services (Layer-3 Services): Example
The following example shows various RPLs that set BGP color community being applied to BGP Layer-3 VPN services (VPNv4/VPNv6)
and BGP global.
vrf vrf_cust1
address-family ipv4 unicast
import route-target
100:1
!
export route-policy SET_COLOR_LOW_TE
export route-target
1:1
100:1
!
!
!
vrf vrf_cust2
address-family ipv4 unicast
import route-target
100:2
!
export route-policy SET_COLOR_LOW_LATENCY
export route-target
100:2
!
!
!
vrf vrf_cust3
address-family ipv4 unicast
import route-target
100:3
!
export route-policy SET_COLOR_HI_BW
export route-target
100:3
!
!
!
vrf vrf_cust4
address-family ipv4 unicast
import route-target
100:4
!
export route-policy SET_COLOR_HI_BW_exclude-brown
export route-target
100:4
!
!
!
vrf vrf_cust5
address-family ipv4 unicast
import route-target
100:5
!
export route-target
100:5
!
!
!
vrf vrf_cust6
address-family ipv6 unicast
import route-target
100:6
!
export route-policy SET_COLOR_HI_BW_exclude-brown
export route-target
100:6
!
!
!
Verifying BGP VRF Information
Use the show bgp vrf command to display BGP prefix information for VRF instances. The following output shows the BGP VRF table including a prefix
(12.4.4.4/32) with color 20 advertised by router cafe:0:4::4.
Node1# show bgp vrf vrf_cust1 unicast
BGP VRF vrf_cust1, state: Active
BGP Route Distinguisher: 100:1
VRF ID: 0x60000002
BGP router identifier 1.1.1.1, local AS number 100
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0000011 RD version: 100
BGP main routing table version 112
BGP NSR Initial initsync version 21 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 100:1 (default for vrf vrf_cust1)
*> 12.1.1.1/32 0.0.0.0 0 32768 ?
*>i12.4.4.4/32 cafe:0:4::4 C:20 0 100 0 ?
*>i12.5.5.5/32 cafe:0:5::5 C:20 0 100 0 ?
Processed 3 prefixes, 3 paths
The following output displays the details for prefix 12.4.4.4/32. Note the presence of BGP extended color community 20, and
that the prefix is associated with an SR policy with color 20 and BSID value of cafe:0:1:e011::.
Node1# show bgp vrf vrf_cust1 ipv4 unicast 12.4.4.4/32
BGP routing table entry for 12.4.4.4/32, Route Distinguisher: 100:1
Versions:
Process bRIB/RIB SendTblVer
Speaker 100 100
Last Modified: Nov 2 15:38:08.744 for 01:30:05
Paths: (2 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
cafe:0:4::4 C:20 (bsid: cafe:0:1:e011::) (metric 30) from cafe:0:4::4 (1.1.1.4)
Received Label 0xe0020
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 49
Extended community: Color:20 RT:1:1 RT:100:1
SR policy color 20, up, registered, bsid cafe:0:1:e011::, if-handle 0x00000000
PSID-Type:L3, SubTLV Count:1
SubTLV:
T:1(Sid information), Sid:cafe:0:4::, Behavior:63, SS-TLV Count:1
SubSubTLV:
T:1(Sid structure):
Source AFI: VPNv4 Unicast, Source VRF: vrf_cust1, Source Route Distinguisher: 100:1
Path #2: Received by speaker 0
Not advertised to any peer
Local, (received-only)
cafe:0:4::4 C:20 (bsid: cafe:0:1:e011::) (metric 30) from cafe:0:4::4 (1.1.1.4)
Received Label 0xe0020
Origin incomplete, metric 0, localpref 100, valid, internal, import-candidate, not-in-vrf
Received Path ID 0, Local Path ID 0, version 0
Extended community: Color:20 RT:1:1 RT:100:1
SR policy color 20, up, registered, bsid cafe:0:1:e011::, if-handle 0x00000000
PSID-Type:L3, SubTLV Count:1
SubTLV:
T:1(Sid information), Sid:cafe:0:4::, Behavior:63, SS-TLV Count:1
SubSubTLV:
T:1(Sid structure):
Verifying Forwarding (CEF) Table
Use the show cef vrf command to display the contents of the CEF table for the VRF instance. Note that prefix 12.4.4.4/32 points to the BSID label
corresponding to an SR policy.
Node1# show cef vrf vrf_cust1
Tue Nov 2 17:08:32.439 UTC
Prefix Next Hop Interface
------------------- ------------------- ------------------
0.0.0.0/0 drop default handler
0.0.0.0/32 broadcast
12.1.1.1/32 receive Loopback100
12.4.4.4/32 cafe:0:1:e011:: (via-srv6-sid) <recursive>
12.5.5.5/32 cafe:0:1:e00c:: (via-srv6-sid) <recursive>
224.0.0.0/4 0.0.0.0/32
224.0.0.0/24 receive
255.255.255.255/32 broadcast
The following output displays CEF details for prefix 12.4.4.4/32. Note that the prefix is associated with an SR policy with
BSID value of cafe:0:1:e011::.
Node1# show cef vrf vrf_cust1 12.4.4.4/32
12.4.4.4/32, version 14, SRv6 Headend, internal 0x5000001 0x30 (ptr 0x791e024c) [1], 0x0 (0x0), 0x0 (0x88f0c720)
Updated Nov 2 15:38:08.611
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via local-srv6-sid cafe:0:1:e011::, 3 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0x78edbaf4 0x0]
recursion-via-/64
next hop VRF - 'default', table - 0xe0800000
next hop cafe:0:1:e011:: via cafe:0:1:e011::/64
SRv6 H.Encaps.Red SID-list {cafe:0:4:e002::}
Verifying SR Policy
Use the show segment-routing traffic-eng policy command to display SR policy information.
The following outputs show the details of an on-demand SR policy that was triggered by prefixes with color 20 advertised by
node cafe:0:4::4.
Node1# show segment-routing traffic-eng policy color 20 tabular
Color Endpoint Admin Oper Binding
State State SID
------ --------------------------------------- ------ ------ -----------------------
20 cafe:0:4::4 up up cafe:0:1:e011::
The following outputs show the details of the on-demand SR policy for color 20.
Note
|
There are 2 candidate paths associated with this SR policy: the path that is computed by the head-end router (with preference
200), and the path that is computed by the SR-PCE (with preference 100). The candidate path with the highest preference is
the active candidate path (highlighted below) and is installed in forwarding.
|
Node1# show segment-routing traffic-eng policy color 20
SR-TE policy database
---------------------
Color: 20, End-point: cafe:0:4::4
Name: srte_c_20_ep_cafe:0:4::4
Status:
Admin: up Operational: up for 01:20:52 (since Nov 2 15:38:08.597)
Candidate-paths:
Preference: 200 (BGP ODN) (shutdown)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_20_ep_cafe:0:4::4_discr_200
PLSP-ID: 16
Protection Type: unprotected-preferred
Maximum SID Depth: 13
Dynamic (invalid)
Metric Type: TE, Path Accumulated Metric: 0
SRv6 Information:
Locator: Node1
Binding SID requested: Dynamic
Binding SID behavior: End.B6.Insert.Red
Preference: 100 (BGP ODN) (active)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_20_ep_cafe:0:4::4_discr_100
PLSP-ID: 15
Protection Type: unprotected-preferred
Maximum SID Depth: 13
Dynamic (pce cafe:0:2::2) (valid)
Metric Type: TE, Path Accumulated Metric: 12
SID[0]: Node: cafe:0:2:: Behavior: uN (PSP/USD) (48)
LBL:32 LNL:16 FL:0 AL:0
Address cafe:0:2::2
SID[1]: Node: cafe:0:4:: Behavior: uN (PSP/USD) (48)
LBL:32 LNL:16 FL:0 AL:0
Address cafe:0:4::4
SRv6 Information:
Locator: Node1
Binding SID requested: Dynamic
Binding SID behavior: End.B6.Insert.Red
Attributes:
Binding SID: cafe:0:1:e011::
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Verifying SR Policy Forwarding
Use the show segment-routing traffic-eng forwarding policy command to display the SR policy forwarding information.
The following outputs show the forwarding details for an on-demand SR policy that was triggered by prefixes with color 20
advertised by node cafe:0:4::4.
Node1# show segment-routing traffic-eng forwarding policy color 20 tabular
SR-TE Policy Forwarding database
--------------------------------
Color: 20, End-point: cafe:0:4::4
Name: srte_c_20_ep_cafe:0:4::4
Binding SID: cafe:0:1:e011::
Active LSP:
Candidate path:
Preference: 100 (BGP ODN)
Segment lists:
SL[0]:
Name: dynamic
Switched Packets/Bytes: ?/?
Paths:
Path[0]:
Out-SID Out-Interface Next Hop Bytes Switched
----------------------------------------- --------------- ----------------------------------------- --------------------
cafe:0:2:: Hu0/0/0/0 fe80::e00:ff:fece:2200 ?
Path[1]:
Out-SID Out-Interface Next Hop Bytes Switched
----------------------------------------- --------------- ----------------------------------------- --------------------
cafe:0:4:: Hu0/0/0/1 fe80::1600:ff:fef4:8300 ? (!)
Policy Packets/Bytes Switched: ?/?
(!): FRR pure backup
Node1# show segment-routing traffic-eng forwarding policy color 20 detail
SR-TE Policy Forwarding database
--------------------------------
Color: 20, End-point: cafe:0:4::4
Name: srte_c_20_ep_cafe:0:4::4
Binding SID: cafe:0:1:e011::
Active LSP:
Candidate path:
Preference: 100 (BGP ODN)
Segment lists:
SL[0]:
Name: dynamic
Switched Packets/Bytes: ?/?
Paths:
Path[0]:
Outgoing Interfaces: HundredGigE0/0/0/0
Next Hop: fe80::e00:ff:fece:2200
FRR Pure Backup: No
ECMP/LFA Backup: No
SID stack (Top -> Bottom): {cafe:0:2::}
Path-id: 1 (Protected), Backup-path-id: 65, Weight: 0
Path[1]:
Outgoing Interfaces: HundredGigE0/0/0/1
Next Hop: fe80::1600:ff:fef4:8300
FRR Pure Backup: Yes
ECMP/LFA Backup: Yes
SID stack (Top -> Bottom): {cafe:0:4::, cafe:0:2::}
Path-id: 65 (Pure-Backup), Weight: 0
Policy Packets/Bytes Switched: ?/?