Perform the following steps to configure EVPN VPWS PW over preferred SR-TE using On-Demand Nexthop SR policy.
Configure SR in IS-IS
The following examples show how to enable SR in IS-IS and configure interfaces BE2, BE3, BE4, and BE5.
/* Enable SR in IS-IS */
Router(config)# router isis isp
Router(config-isis)# net 01.0000.0000.0001.00
Router(config-isis)# distribute instance-id 32 level 2 throttle 5
Router(config-isis)# address-family ipv4 unicast
Router(config-isis-af)# metric-style wide
Router(config-isis-af)# mpls traffic-eng level-1
Router(config-isis-af)# mpls traffic-eng router-id 1.2.3.4
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
/* Configure interface BE2 */
Router(config-isis)# interface Bundle-Ether2
Router(config-isis-if)# point-to-point
Router(config-isis-if)# address-family ipv4 unicast
Router(config-isis-if-af)# exit
Router(config-isis-if)# exit
/* Configure interface BE3 */
Router(config-isis)# interface Bundle-Ether3
Router(config-isis-if)# point-to-point
Router(config-isis-if)# address-family ipv4 unicast
Router(config-isis-if-af)# exit
Router(config-isis-if)# exit
/* Configure interface BE4 */
Router(config-isis)# interface Bundle-Ether4
Router(config-isis-if)# point-to-point
Router(config-isis-if)# address-family ipv4 unicast
Router(config-isis-if-af)# exit
/* Configure interface BE5 */
Router(config-isis)# interface Bundle-Ether5
Router(config-isis-if)# point-to-point
Router(config-isis-if)# address-family ipv4 unicast
Router(config-isis-if-af)# exit
/* Configure Loopback interface */
Router(config-isis)# interface Loopback0
Router(config-isis-if)# passive
Router(config-isis-if)# address-family ipv4 unicast
Configure SR-TE Policy
Configure SR-TE policy.
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# on-demand color 1
Router(config-sr-te-color)# dynamic
Router(config-sr-te-color-dyn)# pcep
Router(config-sr-te-color-dyn-pce)# exit
Router(config-sr-te-color-dyn)# metric type igp
Router(config-sr-te-color-dyn)# exit
Router(config-sr-te-color)# exit
Router(config-sr-te)# on-demand color 2
Router(config-sr-te-color)# dynamic
Router(config-sr-te-color-dyn)# pcep
Router(config-sr-te-color-dyn-pce)# exit
Router(config-sr-te-color-dyn)# metric type igp
Router(config-sr-te-color-dyn)# exit
Router(config-sr-te-color)# exit
Configure PCE and PCC
Configure PCE and PCC on the routers.
/* Configure PCC on R1 */
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# pcc
Router(config-sr-te-pcc)# source-address ipv4 1.2.3.4 >>>>> This is the node address
Router(config-sr-te-pcc)# pce address ipv4 3.4.5.6 >>>>> This is the PCE server address
Router(config-sr-te-pcc)# commit
/* Configure PCE on R3 */
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# exit
Router(config)# pce
Router(config-pce)# address ipv4 3.4.5.6 >>>>> Configure the address only on a PCE server
Router(config-pce)# commit
Configure BGP
Configure BGP on the routers to establish neighborship with EVPN. When you enable an SR policy on R1, use the nexthop validation color-extcomm sr-policy command to instruct BGP that, instead of nexthop reachability validation of BGP routes, the validation is done for SR policy-installed
color nexthop addresses. When the nexthop address of such a route is reachable, the route is added to the routing table.
Router(config)# router bgp 100
Router(config-bgp)# bgp router-id 1.2.3.4
Router(config-bgp)# nexthop validation color-extcomm sr-policy
Router(config-bgp)# address-family l2vpn evpn
Router(config-bgp-af)# exit
!
Router(config-bgp)# neighbor 2.3.4.5
Router(config-bgp-nbr)# remote-as 100
Router(config-bgp-nbr)# update-source Loopback0
Router(config-bgp-nbr)# address-family l2vpn evpn
Router(config-bgp-af)# exit
!
Router(config-bgp)# neighbor 3.4.5.6
Router(config-bgp-nbr)# remote-as 100
Router(config-bgp-nbr)# update-source Loopback0
Router(config-bgp-nbr)# address-family l2vpn evpn
Router(config-bgp-af)# exit
!
Configure SR Color
Configure SR colors on the routers.
Router(config)# extcommunity-set opaque color1
Router(config-ext)# 1
Router(config-ext)# end-set
!
Router(config)# extcommunity-set opaque color2
Router(config-ext)# 2
Router(config-ext)# end-set
!
Configure EVPN Route Policy
Configure EVPN route policy. This example shows how to define the route policy language and track the EVPN route.
Router(config)# route-policy route_policy_1
Router(config-rpl)# if evpn-route-type is 1 then
Router(config-rpl-if)# set extcommunity color color1
Router(config-rpl-if)# endif
Router(config-rpl)# pass
Router(config-rpl)# end-policy
!
Router(config)# route-policy route_policy_2
Router(config-rpl)# if evpn-route-type is 1 then
Router(config-rpl-if)# set extcommunity color color2
Router(config-rpl-if)# endif
Router(config-rpl)# pass
Router(config-rpl)# end-policy
!
Configure EVPN route policy for tail-end coloring by exporting EVPN policy to color EVPN type 1 route. At the head-end, ODN
uses color advertised by tail-end to create SR-TE tunnel.
Router(config)# evpn
Router(config-evpn)# evi 1
Router(config-evpn-evi)# bgp
Router(config-evpn-evi-bgp)# route-policy export route_policy_1
Configure EVPN route policy for head-end coloring by importing EVPN policy to color EVPN type 1 route at the head-end. ODN
uses color configured by head-end to create SR-TE tunnel.
Router(config)# evpn
Router(config-evpn)# evi 2
Router(config-evpn-evi)# bgp
Router(config-evpn-evi-bgp)# route-policy import route_policy_2
Configure EVPN VPWS over SR-TE Policy
This example shows how to configure EVPN VPWS over SR-TE policy.
Router(config)# l2vpn
Router(config-l2vpn)# xconnect group xg
Router(config-l2vpn-xc)# p2p xc100
Router(config-l2vpn-xc-p2p)# interface Bundle-Ether1.100
Router(config-l2vpn-xc-p2p)# neighbor evpn evi 1 target 1 source 2
Router(config-l2vpn-xc-p2p-pw)# exit
Router(config-l2vpn-xc-p2p)# exit
Router(config-l2vpn-xc)# p2p xc200
Router(config-l2vpn-xc-p2p)# interface Bundle-Ether1.200
Router(config-l2vpn-xc-p2p)# neighbor evpn evi 2 target 3 source 4
Verify EVPN VPWS over SR-TE using ODN
The following show commands display the output for EVPN VPWS PW over SR-TE using ODN configuration.
/* View PCE topology on R3 */
Router# show pce ipv4 topology summary
Wed Jul 27 22:00:37.109 UTC
PCE's topology database summary:
--------------------------------
Topology nodes: 3
Prefixes: 3
Prefix SIDs:
Total: 0
Regular: 0
Strict: 0
Links:
Total: 12
EPE: 0
Adjacency SIDs:
Total: 12
Unprotected: 12
Protected: 0
EPE: 0
Private Information:
Lookup Nodes 0
Consistent no
Update Stats (from IGP and/or BGP):
Nodes added: 7
Nodes deleted: 0
Links added: 32
Links deleted: 0
Prefix added: 47
Prefix deleted: 0
Topology Ready Summary:
Ready: yes
PCEP allowed: yes
Last HA case: migration
Timer value (sec): 40
Timer:
Running: no >>>>> Check if the timer is running.
/* View PCE configuration on R3. This show command works only on PCE server. */
Router# show pce ipv4 peer
Wed Jul 27 22:02:00.421 UTC
PCE's peer database:
--------------------
Peer address: 1.2.3.4
State: Up
Capabilities: Stateful, Segment-Routing, Update, Instantiation, SRv6
Peer address: 3.4.5.6
State: Up
Capabilities: Stateful, Segment-Routing, Update, Instantiation, SRv6
/* View PCC configuration on both R1 and R3 */
Router# show segment-routing traffic-eng pcc ipv4 peer
Wed Jul 27 22:01:47.566 UTC
PCC's peer database:
--------------------
Peer address: 3.4.5.6,
Precedence: 255, (best PCE)
State up
Capabilities: Stateful, Update, Segment-Routing, Instantiation, SRv6
Router# show l2vpn xconnect interface Bundle-Ether 1.100 detail
Mon Jul 25 19:19:01.443 UTC
Group xg, XC xc100, state is up; Interworking none
AC: Bundle-Ether1.100, state is up
EVPN: neighbor 3.4.5.6, PW ID: evi 1, ac-id 1, state is up ( established )
XC ID 0xa0000002
Encapsulation MPLS
Encap type Ethernet, control word enabled
Sequencing not set
Preferred path Active : SR TE srte_c_1_ep_3.4.5.6 (BSID:24021, IFH:0xf000054), On-Demand, fallback enabled
Ignore MTU mismatch: Enabled
Transmit MTU zero: Enabled
Tunnel : Up
Router# show segment-routing traffic-eng policy
Wed Jul 27 22:03:47.253 UTC
SR-TE policy database
---------------------
Color: 1, End-point: 3.4.5.6
Name: srte_c_1_ep_3.4.5.6
Status:
Admin: up Operational: up for 00:31:53 (since Jul 27 21:31:54.148)
Candidate-paths:
.........
Preference: 100 (BGP ODN) (active)
Requested BSID: dynamic
.........
Dynamic (pce 3.4.5.6) (valid)
Metric Type: IGP, Path Accumulated Metric: 10
24005 [Adjacency-SID, 42.0.0.2 - 42.0.0.1]
Attributes:
Binding SID: 24021
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
Router# show segment-routing traffic-eng forwarding policy color 1 endpoint ipv4 3.4.5.6 detail
Wed Jul 27 22:08:09.961 UTC
SR-TE Policy Forwarding database
--------------------------------
Color: 1, End-point: 3.4.5.6
Name: srte_c_1_ep_3.4.5.6
Binding SID: 24021
Active LSP:
Candidate path:
Preference: 100 (BGP ODN)
Local label: 24020
Segment lists:
SL[0]:
Name: dynamic
Switched Packets/Bytes: 0/0
Paths:
Path[0]:
Outgoing Label: Pop
Outgoing Interfaces: Bundle-Ether3
Next Hop: 42.0.0.1
Switched Packets/Bytes: 0/0
FRR Pure Backup: No
ECMP/LFA Backup: No
Internal Recursive Label: Unlabelled (recursive)
Label Stack (Top -> Bottom): { Pop }
Path-id: 1, Weight: 1
Policy Packets/Bytes Switched: 0/0