Static Route Traffic Steering Using SR-TE Policy

Table 1. Feature History

Feature Name

Release Information

Description

Static Route Traffic Steering Using SR-TE Policy

Cisco IOS XE Amsterdam 17.3.1

This feature allows the non colored (BGP Extended Community) prefix to steer traffic over static policy. Prior to this release, only colored (BGP Extended Community) prefix could automatically steer traffic based on the defined policy using a tunnel interface. Unlike non colored prefix, this was possible only for the colored prefix as it could match the SR policy.

IPv4 static routes are now enhanced to leverage the SR policies to aid Segment Routing Traffic Engineering (SR-TE). This facilitates traffic steering for non colored prefix as you can now configure IP Static Route with SR static policy.

The following new keyword for the ip route command is introduced:

segment-routing policy [policy name]

Segment Routing (SR) allows a headend node to steer a packet flow along any path. This is accomplished by steering a flow into a SR policy. The header of the packet is then augmented with an ordered list of segments associated with the given SR policy. Thus, when colored (BGP Extended Community) prefix is received and there is a matching SR policy (ODN or Static), traffic for that prefix gets automatically steered based on the defined policy using a tunnel interface.

But, for non colored prefix, traffic is steered through the shortest IGP path. As a result, you cannot steer traffic for non colored prefix over static policy. Starting from Cisco IOS XE Release 17.3.1, IPv4 static routes are enhanced to leverage the SR policies to aid Segment Routing Traffic Engineering (SR-TE). This facilitates traffic steering for non colored prefix as you can now configure IP Static Route with SR static policy.


Note

This feature is enabled by default; you do not require SDM template to enable this feature.

But, for Cisco ASR 900 RSP3 module, you must use sr_5_label_push_enable SDM template, if the number of SR labels is more.


Restrictions

  • VRF IP Static route is not supported.

  • L2VPN traffic steering is not supported.

  • IPv6 static route configuration is not supported.

  • You should only use SR static policy under ip static command.

Configuration Example: Static Route Traffic Steering Using SR-TE Policy

The following example shows how to configure static route traffic steering using SR-TE policy:

enable
configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#segment-routing mpls
Router(config-srmpls)# set-attributes
Router(config-srmpls-attr)# address-family ipv4
Router(config-srmpls-attr-af)# sr-label-preferred
Router(config-srmpls-attr-af)# explicit-null
Router(config-srmpls-attr-af)# exit-address-family
Router(config-srmpls-attr)# connected-prefix-sid-map
Router(config-srmpls-conn)# address-family ipv4
Router(config-srmpls-conn-af)# 10.0.0.1/32 index 1 range 1
Router(config-srmpls-conn-af)# exit-address-family
Router(config-srmpls-conn)#segment-routing traffic-eng
Router(config-srte)# segment-list name <segment-list name>
Router(config-srte-ep)# segment-list name <segment-list name>
Router(config-srte-ep)# index 1 mpls label 16005
Router(config-srte-ep)# index 2 mpls label 16010
Router(config-srte-ep)# index 3 mpls label 16009
Router(config-srte-ep)# policy <policy name>
Router(config-srte-policy)# color 50 end-point 21.21.21.21
Router(config-srte-policy)# candidate-paths
Router(config-srte-policy-path)# preference 100
Router(config-srte-policy-path-pref)# explicit segment-list <segment-list name>
Router(config-srte-policy-path-pref)# constraints
Router(config-srte-policy-path-pref-constr)# segments
Router(config-srte-policy-path-pref-constr-seg)# dataplane mpls
Router(config-srte-policy-path-pref-constr-seg)#end

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 21.21.21.21 255.255.255.255 segment-routing policy <policy name>
#

Verification of Static Route Traffic Steering Using SR-TE Configuration

Use the show ip route command to verify the static route configuration.

Before Static Route Configuration:

Router#show ip route 12.12.12.12
Routing entry for 12.12.12.12/32
Known via "bgp 1", distance 200, metric 0, type internal
Last update from 6.6.6.6 1d00h ago
SR Incoming Label: 16009
Routing Descriptor Blocks:
* 6.6.6.6, from 6.6.6.6, 1d00h ago, merge-labels
opaque_ptr 0x3643B444
Route metric is 0, traffic share count is 1
AS Hops 0
MPLS label: 16009
 
Router#show ip cef 12.12.12.12
 
12.12.12.12/32
nexthop 192.168.1.2 GigabitEthernet0/0/0 label [16005|16005]-(local:16005) 16009-(local:16009)

After Static Route Configuration:

Router#show ip route  12.12.12.12
Routing entry for  12.12.12.12/32
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* Binding Label: 16
Route metric is 0, traffic share count is 1
MPLS label: implicit-null
 
Router#show ip cef  12.12.12.12
12.12.12.12/32
nexthop 16 Tunnel65536

Use the following commands to verify static route traffic steering using SR-TE configuration.

Router#show traffic-eng policy all

Name: <policy name> (Color: 50 End-point: 21.21.21.21)
Owners : CLI
Status:
Admin: up, Operational: up for 24:27:47 (since 04-21 11:22:13.731)
Candidate-paths:
Preference 100 (CLI):
Explicit: segment-list Inter_IGP (active)
Weight: 1, Metric Type: TE
16005
16010
16009
Attributes:
Binding SID: 16
Allocation mode: dynamic
State: Programmed
Router#show traffic-eng policy name detail

Name: <policy name> (Color: 50 End-point: 21.21.21.21)
Owners : CLI
Status:
Admin: up, Operational: up for 24:28:01 (since 04-21 11:22:13.731)
Candidate-paths:
Preference 100 (CLI):
Explicit: segment-list Inter_IGP (active)
Weight: 1, Metric Type: TE
16005
16010
16009
Attributes:
Binding SID: 16
Allocation mode: dynamic
State: Programmed
Forwarding-ID: 65536 (0x30)
Per owner configs:
CLI
Binding SID: dynamic
Stats:
Packets: 0 Bytes: 0

Event history:
Timestamp Client Event type Context: Value
--------- ------ ---------- -------: -----
04-21 07:24:13.219 CLI Policy created Name: CLI
04-21 07:24:13.220 CLI Set colour Colour: 50
04-21 07:24:13.220 CLI Set end point End-point: 21.21.21.21
04-21 07:24:13.221 CLI Set explicit path Path option: Inter_IGP
04-21 07:24:16.357 CLI BSID allocated FWD: label 16
04-21 07:27:15.115 FH Resolution Policy state UP Status: PATH RESOLVED
04-21 07:27:47.305 FH Resolution REOPT triggered Status: REOPTIMIZED
04-21 07:39:11.343 FH Resolution REOPT triggered Status: REOPTIMIZED
04-21 07:39:23.939 FH Resolution REOPT triggered Status: REOPTIMIZED
04-21 11:09:12.319 FH Resolution REOPT triggered Status: REOPTIMIZED
04-21 11:22:13.580 FH Resolution REOPT triggered Status: REOPTIMIZED
04-21 11:22:13.731 FH Resolution Policy state DOWN Status: PATH NOT RESOLVED
04-21 11:37:05.691 FH Resolution Policy state UP Status: PATH RESOLVED
04-21 11:37:05.708 FH Resolution REOPT triggered Status: REOPTIMIZED
04-21 11:38:12.652 FH Resolution REOPT triggered Status: REOPTIMIZED
04-21 11:46:12.113 FH Resolution REOPT triggered Status: REOPTIMIZED
04-22 11:47:18.555 CLI Set explicit path Path option: Inter_IGP
Router#show ip route 21.21.21.21
Routing entry for 21.21.21.21/32
Known via "bgp 1", distance 200, metric 0, type internal
Last update from 6.6.6.6 1d00h ago
SR Incoming Label: 16009
Routing Descriptor Blocks:
* 6.6.6.6, from 6.6.6.6, 1d00h ago, merge-labels
opaque_ptr 0x3643B444
Route metric is 0, traffic share count is 1
AS Hops 0
MPLS label: 16009
Router#show ip cef 12.12.12.12

12.12.12.12/32
nexthop 192.168.1.2 GigabitEthernet0/0/0 label [16005|16005]-(local:16005) 16009-(local:16009)

Adding static route CLI here
Router(config)#ip route 21.21.21.21 255.255.255.255 segment-routing policy <policy name>

Router#show ip route 21.21.21.21
Routing entry for 21.21.21.21/32
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* Binding Label: 16
Route metric is 0, traffic share count is 1
MPLS label: implicit-null
Router#show ip cef 21.21.21.21
21.21.21.21/32
nexthop 16 Tunnel65536