********************************************************** Lab 1 - Configuring an Intra-AS MPLS VPN using SR ********************************************************** ============================================= 1. Configure the core IGP - IS-IS ============================================= ---- XR1 ---- hostname XR1 ! Interface Gig0/0/0/0 ip address 192.1.13.1 255.255.255.0 no shut ! Interface Gig0/0/0/1 ip address 192.1.15.1 255.255.255.0 no shut ! Interface Loopback0 ip address 10.1.1.1 255.255.255.255 ! router isis 1 net 49.0000.0000.0000.0001.00 is-type level-2 address-family ipv4 unicast metric-style wide exit interface Gig0/0/0/0 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/1 point-to-point address-family ipv4 unicast exit exit interface Loopback0 address-family ipv4 unicast exit exit ! commit ---- XR2 ---- hostname XR2 ! Interface Gig0/0/0/0 ip address 192.1.24.2 255.255.255.0 no shut ! Interface Gig0/0/0/1 ip address 192.1.26.2 255.255.255.0 no shut ! Interface Loopback0 ip address 10.1.1.2 255.255.255.255 ! router isis 1 net 49.0000.0000.0000.0002.00 is-type level-2 address-family ipv4 unicast metric-style wide exit interface Gig0/0/0/0 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/1 point-to-point address-family ipv4 unicast exit exit interface Loopback0 address-family ipv4 unicast exit exit ! commit ---- XR3 ---- hostname XR3 ! Interface Gig0/0/0/0 ip address 192.1.13.3 255.255.255.0 no shut ! Interface Gig0/0/0/1 ip address 192.1.34.3 255.255.255.0 no shut ! Interface Gig0/0/0/2 ip address 192.1.36.3 255.255.255.0 no shut ! Interface Loopback0 ip address 10.1.1.3 255.255.255.255 ! router isis 1 net 49.0000.0000.0000.0003.00 is-type level-2 address-family ipv4 unicast metric-style wide exit interface Gig0/0/0/0 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/1 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/2 point-to-point address-family ipv4 unicast exit exit interface Loopback0 address-family ipv4 unicast exit exit ! commit ---- XR4 ---- hostname XR4 ! Interface Gig0/0/0/0 ip address 192.1.24.4 255.255.255.0 no shut ! Interface Gig0/0/0/1 ip address 192.1.34.4 255.255.255.0 no shut ! Interface Gig0/0/0/2 ip address 192.1.45.4 255.255.255.0 no shut ! Interface Loopback0 ip address 10.1.1.4 255.255.255.255 ! router isis 1 net 49.0000.0000.0000.0004.00 is-type level-2 address-family ipv4 unicast metric-style wide exit interface Gig0/0/0/0 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/1 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/2 point-to-point address-family ipv4 unicast exit exit interface Loopback0 address-family ipv4 unicast exit exit ! commit ---- XR5 ---- hostname XR5 ! Interface Gig0/0/0/0 ip address 192.1.15.5 255.255.255.0 no shut ! Interface Gig0/0/0/1 ip address 192.1.56.5 255.255.255.0 no shut ! Interface Gig0/0/0/2 ip address 192.1.45.5 255.255.255.0 no shut ! Interface Loopback0 ip address 10.1.1.5 255.255.255.255 ! router isis 1 net 49.0000.0000.0000.0005.00 is-type level-2 address-family ipv4 unicast metric-style wide exit interface Gig0/0/0/0 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/1 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/2 point-to-point address-family ipv4 unicast exit exit interface Loopback0 address-family ipv4 unicast exit exit ! commit ---- XR6 ---- hostname XR6 ! Interface Gig0/0/0/0 ip address 192.1.26.6 255.255.255.0 no shut ! Interface Gig0/0/0/1 ip address 192.1.56.6 255.255.255.0 no shut ! Interface Gig0/0/0/2 ip address 192.1.36.6 255.255.255.0 no shut ! Interface Loopback0 ip address 10.1.1.6 255.255.255.255 ! router isis 1 net 49.0000.0000.0000.0006.00 is-type level-2 address-family ipv4 unicast metric-style wide exit interface Gig0/0/0/0 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/1 point-to-point address-family ipv4 unicast exit exit interface Gig0/0/0/2 point-to-point address-family ipv4 unicast exit exit interface Loopback0 address-family ipv4 unicast exit exit ! commit ============================================= 2. Configure Segment Routing for Labeling ============================================= ---- XR1 ---- router isis 1 address-family ipv4 unicast segment-routing mpls exit Interface loopback0 address-family ipv4 unicast prefix-sid index 1 root ! commit ---- XR2 ---- router isis 1 address-family ipv4 unicast segment-routing mpls exit Interface loopback0 address-family ipv4 unicast prefix-sid index 2 root ! commit ---- XR3 ---- router isis 1 address-family ipv4 unicast segment-routing mpls exit Interface loopback0 address-family ipv4 unicast prefix-sid index 3 root ! commit ---- XR4 ---- router isis 1 address-family ipv4 unicast segment-routing mpls exit Interface loopback0 address-family ipv4 unicast prefix-sid index 4 root ! commit ---- XR5 ---- router isis 1 address-family ipv4 unicast segment-routing mpls exit Interface loopback0 address-family ipv4 unicast prefix-sid index 5 root ! commit ---- XR6 ---- router isis 1 address-family ipv4 unicast segment-routing mpls exit Interface loopback0 address-family ipv4 unicast prefix-sid index 6 root ! commit ====================================================================== 3. Configure MP-iBGP between the RR(XR3) & the PE Routers (XR1 & XR2) ====================================================================== ---- XR1 ---- router bgp 100 address-family vpnv4 unicast exit neighbor 10.1.1.3 remote-as 100 update-source loopback0 address-family vpnv4 unicast root ! commit ---- XR2 ---- router bgp 100 address-family vpnv4 unicast exit neighbor 10.1.1.3 remote-as 100 update-source loopback0 address-family vpnv4 unicast root ! commit ---- XR3 ---- router bgp 100 address-family vpnv4 unicast exit neighbor-group IBGP remote-as 100 update-source loopback0 address-family vpnv4 unicast route-reflector-client exit exit neighbor 10.1.1.1 use neighbor-group IBGP exit neighbor 10.1.1.2 use neighbor-group IBGP root ! commit ====================================================================== 4. Configure the PE Router for Intra-AS MPLS VPN ====================================================================== ---- XR1 ---- vrf KBITS address-family ipv4 unicast import route-target 100:1 exit export route-target 100:1 root ! commit route-policy ALLOW pass exit ! commit Interface Gig0/0/0/2 vrf KBITS ip address 192.1.11.1 255.255.255.0 no shut ! commit router bgp 100 address-family ipv4 unicast exit vrf KBITS rd 100:1 address-family ipv4 unicast exit neighbor 192.1.11.11 remote-as 65011 address-family ipv4 unicast route-policy ALLOW in route-policy ALLOW out root ! commit ---- XR2 ---- vrf KBITS address-family ipv4 unicast import route-target 100:1 exit export route-target 100:1 root ! commit route-policy ALLOW pass exit ! commit Interface Gig0/0/0/2 vrf KBITS ip address 192.1.22.2 255.255.255.0 no shut ! commit router bgp 100 address-family ipv4 unicast exit vrf KBITS rd 100:1 address-family ipv4 unicast exit neighbor 192.1.22.22 remote-as 65022 address-family ipv4 unicast route-policy ALLOW in route-policy ALLOW out root ! commit ====================================================================== 5. Configure the CE Router for Intra-AS MPLS VPN ====================================================================== ------ CE-1 ------ hostname CE-1 ! Interface loopback1 ip address 10.11.11.11 255.255.255.0 Interface loopback2 ip address 10.11.12.12 255.255.255.0 Interface loopback3 ip address 10.11.13.13 255.255.255.0 ! Interface E0/0 ip address 192.1.11.11 255.255.255.0 no shut ! router bgp 65011 neighbor 192.1.11.1 remote-as 100 network 10.11.11.0 mask 255.255.255.0 network 10.11.12.0 mask 255.255.255.0 network 10.11.13.0 mask 255.255.255.0 ------ CE-2 ------ hostname CE-2 ! Interface loopback1 ip address 10.22.21.21 255.255.255.0 Interface loopback2 ip address 10.22.22.22 255.255.255.0 Interface loopback3 ip address 10.22.23.23 255.255.255.0 ! Interface E0/0 ip address 192.1.22.22 255.255.255.0 no shut ! router bgp 65022 neighbor 192.1.22.2 remote-as 100 network 10.22.21.0 mask 255.255.255.0 network 10.22.22.0 mask 255.255.255.0 network 10.22.23.0 mask 255.255.255.0 ********************************************************** Lab 2 - Configuring the Pre-requisites for SR-TE ********************************************************** ============================================= 1. Configure IS-IS for TE ============================================= ---- XR1 ---- mpls traffic-eng exit ! router isis 1 address-family ipv4 unicast mpls traffic-eng level-2 mpls traffic-eng router-id loopback0 root ! commit ---- XR2 ---- mpls traffic-eng exit ! router isis 1 address-family ipv4 unicast mpls traffic-eng level-2 mpls traffic-eng router-id loopback0 root ! commit ---- XR3 ---- mpls traffic-eng exit ! router isis 1 address-family ipv4 unicast mpls traffic-eng level-2 mpls traffic-eng router-id loopback0 root ! commit ---- XR4 ---- mpls traffic-eng exit ! router isis 1 address-family ipv4 unicast mpls traffic-eng level-2 mpls traffic-eng router-id loopback0 root ! commit ---- XR5 ---- mpls traffic-eng exit ! router isis 1 address-family ipv4 unicast mpls traffic-eng level-2 mpls traffic-eng router-id loopback0 root ! commit ---- XR6 ---- mpls traffic-eng exit ! router isis 1 address-family ipv4 unicast mpls traffic-eng level-2 mpls traffic-eng router-id loopback0 root ! commit =================================================== 2. Configure IS-IS for Link State DB Distribution =================================================== ---- XR1 ---- router isis 1 distribute link-state root ! commit ---- XR2 ---- router isis 1 distribute link-state root ! commit ---- XR3 ---- router isis 1 distribute link-state root ! commit ---- XR3 ---- router isis 1 distribute link-state root ! commit ---- XR4 ---- router isis 1 distribute link-state root ! commit ---- XR5 ---- router isis 1 distribute link-state root ! commit ---- XR6 ---- router isis 1 distribute link-state root ! commit ********************************************************** Lab 3 - Configuring the COLOR attribute for KBITS Routes ********************************************************** ====================================================== 1. Configuring routes on XR1 with individual colors ====================================================== ---- XR1 ---- extcommunity opaque COLOR-11 11 end-set ! extcommunity opaque COLOR-12 12 end-set ! extcommunity opaque COLOR-13 13 end-set ! commit ! route-policy SET-COLOR-KBITS if destination in (10.11.11.0/24) then set extcommunity color COLOR-11 elseif destination in (10.11.12.0/24) then set extcommunity color COLOR-12 elseif destination in (10.11.13.0/24) then set extcommunity color COLOR-13 endif exit ! commit ========================================================== 2. Apply the Color to the appropriate KBITS Routes on XR1 ========================================================== ---- XR1 ---- router bgp 100 neighbor 10.1.1.3 address-family vpnv4 unicast route-policy SET-COLOR-KBITS out root ! commit ======================================================================= 3. Configuring routes on XR2 with a common color for all KBITS routes ======================================================================= ---- XR2 ---- extcommunity opaque COLOR-20 20 end-set ! commit ! route-policy SET-COLOR-KBITS set extcommunity color COLOR-20 exit ! commit ========================================================== 4. Apply the Color to the KBITS Routes on XR2 ========================================================== ---- XR2 ---- router bgp 100 neighbor 10.1.1.3 address-family vpnv4 unicast route-policy SET-COLOR-KBITS out root ! commit ********************************************************** Lab 4 - Configuring SR-TE using Automated Steering (AS) ********************************************************** ========================================================================================== 1. Configure a SR-TE Policy for KBITS routes on XR2 with a color of 20 using IGP Metrics ========================================================================================== ---- XR1 ---- segment-routing traffic-eng policy SR-TE-XR1-TO-XR2-AS color 20 end-point ipv4 10.1.1.2 candidate-paths preference 100 dynamic metric type igp root ! commit ========================================================================================== 2. Configure a SR-TE Policy for KBITS routes on XR1 with a color of 11 using IGP Metrics ========================================================================================== ---- XR2 ---- segment-routing traffic-eng policy SR-TE-XR2-TO-XR1-11-AS color 11 end-point ipv4 10.1.1.1 candidate-paths preference 100 dynamic metric type igp root ! commit ========================================================================================== 3. Configure a SR-TE Policy for KBITS routes on XR1 with a color of 12 using IGP Metrics ========================================================================================== ---- XR2 ---- segment-routing traffic-eng policy SR-TE-XR2-TO-XR1-12-AS color 12 end-point ipv4 10.1.1.1 candidate-paths preference 100 dynamic metric type igp root ! commit Verification: --------------- sh segment-routing traffic-eng policy ********************************************************** Lab 5 - Configuring SR-TE using On-Demand-Next-Hop (ODN) ********************************************************** ========================================================================================== 1. Configure a SR-TE Policy for KBITS routes with a color of 13 using IGP Metrics ========================================================================================== ---- XR2 ---- segment-routing traffic-eng on-demand color 13 dynamic metric type igp root ! commit ********************************************************** Lab 6 - Configuring SR-TE using TE Metrics (AS) ********************************************************** ========================================================================================== 1. Configure the link between XR1 - XR5 with a TE Metric of 50 ========================================================================================== ---- XR1 ---- Segment-routing traffic-eng interface Gig0/0/0/1 metric 50 root ! commit ---- XR5 ---- Segment-routing traffic-eng interface Gig0/0/0/0 metric 50 root ! commit ========================================================================================== 2. Re-configure policies on XR2 towards color 11 and 12 to use TE Metrics ========================================================================================== ---- XR2 ---- segment-routing traffic-eng policy SR-TE-XR2-TO-XR1-11-AS color 11 end-point ipv4 10.1.1.1 candidate-paths preference 100 dynamic metric type te root ! segment-routing traffic-eng policy SR-TE-XR2-TO-XR1-12-AS color 12 end-point ipv4 10.1.1.1 candidate-paths preference 100 dynamic metric type te root ! commit ========================================================================================== 3. Re-configure policies on XR2 towards color 13 to use TE Metrics ========================================================================================== ---- XR1 ---- segment-routing traffic-eng on-demand color 13 dynamic metric type te root ! commit ****************************************************************** Lab 7 - Configuring SR-TE using Explicit Paths using IP Addresses ****************************************************************** ========================================================================================== 1. Configure an explicit Segment Routing Path on XR1 based on the following: XR1 -> XR3 -> XR6 -> XR2 ========================================================================================== ---- XR1 ---- segment-routing traffic-eng segment-list SL-XR2 index 10 address ipv4 10.1.1.3 index 20 address ipv4 10.1.1.6 index 30 address ipv4 10.1.1.2 root ! commit =============================================================================================== 2. Re-configure the AS Policy towards Color 20 to use the explicit path as the preferred path =============================================================================================== ---- XR1 ---- segment-routing traffic-eng policy SR-TE-XR1-TO-XR2-AS color 20 end-point ipv4 10.1.1.2 candidate-paths preference 120 explicit segment-list SL-XR2 root ! commit ****************************************************************** Lab 8 - Configuring SR-TE using Explicit Paths using Labels ****************************************************************** ========================================================================================== 1. Configure an explicit Segment Routing Path on XR2 based on the following: XR2 -> XR4 -> XR5 -> XR1 ========================================================================================== ---- XR2 ---- segment-routing traffic-eng segment-list SL-XR1 index 10 mpls label 16004 index 20 mpls label 16005 index 30 mpls label 16001 root ! commit =============================================================================================== 2. Re-configure the AS Policy towards Color 11 to use the explicit path as the preferred path =============================================================================================== ---- XR2 ---- segment-routing traffic-eng policy SR-TE-XR2-TO-XR1-11-AS color 11 end-point ipv4 10.1.1.1 candidate-paths preference 120 explicit segment-list SL-XR1 root ! commit ****************************************************************** Lab 9 - Configuring the Links with the Affinity Attribute ****************************************************************** ========================================================================================== 1. Configure an Affinity Attribute based on the Following XR1 -> XR5 = GREEN[20] XR5 -> XR4 = GREEN[20] XR4 -> XR2 = GREEN[20] XR3 -> XR4 = RED[10] ========================================================================================== ---- XR1 ---- segment-routing traffic-eng affinity-map name GREEN bit-position 20 exit Interface Gig0/0/0/1 affinity name GREEN root ! commit ---- XR5 ---- segment-routing traffic-eng affinity-map name GREEN bit-position 20 exit Interface Gig0/0/0/0 affinity name GREEN exit exit Interface Gig0/0/0/2 affinity name GREEN root ! commit ---- XR4 ---- segment-routing traffic-eng affinity-map name GREEN bit-position 20 name RED bit-position 10 exit Interface Gig0/0/0/0 affinity name GREEN exit exit Interface Gig0/0/0/1 affinity name RED exit exit Interface Gig0/0/0/2 affinity name GREEN root ! commit ---- XR2 ---- segment-routing traffic-eng affinity-map name GREEN bit-position 20 exit Interface Gig0/0/0/0 affinity name GREEN root ! commit ---- XR3 ---- segment-routing traffic-eng affinity-map name RED bit-position 10 exit Interface Gig0/0/0/1 affinity name RED root ! commit ****************************************************************** Lab 10 - Configuring a Policy to avoid using the RED Link ****************************************************************** ========================================================================================== 1. Add a path to the policy on XR2 towards XR1 for color 11 to avoid using the RED Link ========================================================================================== ---- XR2 ---- segment-routing traffic-eng affinity-map name RED bit-position 10 exit policy SR-TE-XR2-TO-XR1-11-AS color 11 end-point ipv4 10.1.1.1 candidate-paths preference 150 dynamic metric type igp constraints affinity exclude-any name RED root ! commit ****************************************************************** Lab 11 - Configuring a Policy to only use the GREEN Links ****************************************************************** ========================================================================================== 1. Add a path to the policy on XR2 towards XR1 for color 12 to only use the GREEN Links ========================================================================================== ---- XR2 ---- segment-routing traffic-eng policy SR-TE-XR2-TO-XR1-12-AS color 12 end-point ipv4 10.1.1.1 candidate-paths preference 150 dynamic metric type igp constraints affinity include-all name GREEN root ! commit ****************************************************************** Lab 12 - Configuring Logical Topologies using Flex Algorithms ****************************************************************** ========================================================================================== 1. Configure custom Logical topologies based on the following: Flex Algo: 128 --------------- XR1: 101 XR2: 102 XR3: 103 XR4: 104 XR5: 105 Flex Algo: 129 --------------- XR1: 201 XR2: 202 XR3: 203 XR4: 204 XR6: 206 ========================================================================================== ---- XR1 ---- router isis 1 flex-algo 128 flex-algo 129 Interface loopback0 address-family ipv4 unicast prefix-sid algorithm 128 index 101 prefix-sid algorithm 129 index 201 root ! commit ---- XR2 ---- router isis 1 flex-algo 128 flex-algo 129 Interface loopback0 address-family ipv4 unicast prefix-sid algorithm 128 index 102 prefix-sid algorithm 129 index 202 root ! commit ---- XR3 ---- router isis 1 flex-algo 128 advertise-definition flex-algo 129 advertise-definition Interface loopback0 address-family ipv4 unicast prefix-sid algorithm 128 index 103 prefix-sid algorithm 129 index 203 root ! commit ---- XR4 ---- router isis 1 flex-algo 128 flex-algo 129 Interface loopback0 address-family ipv4 unicast prefix-sid algorithm 128 index 104 prefix-sid algorithm 129 index 204 root ! commit ---- XR5 ---- router isis 1 flex-algo 128 Interface loopback0 address-family ipv4 unicast prefix-sid algorithm 128 index 105 root ! commit ---- XR6 ---- router isis 1 flex-algo 129 Interface loopback0 address-family ipv4 unicast prefix-sid algorithm 129 index 206 root ! commit ****************************************************************** Lab 13 - Configuring Policies using the Flex-Algos ****************************************************************** ========================================================================================== 1. De-configure the Policies for Color 11 and 13 on XR2 ========================================================================================== ---- XR2 ---- segment-routing traffic-eng no on-demand color 13 no policy SR-TE-XR2-TO-XR1-11-AS root ! commit ========================================================================================== 2. Configure the policies for Color 11 & 13 to use Flex Algo 128 & 129 respectively ========================================================================================== segment-routing traffic-eng on-demand color 11 dynamic sid-algorithm 128 exit exit on-demand color 13 dynamic sid-algorithm 129 root ! commit