EVPN VPWS Preferred Path over SR-TE Policy
EVPN VPWS Preferred Path over SR-TE Policy feature allows you to set the preferred path between the two end-points for EVPN VPWS pseudowire (PW) using SR-TE policy. SR policy allows you to choose the path on a per EVPN instance (EVI) basis. This feature is supported on bundle attachment circuit (AC) and physical AC.
Restrictions
-
If EVPN VPWS with On Demand Next Hop (ODN) is configured, and EVPN VPWS with preferred path is also configured for the same PW, then the preferred-path will take precedence.
-
EVPN VPWS SR policy is not supported on EVPN VPWS dual homing.
-
EVPN validates if the route is for a single home next hop, otherwise it issues an error message about a dangling SR TE policy, and continue to set up EVPN-VPWS without it. EVPN relies on ESI value being zero to determine if this is a single home or not. If the AC is a Bundle-Ether interface running LACP then you need to manually configure the ESI value to zero to overwrite the auto-sense ESI as EVPN VPWS multihoming is not supported.
To disable EVPN dual homing, configure bundle-Ether AC with ESI value set to zero. evpn interface Bundle-Ether12 ethernet-segment identifier type 0 00.00.00.00.00.00.00.00.00 /* Or globally */ Evpn ethernet-segment type 1 auto-generation-disable
Topology
Consider a topology where PE1 and PE3 are the two EVPN VPWS PW end-points. Traffic is sent from PE1 to PE3 through SR in the core. Traffic from PE1 can be sent to PE3 either through P1 or P2 node. In this example, the EVPN VPWS preferred path over SR policy is configured to show the traffic flow from PE1 to PE3 using prefix-SID. Using adjacency-SID, you can steer traffic flow from PE1 to PE3 and specify whether it should pass through P1 or P2 node.
Configure EVPN VPWS Preferred Path over SR-TE Policy
You must complete these tasks to ensure the successful configuration of EVPN VPWS Preferred Path over SR-TE Policy feature:
-
Configure Prefix-SID on IGP — The following examples show how to configure prefix-SID in IS-IS.
-
Configure Adjacency-SID on IGP — The following examples show how to configure Adjacency-SID in IS-IS.
-
Configure segment-list
-
Configure SR-TE policy
-
Configure EVPN VPWS over SR-TE policy
Configure Prefix-SID in ISIS
/* Configure Prefix-SID on PE1 */
Router# configure
Router(config)# segment-routing
Router(config-sr)# global-block 180000 200000
Router(config-sr)# exit
!
Router# configure
Route(config)# router isis core
Route(config-isis)# is-type level-2-only
Route(config-isis)# net 49.0002.0330.2000.0031.00
Route(config-isis)# nsr
Route(config-isis)# nsf ietf
Route(config-isis)# log adjacency changes
Route(config-isis)# address-family ipv4 unicast
Route(config-isis-af)# metric-style wide level 2
Route(config-isis-af)# mpls traffic-eng level-2-only
Route(config-isis-af)# mpls traffic-eng router-id 1.1.1.1
Route(config-isis-af)# segment-routing mpls sr-prefer
Route(config-isis-af)# segment-routing prefix-sid-map advertise-local
Route(config-isis-af)# exit
!
Route(config-isis)# interface loopback 0
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-af)# prefix-sid index 180010
Route(config-isis-af)# commit
Route(config-isis-af)# exit
/* Configure Prefix-SID on P1 */
Router# configure
Router(config)# segment-routing
Router(config-sr)# global-block 180000 200000
Router(config-sr)# exit
!
Router# configure
Router(config)# router isis core
Router(config-isis)# is-type level-2-only
Router(config-isis)# net 49.0002.0330.2000.0021.00
Router(config-isis)# nsr
Router(config-isis)# nsf ietf
Router(config-isis)# log adjacency changes
Router(config-isis)# address-family ipv4 unicast
Router(config-isis-af)# metric-style wide level 2
Router(config-isis-af)# mpls traffic-eng level-2-only
Router(config-isis-af)# mpls traffic-eng router-id loopback0
Router(config-isis-af)# segment-routing mpls sr-prefer
Router(config-isis-af)# segment-routing prefix-sid-map advertise-local
Router(config-isis-af)# exit
!
Router(config-isis)# interface loopback 0
Router(config-isis-if)# address-family ipv4 unicast
Router(config-isis-af)# prefix-sid index 180015
Router(config-isis-af)# commit
Router(config-isis-af)# exit
/* Configure Prefix-SID on P2 */
Router# configure
Router(config)# segment-routing
Router(config-sr)# global-block 180000 200000
Router(config-sr)# exit
!
Router# configure
Route(config)# router isis core
Route(config-isis)# is-type level-2-only
Route(config-isis)# net 49.0002.0330.2000.0022.00
Route(config-isis)# nsr
Route(config-isis)# nsf ietf
Route(config-isis)# log adjacency changes
Route(config-isis)# address-family ipv4 unicast
Route(config-isis-af)# metric-style wide level 2
Route(config-isis-af)# mpls traffic-eng level-2-only
Route(config-isis-af)# mpls traffic-eng router-id loopback0
Route(config-isis-af)# segment-routing mpls sr-prefer
Route(config-isis-af)# segment-routing prefix-sid-map advertise-local
Route(config-isis-af)# exit
!
Route(config-isis)# interface loopback 0
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-af)# prefix-sid index 180025
Route(config-isis-af)# commit
Route(config-isis-af)# exit
/* Configure Prefix-SID on PE3 */
Router# configure
Router(config)# segment-routing
Router(config-sr)# global-block 180000 200000
Router(config-sr)# exit
!
Router# configure
Route(config)# router isis core
Route(config-isis)# is-type level-2-only
Route(config-isis)# net 49.0002.0330.2000.3030.0030.0035.00
Route(config-isis)# address-family ipv4 unicast
Route(config-isis-af)# metric-style wide level 2
Route(config-isis-af)# mpls traffic-eng level-2-only
Route(config-isis-af)# mpls traffic-eng router-id loopback0
Route(config-isis-af)# segment-routing mpls sr-prefer
Route(config-isis-af)# segment-routing prefix-sid-map advertise-local
Route(config-isis-af)# exit
!
Route(config-isis)# interface loopback0
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-af)# prefix-sid index 180020
Route(config-isis-af)# commit
Route(config-isis-af)# exit
Configure Adjacency-SID in ISIS
/* Configure Adjacency-SID on PE1 */
Router# configure
Router(config)# segment-routing
Router(config-sr)# local-block 15000 15999
!
Router# configure
Route(config)# router isis core
Route(config-isis)# interface Bundle-Ether121
Route(config-isis-if)# circuit-type level-2-only
Route(config-isis-if)# point-to-point
Route(config-isis-if)# hello-padding disable
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-if-af)# adjacency-sid absolute 15101
Route(config-isis-if-af)# exit
!
Router# configure
Route(config)# router isis core
Route(config-isis)# interface TenGigE0/0/1/6
Route(config-isis-if)# circuit-type level-2-only
Route(config-isis-if)# point-to-point
Route(config-isis-if)# hello-padding disable
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-if-af)# adjacency-sid absolute 15102
Route(config-isis-if-af)# commit
/* Configure Adjacency-SID on P1 */
Router# configure
Router(config)# segment-routing
Router(config-sr)# local-block 15000 15999
!
Router# configure
Route(config)# router isis core
Route(config-isis)# interface Bundle-Ether121
Route(config-isis-if)# circuit-type level-2-only
Route(config-isis-if)# point-to-point
Route(config-isis-if)# hello-padding disable
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-if-af)# metric 20
Route(config-isis-if-af)# adjacency-sid absolute 15200
Route(config-isis-if-af)# commit
!
Router# configure
Route(config)# router isis core
Route(config-isis)# interface TenGigE0/0/0/7
Route(config-isis-if)# circuit-type level-2-only
Route(config-isis-if)# point-to-point
Route(config-isis-if)# hello-padding disable
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-if-af)# adjacency-sid absolute 15202
Route(config-isis-if-af)# commit
!
/* Configure Adjacency-SID on P2 */
Router# configure
Router(config)# segment-routing
Router(config-sr)# local-block 15000 15999
!
Router# configure
Route(config)# router isis core
Route(config-isis)# interface TenGigE0/0/0/7
Route(config-isis-if)# circuit-type level-2-only
Route(config-isis-if)# point-to-point
Route(config-isis-if)# hello-padding disable
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-if-af)# metric 20
Route(config-isis-if-af)# adjacency-sid absolute 15201
Route(config-isis-if-af)# exit
!
Router# configure
Route(config)# router isis core
Route(config-isis)# interface TenGigE0/0/0/5
Route(config-isis-if)# circuit-type level-2-only
Route(config-isis-if)# point-to-point
Route(config-isis-if)# hello-padding disable
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-if-af)# metric 20
Route(config-isis-if-af)# adjacency-sid absolute 15204
Route(config-isis-if-af)# commit
/* Configure Adjacency-SID on PE3 */
Router# configure
Router(config)# segment-routing
Router(config-sr)# local-block 15000 15999
!
Router# configure
Route(config)# router isis core
Route(config-isis)# interface TenGigE0/0/0/1
Route(config-isis-if)# circuit-type level-2-only
Route(config-isis-if)# point-to-point
Route(config-isis-if)# hello-padding disable
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-if-af)# adjacency-sid absolute 15301
Route(config-isis-if-af)# exit
!
Router# configure
Route(config)# router isis core
Route(config-isis)# interface TenGigE0/0/0/2
Route(config-isis-if)# circuit-type level-2-only
Route(config-isis-if)# point-to-point
Route(config-isis-if)# hello-padding disable
Route(config-isis-if)# address-family ipv4 unicast
Route(config-isis-if-af)# adjacency-sid absolute 15302
Route(config-isis-if-af)# commit
Configure Segment-list
/* Configure Segment-list on PE1 using prefix-SID */
Router# configure
Router(config)# segment-routing
Router(config-sr)# global-block 180000 200000
Router(config-sr)# traffic-eng
Router(config-sr-te)# logging
Router(config-sr-te-log)# policy status
Router(config-sr-te-log)# exit
!
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# segment-list name pref_sid_to_PE3
Router(config-sr-te-sl)# index 1 mpls label 180020 <-----------------------using prefix-SID
Router(config-sr-te-sl)# exit
/* Configure Segment-list on PE1 using adjacency-SID */
Router# configure
Router(config)# segment-routing
Router(config-sr)# local-block 15000 15999
Router(config-sr)# traffic-eng
Router(config-sr-te)# logging
Router(config-sr-te-log)# policy status
Router(config-sr-te-log)# exit
!
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# segment-list name pref_adj_sid_to_PE3
Router(config-sr-te-sl)# index 1 mpls label 15101 <-----------------------using adjacency-SID
Router(config-sr-te-sl)# index 2 mpls label 15202 <-----------------------using adjacency-SID
Router(config-sr-te-sl)# exit
Configure SR-TE Policy
/* Configure SR-TE Policy */
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# policy pref_sid_to_PE3
Router(config-sr-te-policy)# color 9001 end-point ipv4 20.20.20.20
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 10
Router(config-sr-te-pp-info)# explicit segment-list pref_sid_to_PE3
Router(config-sr-te-pp-info)# commit
Router(config-sr-te-pp-info)# exit
!
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# policy pref_adj_sid_to_PE3
Router(config-sr-te-policy)# color 9001 end-point ipv4 20.20.20.20
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 200
Router(config-sr-te-pp-info)# explicit segment-list pref_adj_sid_to_PE3
Router(config-sr-te-pp-info)# commit
Router(config-sr-te-pp-info)# exit
/* You can configure multiple preferences for an SR policy. Among the configured preferences, the largest number takes the highest precedence */
Router# configure
Router(config)# segment-routing
Router(config-sr)# global-block 180000 200000
Router(config-sr)# local-block 15000 15999
Router(config-sr)# traffic-eng
Router(config-sr-te)# policy 1013
Router(config-sr-te-policy)# color 1013 end-point ipv4 2.2.2.2
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-pp-info)# explicit segment-list PE1-P1_BE121
Router(config-sr-te-pp-info)# exit
!
Router(config-sr-te-policy-path)# preference 200
Router(config-sr-te-pp-info)# explicit segment-list PE1-PE3-P1-t0016
Router(config-sr-te-pp-info)# exit
!
Router(config-sr-te-policy-path)# preference 700 <----------largest number takes the precendence
Router(config-sr-te-pp-info)# explicit segment-list PE1-P1
Router(config-sr-te-pp-info)# commit
Router(config-sr-te-pp-info)# exit
Configure EVPN VPWS over SR-TE Policy
Note |
Use the auto-generated SR-TE policy name to attach the policy to the L2VPN instance. The auto-generated policy name is based on the policy color and end-point. Use the show segment-routing traffic-eng policy candidate-path name policy_name command to display the auto-generated policy name. |
Router# show segment-routing traffic-eng policy candidate-path name pref_sid_to_PE3
SR-TE policy database
---------------------
Color: 9001, End-point: 20.20.20.20
Name: srte_c_9001_ep_20.20.20.20
Router# configure
Router(config)# l2vpn
Router(config-l2vpn)# pw-class 1001
Router(config-l2vpn-pwc)# encapsulation mpls
Router(config-l2vpn-pwc-mpls)# preferred-path sr-te policy srte_c_9001_ep_20.20.20.20 fallback disable
Router(config-l2vpn-pwc-mpls)# commit
Router(config-l2vpn-pwc-mpls)# exit
!
Router(config)# l2vpn
Router(config-l2vpn)# xconnect group evpn_vpws
Router(config-l2vpn-xc)# p2p evpn_vpws_1001
Router(config-l2vpn-xc-p2p)# interface tengi0/1/0/1.1001
Router(config-l2vpn-xc-p2p)# neighbor evpn evi 1001 target 10001 source 20001
Router(config-l2vpn-xc-p2p-pw)# pw-class 1001
Router(config-l2vpn-xc-p2p-pw)# commit
Router(config-l2vpn-xc-p2p-pw)# exit
/* If Fallback Enable is configured, which is the default option, and if the SR-policy is down, then EVPN VPWS will still continue to be UP using the regular IGP path, and not using the SR-policy */
show l2vpn xconnect detail
EVPN: neighbor 20.20.20.20, PW ID: evi 1001, ac-id 10001, state is up ( established )
Preferred path Inactive : SR TE srte_c_9001_ep_20.20.20.20, Statically configured, fallback enabled
Tunnel : Down
LSP: Up
/* If Fallback Disable is configured, and if the SR-policy is down, or if it misconfigured in dual homed mode, then the L2VPN PW will be down */
show l2vpn xconnect detail
EVPN: neighbor 20.20.20.20, PW ID: evi 1001, ac-id 10001, state is down ( local ready )
Preferred path Active : SR TE srte_c_9001_ep_20.20.20.20, Statically configured, fallback disabled
Tunnel : Down
Running Configuration
/* Configure Prefix-SID in ISIS */
PE1:
configure
segment-routing
global-block 180000 200000
!
router isis core
is-type level-2-only
net 49.0002.0330.2000.0031.00
nsr
nsf ietf
log adjacency changes
address-family ipv4 unicast
metric-style wide level 2
mpls traffic-eng level-2-only
mpls traffic-eng router-id 1.1.1.1
segment-routing mpls sr-prefer
segment-routing prefix-sid-map advertise-local
interface Loopback0
address-family ipv4 unicast
prefix-sid index 180010
P1:
configure
segment-routing
global-block 180000 200000
router isis core
is-type level-2-only
net 49.0002.0330.2000.0021.00
nsr
nsf ietf
log adjacency changes
address-family ipv4 unicast
metric-style wide level 2
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
segment-routing mpls sr-prefer
segment-routing prefix-sid-map advertise-local
interface Loopback0
address-family ipv4 unicast
prefix-sid index 180015
P2:
configure
segment-routing
global-block 180000 200000
router isis core
is-type level-2-only
net 49.0002.0330.2000.0022.00
nsr
nsf ietf
log adjacency changes
address-family ipv4 unicast
metric-style wide level 2
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
segment-routing mpls sr-prefer
segment-routing prefix-sid-map advertise-local
interface Loopback0
address-family ipv4 unicast
prefix-sid index 180025
PE3:
configure
segment-routing
global-block 180000 200000
router isis core
is-type level-2-only
net 49.0002.0330.2000.3030.0030.0035.00
address-family ipv4 unicast
metric-style wide level 2
mpls traffic-eng level-2-only
mpls traffic-eng router-id Loopback0
segment-routing mpls sr-prefer
segment-routing prefix-sid-map advertise-local
interface Loopback0
address-family ipv4 unicast
prefix-sid index 180020
/* Configure Adjacency-SID in ISIS */
PE1:
configure
segment-routing
local-block 15000 15999
!
router isis core
!
interface Bundle-Ether121
circuit-type level-2-only
point-to-point
hello-padding disable
address-family ipv4 unicast
adjacency-sid absolute 15101
interface TenGigE0/0/1/6
circuit-type level-2-only
point-to-point
hello-padding disable
address-family ipv4 unicast
adjacency-sid absolute 15102
P1:
configure
segment-routing
local-block 15000 15999
router isis core
!
interface Bundle-Ether121
circuit-type level-2-only
point-to-point
hello-padding disable
address-family ipv4 unicast
metric 20
adjacency-sid absolute 15200
interface TenGigE0/0/0/0/7
circuit-type level-2-only
point-to-point
hello-padding disable
address-family ipv4 unicast
metric 20
adjacency-sid absolute 15202
P2:
configure
segment-routing
local-block 15000 15999
router isis core
!
interface TenGigE0/0/0/5
circuit-type level-2-only
point-to-point
hello-padding disable
address-family ipv4 unicast
metric 20
adjacency-sid absolute 15204
interface TenGigE0/0/0/0/7
circuit-type level-2-only
point-to-point
hello-padding disable
address-family ipv4 unicast
metric 20
adjacency-sid absolute 15201
PE3:
configure
segment-routing
local-block 15000 15999
router isis core
!
interface TenGigE0/0/0/1
circuit-type level-2-only
point-to-point
hello-padding disable
address-family ipv4 unicast
adjacency-sid absolute 15301
!
!
interface TenGigE0/0/0/2
circuit-type level-2-only
point-to-point
hello-padding disable
address-family ipv4 unicast
adjacency-sid absolute 15302
/* Configure Segment-list */
PE1:
configure
segment-routing
global-block 180000 200000
traffic-eng
logging
policy status
segment-routing
traffic-eng
segment-list name pref_sid_to_PE3
index 1 mpls label 180020
!
!
configure
segment-routing
local-block 15000 15999
traffic-eng
logging
policy status
segment-routing
traffic-eng
segment-list name pref_adj_sid_to_PE3
index 1 mpls label 15101
index 2 mpls label 15202
!
!
/* Configure SR-TE policy */
segment-routing
traffic-eng
policy pref_sid_to_PE3
color 9001 end-point ipv4 20.20.20.20
candidate-paths
preference 10
explicit segment-list pref_sid_to_PE3
!
!
segment-routing
traffic-eng
policy pref_adj_sid_to_PE3
color 9001 end-point ipv4 20.20.20.20
candidate-paths
preference 200
explicit segment-list pref_adj_sid_to_PE3
!
!
/* You can configure multiple preferences for an SR policy. Among the configured preferences, the largest number takes the highest precedence */
segment-routing
traffic-eng
policy 1013
color 1013 end-point ipv4 2.2.2.2
candidate-paths
preference 100
explicit segment-list PE1-P1_BE121
!
preference 200
explicit segment-list PE1-PE3-P1-t0016
!
preference 700
explicit segment-list PE1-P1
!
/* Configure EVPN VPWS over SR-TE policy */
PE1:
configure
l2vpn
pw-class 1001
encapsulation mpls
preferred-path sr-te policy srte_c_9001_ep_20.20.20.20 fallback disable
xconnect group evpn_vpws
p2p evpn_vpws_1001
interface tengi0/1/0/1.1001
neighbor evpn evi 1001 target 10001 source 20001
pw-class 1001
!
Verify EVPN VPWS Preferred Path over SR-TE Policy Configuration
PE1#show segment-routing traffic-eng forwarding policy name pref_sid_to_PE3 detail
Policy Segment Outgoing Outgoing Next Hop Bytes
Name List Label Interface Switched
------------- --------------- ----------- ------------------- --------------- ------------
pref_sid_to_PE3
15102 TenGigE0/0/1/6 20.20.20.20 81950960
Label Stack (Top -> Bottom): { 15101, 15102 }
Path-id: 1, Weight: 0
Packets Switched: 787990
Local label: 34555
Packets/Bytes Switched: 1016545/105720680
(!): FRR pure backup
PE1#show segment-routing traffic-eng policy candidate-path name pref_sid_to_PE3
SR-TE policy database
---------------------
Color: 9001, End-point: 20.20.20.20
Name: srte_c_9001_ep_20.20.20.20
PE1#show mpls forwarding tunnels sr-policy name pref_sid_to_PE3
Tunnel Outgoing Outgoing Next Hop Bytes
Name Label Interface Switched
------------- ----------- ------------ --------------- ------------
pref_sid_to_PE3 (SR) 15102 TenGigE0/0/1/6 20.20.20.20 836516512
PE1#show l2vpn xconnect group evpn_vpws xc-name evpn_vpws_1001 detail
Group evpn_vpws, XC evpn_vpws_1001, state is up; Interworking none
AC: Bundle-Ether12.1001, state is up
Type VLAN; Num Ranges: 1
Outer Tag: 1000
Rewrite Tags: []
VLAN ranges: [1, 1]
MTU 1500; XC ID 0xc0000018; interworking none
Statistics:
packets: received 642304, sent 642244
bytes: received 61661184, sent 61655424
drops: illegal VLAN 0, illegal length 0
EVPN: neighbor 20.20.20.20, PW ID: evi 1001, ac-id 10001, state is up ( established )
XC ID 0xa0000007
Encapsulation MPLS
Source address 10.10.10.10
Encap type Ethernet, control word enabled
Sequencing not set
Preferred path Active : SR TE pref_sid_to_PE3, Statically configured, fallback disabled
Tunnel : Up
Load Balance Hashing: src-dst-mac
Associated Commands
-
adjacency-sid
-
index
-
prefix-sid
-
segment-routing
The applicable segment routing commands are described in the Segment Routing Command Reference for Cisco NCS 5500 Series Routers and Cisco NCS 540 Series Routers