MPLS Segment Routing

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 45

INTCSR

Introduction to Segment Routing


Lab Guide

Version 1.0
Table of Contents
Discovery Lab 1: Implementing Segment Routing – L2VPN ...................................... 1
 Task 1: Verify SP Network Connectivity and Enable LDP Protocol ...................... 7
 Task 2: Configure EoMPLS ............................................................................... 10
 Task 3: Configure Segment Routing .................................................................. 13
Discovery Lab 2: Implementing Segment Routing – L3VPN .................................... 18
 Task 1: Configure Network Topology ................................................................. 23
 Task 2: Configure Layer 3 VPN ......................................................................... 25
 Task 3: Verify IP Connectivity and Analyze MPLS Label Stack .......................... 31
Discovery Lab 3: Implementing Segment Routing Static TE Policies ..................... 34
 Task 1: Configure SR-TE Policies ...................................................................... 39

Table of Contents | © 2022 Cisco Systems, Inc. INTCSR Lab Guide i


Discovery Lab 1: Implementing
Segment Routing – L2VPN
Objectives
Upon completion of this lab, you will meet the following objectives:
 Configure MPLS LDP infrastructure.
 Configure EoMPLS LDP based.
 Deploy LDP to SR migration.

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 1


Physical Topology

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 2


Layer 3 Diagram

Interface Loopback 0 IP address: X.X.X.X/32


X = Router number

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 3


Graphical Objective

Job Aid
All devices have their basic configurations in place, including hostname and IP addresses.
The SP routers are pre-configured with OSPF.
XR routers credentials: cisco / cisco123

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 4


Command List
The table describes the commands that are used in this activity. The commands are listed in
alphabetical order so that you can easily locate the information that you need. Refer to this list if you
need configuration command assistance during the lab activity.

Command Description

To enter a segment-routing mpls sub-mode where you can configure address-family


connected-prefix-sid-map specific mappings for local prefixes and SIDs, use the connected-prefix-sid-map
command.

To define the matching criteria to map untagged ingress Ethernet frames on an


encapsulation untagged interface to the appropriate service instance, use the encapsulation untagged
command in the Interface configuration mode.

To configure the Open Shortest Path First (OSPF) network type to a type other
than the default for a given medium, use the ip ospf network command in interface
ip ospf network point-to-point
configuration mode. Point-to-point parameter sets the network type to point-to-
point. (IOS-XE)

To create a Layer 2 VPN (L2VPN) cross connect context and enter xconnect
l2vpn xconnect context
context configuration mode, use the l2vpn xconnect context command (IOS-XE).

To specify the attachment circuit and pseudowire information use the member
member
command in l2vpn xconnect context configuration mode (IOS-XE).

To configure the Open Shortest Path First (OSPF) network type to a type other than
the default for a given medium, use the network command in OSPF interface
network point-to-point
configuration mode. Point-to-point paramenter sets the network type to point-to-
point. (IOS-XR)

To specify or advertise prefix (node) segment ID (SID) on all routers, use the prefix-
prefix-sid absolute
sid command in OSPF interface configuration mode (IOS-XR).

To enable global Segment Routing support, use the segment-routing global


segment-routing
command (IOS-XR).

To enable segment routing support in a specific area use the segment-routing


segment-routing area
area command in OSPF process mode (IOS-XE).

To enable segment routing using the MPLS data plane on the routing process and
segment-routing mpls all areas and interfaces in the routing process, use the segment-routing mpls
command in OSPF configuration mode (IOS-XR).

To enable segment feature using the mpls data plane, use the segment-routing
segment-routing mpls
mpls command in global configuration mode (IOS-XE).

To set the preference of segment routing (SR) labels over label distribution protocol
segment-routing sr-prefer (LDP) labels, use the segment-routing sr-prefer command in OSPF process
configuration mode (IOS-XR).

To configure an Ethernet service instance on an interface and to enter Ethernet


service-instance [id] ethernet service configuration mode, use the service instance ethernet command in
interface configuration mode (IOS-XE).

To set segment routing attributes, use the set-attributes command in segment-


set-attributes
routing mpls configuration mode (IOS-XE).

To set the preference of segment routing (SR) labels over label distribution protocol
sr-label-preferred (LDP) labels, use the segment-routing sr-prefer command in set-attributes
segment-routing mpls configuration mode (IOS-XE).

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 5


Command Description

To display information for the Open Shortest Path First (OSPF) local Routing
show ip ospf rib Information Base (RIB) or locally redistributed routes, use the show ip ospf rib
command in privileged EXEC mode.

To verify the configuration and status of the xconnect members, use the show
show l2vpn service xconnect
l2vpn service xconnect command in privileged EXEC mode.

To display the contents of the MPLS Label Forwarding Information Base (LFIB), use
show mpls forwarding
the show mpls forwarding command in EXEC mode.

To validate that pseudowire messages can be sent and received use the show
show mpls l2transport vc detail
mpls l2transport vc detail command in EXEC mode.

To display the current state of the routing table, use the show ip route EXEC
show [ip] route
command.

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 6


Task 1: Verify SP Network Connectivity and Enable
LDP Protocol
Objective
Configure a L2VPN LDP based. Execute a LDP to SR migration maintaining the L2VPN connectivity.

Activity Procedure
Complete the following steps:
Step 1 Connect to console for all routers included in the physical topology.
Step 2 Verify the OSPF neighbor adjacencies among direct connected routers in the SP
infrastructure. According to the physical diagram, each router should have two
OSPF adjacencies. Use the show [ip] ospf neighbor command.
Example XE4:

Step 3 Verify the routing table of SP routers and check they have routes learned via
OSPF to each internal no direct connected IP subnet.
Example XE4:

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 7


Step 4 Use the ping tool to verify the internal connectivity among interface Loopback 0
IP addresses of SP routers.
Step 5 Enable LDP on XR1 and XR2 routers. Enable LDP on internal physical interfaces
using interface command in MPLS LDP configuration mode.
Example XR1:

Step 6 Enable LDP on XE4 and XE5 routers. Enable LDP on internal physical interfaces
using the mpls ip command in interface mode.
Example XE4:

Step 7 Verify the LDP neighbor discovery among direct connected routers. Use the
show mpls ldp discovery command.

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 8


Example XR1:

Step 8 Verify the LFIB table on SP routers. Analyze the label propagation. Use the
show mpls forwarding command.
Example XE4:

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 9


Task 2: Configure EoMPLS
Objective
Configure a pseudowire between XE4 and XE5 routers to allow connectivity between CE6 and CE7
customer routers (192.168.1.0/24 IP subnet).

Activity Procedure
Complete the following steps:
Step 1 In PE routers (XE4 and XE5) create a service instance number 10 in physical
interface to the CE customer router. Use the service instance command in
interface mode.
Example XE4:

Step 2 Ingress frames from CE routers are native ethernet. Configure this kind of
encapsulation using the encapsulation command the service instance mode.
Example XE4:

Step 3 Configure a xconnect context named site1 in PE (XE4 and XE5) routers. Use the
l2vpn xconnect context command. Specify the service instance created and the
peer IP address. Use vc id number 10.

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 10


Step 4 Verify the pseudowire is up among PE routers using the show l2vpn service
xconnect all command.
Example XE4:

Step 5 Verify connectivity among CE routers (192.168.1.0/24 IP subnet).


Example CE6:

Step 6 Shutdown direct interfaces among PE routers. This action will force the traffic
from CE routers to take the long path and will allow better analysis of the label
stack.
Example XE4:

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 11


Step 7 Verify and analyze the labels that will be imposed by PE routers to frames
ingressing from CE routers. Use the show mpls l2transport vc detail
command. The values could be different from those shown in the example.
Example XE4:

Step 8 Outer label corresponds to label used to reach the terminal of the pseudowire
(propagate via SP LDP). Inner label is exchanged via targeted LDP session
(among PE routes).

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 12


Task 3: Configure Segment Routing
Objective
Configure Segment Routing in SP routers. The SID of the routers should be 1600X (X = router
number). Use Interface Loopback 0 as reference.

Activity Procedure
Complete the following steps:
Step 1 Enable global Segment Routing support in XR1 and XR2 routers. Use the
segment-routing global command.
Example XR1:

Step 2 Enable OSPF Segment Routing extensions. Use the OSPF global command
segment-routing mpls. Configure the Prefix-SID referencing the Loopback 0
interface. Configure the absolute value of the SID using 1600X format (X=Router
Number). Use the prefix-sid absolute command.

Step 3 Enable Segment Routing support in XE4 and XE5 routers. Use the global
command segment-routing mpls. Configure the Prefix-SID referencing the
Loopback 0 interface. Configure the absolute value of the SID using 1600X
format (X=Router Number). Use the [IP/prefix-length] absolute command in
connected-prefix-sid-map submode

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 13


Step 4 Enable OSPF Segment Routing extensions in XE4 and XE5 routers. Use the
segment-routing mpls and segment-routing area [area] mpls commands.
Example XE4:

Step 5 Verify the LFIB table and check the segment routing information in SP routers.
Example XE4:

Step 6 Verify the CE connectivity is maintained.


Example CE6:

Step 7 Verify again the label stack using the show mpls l2transport vc detail
command. Compare this output with the output of the previous step. Observe
that the outer label is the LDP label, not the Segment ID. The values could be
different from those shown in the example.
Example XE4:

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 14


Step 8 Configure XR1 and XR2 to prefer Segment Routing LSPs. Use the segment-
routing sr-prefer command in router OSPF mode.
Example XR1:

Step 9 Configure XE4 and XE5 to prefer Segment Routing LSPs. Use the sr-label-
preferred command in set-attributes submode in segment-routing mpls mode.
Example XE4:

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 15


Step 10 Verify the CE connectivity is maintained.
Example CE6:

Step 11 Verify again the label stack using the show mpls l2transport vc detail
command. Observe that the outer label now is the SR label. The values could be
different from those shown in the example.
Example XE4:

PE routers are using SR labels. Now LDP can be deleted finishing the migration
from LDP to SR.
Step 12 Delete LDP in all SP routers. Verify the connectivity between CE6 and CE7
routers.
Example XR1:

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 16


Example XE4:

Step 13 Verify the connectivity among CE routers.


Example CE6:

Step 14 Check the LFIB table and verify the SR label information.
Example XR1:

Discovery Lab 1 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 17


Discovery Lab 2: Implementing
Segment Routing – L3VPN
Objectives
Upon completion of this Lab, you will meet the following objectives:
 Configure L3VPN over segment routing.
 Verify connectivity and analyze the label stack.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 18


Physical Topology

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 19


Layer 3 Diagram

Interface Loopback 0 IP address: X.X.X.X/32


X = Router number

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 20


Graphical Objective

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 21


Command List
The table describes the commands that are used in this activity. The commands are listed in
alphabetical order so that you can easily locate the information that you need. Refer to this list if you
need configuration command assistance during the lab activity.

Command Description

To replace the AS number of originating router with the AS number of the sending
as-override BGP router in the BGP as-path attribute, use the as-override command in address-
family neighbor BGP configuration mode.

To export routing information to the target VPN extended community, use the
export route-target
export route-target command in address-family VRF configuration mode.

To import routing information from the target VPN extended community, use the
import route-target
import route-target command in address-family VRF configuration mode.

To specify the networks to be advertised by the Border Gateway Protocol (BGP)


network and multiprotocol BGP routing processes, use the network command in address
family or router configuration mode.

To assign a unique route distinguisher (RD) to a VRF, use the rd command in BGP
rd
VRF configuration mode.

To configure a routing policy to updates advertised to or received from a Border


route-policy Gateway Protocol (BGP) neighbor, use the route-policy command global
configuration mode.

To display incoming and outgoing BGP labels for each NLRI, use the show bgp
show bgp vpnv4 unicast labels
vpnv4 unicast labels command.

To display the contents of the VPN routing and forwarding (VRF) instance,
show cef vrf detail
forwarding plane, use the show cef vrf command in EXEC mode.

To display the current state of the routing table, use the show ip route EXEC
show route
command.

To display the current routes in a particular VPN routing and forwarding (VRF)
show route vrf
instance, use the show route vrf command.

To force BGP to use the IP address of a specified interface as source address when
update-source talking to a neighbor, use the neighbor update-source command in BGP neighbor
configuration mode.

To configure a VRF instance and enters VRF configuration mode, use the vrf
vrf
command in global configuration mode.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 22


Task 1: Configure Network Topology
Objective
Configure a L3VPN over segment routing. Verify label stack.

Activity Procedure
Complete the following steps:
Step 1 Connect to console of all routers included in physical topology.
Step 2 Delete l2vpn xconnect context in XE4 and XE5 routers.

Step 3 Configure the physical topology specified in Physical Topology diagram enabling
or disabling router interfaces.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 23


Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 24
Task 2: Configure Layer 3 VPN
Objective
Configure a Layer 3 VPN in order to allow the communication among interface Loopback 1 subnets of
CE6 and CE7 routers.

Activity Procedure
Complete the following steps:
Step 1 Configure interface Loopback 1 in CE6 and CE7 routers. Verify the graphical
objective diagram to know the IP addressing. Configure IP addressing of CE
interfaces to PE routers.

Step 2 Configure BGP session (AS 100) among PE routers (XR1 and XR2) to exchange
VPNv4 routes. Use Loopback 0 IP addresses as reference. Use address-family
vpnv4 unicast command in global BGP mode to enable the VPNv4 route
exchange support in BGP. Use address-family vpnv4 unicast command in
BGP neighbor mode to enable the VPNv4 route exchange to this particular BGP
neighbor. Verify the BGP adjacency using the show bgp vpnv4 unicast
summary command.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 25


Example XR1:

Step 3 Configure a VRF named Site1 in PE (XR1 and XR2) routers. Use export and
import route target 10:10. Use vrf and import/export route-target commands.
Example XR1:

Step 4 Associate direct connected interface in PE routers (XR1 and XR2) to CE routers
(CE6 and CE7), to the created VRF using the vrf command in interface mode.
Configure the IP addressing following the graphical objective diagram. Verify
direct IP connectivity between PE and CE routers.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 26


Example XR1:

Step 5 Configure eBGP sessions in CE routers to exchange IPv4 unicast routes with PE
routers. CE routers (AS 600) should announce the Loopback 1 IP subnet to IPv4
eBGP session. Use the network command in BGP configuration mode.

Step 6 Configure the eBGP protocol in PE routers to exchange IPv4 unicast routes to
CE routers. The IPv4 unicast routes from CE routers should be installed into
created VRF. Use the rd command in BGP VRF mode to configure the Route
Distinghisher 10:10. As PE devices are IOS XR routers, configure a route policy
(route-policy command) named all_routes to send and receive all eBGP routes.
Apply the route policy using the route-policy [in/out] command in BGP
neighbor/address-family mode.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 27


Example XR1:

Step 7 Verify eBGP session adjacencies and route propagation using the show bgp vrf
summary and show route vrf commands in PE routers.
Example XR1:

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 28


Example XR1:

PE router is receiving the eBGP route from CE router and the iBGP route from its
PE peer.
Example CE6:

Why does the CE routers not receive BGP routes from PEs?
Hint: Customer sites has the same AS number.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 29


Step 8 Configure AS Override feature in PE eBGP sessions to CE routers.
Use the as-override command in BGP neighbor mode.
Example XR1:

Step 9 Verify CE routers are receiving BGP routes to remote site IP subnet.
Example CE6:

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 30


Task 3: Verify IP Connectivity and Analyze MPLS
Label Stack
Activity Procedure
Complete the following steps:
Step 1 Use ping tool to verify connectivity between Loopback 1 interface subnets of CE6
and CE7.
Example CE6:

Step 2 Shutdown direct interfaces between XR1 and XR2. This action will force the
traffic from CE routers to take the long path and will allow better analysis of the
label stack. Use traceroute tool to check connectivity between Loopback 1
interface subnets of CE6 and CE7 and verify the MPLS labels used.
Example for XR1:

Example for CE6, your label values may be different.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 31


Step 3 Verify the label stack imposed in the ingress PE to packets destinated to
customer remote site. Use the show cef vrf command to verify the label stack.
Example for XR1, your label values may be different.

Step 4 The inner label is propagated via MP-BGP session among PE routers. Use the
show bgp vpnv4 unicast label to verify the label propagation.
Step 5 Example for XR1, your label values may be different.

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 32


Step 6 The outer label is the Segment Routing label that identifies the BGP next hop.
Use the show cef command to verify this label.
Example for XR1, your label values may be different.

Step 7 Enable direct connected interfaces among PE (XR1 and XR2) routers.
Example for XR1:

Discovery Lab 2 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 33


Discovery Lab 3: Implementing
Segment Routing Static TE
Policies
Objectives
Upon completion of this Lab, you will meet the following objectives:
 Configure SR-TE policies.
 Verify SR-TE policy paths (data plane).

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 34


Physical Topology

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 35


Layer 3 Diagram

Interface Loopback 0 IP address: X.X.X.X/32


X = Router number

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 36


Graphical Objective

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 37


Command List
The table describes the commands that are used in this activity. The commands are listed in
alphabetical order so that you can easily locate the information that you need. Refer to this list if you
need configuration command assistance during the lab activity.

Command Description

To instruct the IGP to use SR TE policies as the next-hop interface to reach


autoroute include tailends and downstream destinations, use the autoroute include command in
SR-TE policy configuration mode.

To specify a single segment list (SID-list) or a set of weighted SID-lists (for


candidate-paths weighted equal cost multi-path [WECMP]) use the candidate-paths command in
SR-TE policy configuration mode. A candidate path is either dynamic or explicit.

To configure a color – a numerical value that distinguishes between two or more


color policies to the same node pairs – use the color command in SR-TE policy
configuration mode.

To specify a segment list in a segment routing traffic engineering policy, use the
explicit
explicit command in SR-TE policy configuration mode.

To create a segment routing traffic engineer policy and enter in this configuration
policy
mode, use the policy command in SR-TE configuration mode.

To specify the preferred policy among different policies to the same end-point
preference
use the preference command in SR-TE policy configuration mode.

To specify a list of IP addresses or MPLS labels, use the segment-list


segment-list
command in SR-TE configuration mode.

To display the current state of the routing table, use the show ip route EXEC
show route
command.

To display SR policy information, use the show segment-routing traffic-eng


show segment-routing traffic-eng
policy command.

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 38


Task 1: Configure SR-TE Policies
Objective
Configure SR-TE static policies among PE routers.

Activity Procedure
Complete the following steps:
Step 1 Connect to console of all routers included in physical topology.
Step 2 Verify the path of the traffic between CE6 and CE7 (It should use the direct link
between XR1 and XR2). Use the traceroute tool.
Example for CE6:

Step 3 Configure XR1 router. Traffic ingressing XR1 to XR2 and all routes announced
by XR2 should follow the path XR1-XE4-XE5-XR2. Configure a segment list
named site1 (use the segment-list command in segment-routing traffic-eng
mode) specifying the sequence of hops to XR2. Use the index address
command in segment-list mode.

Step 4 Configure a segment routing traffic engineering policy named pol_site1. Specify
XR2 as SR-TE policy destination using the color end-point command in SR-TE
mode. Use the previously configured segment list as the only path option of the
policy. Use the explicit segment-list command in candidate-paths mode.

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 39


Step 5 Verify the SR-TE policy status. Use the show segment-routing traffic-eng
policy command. Analyze the Segment-IDs that will be used.

Step 6 Verify the path the packets are taking from CE6 to CE7 using the traceroute tool.

Why aren’t the packets taking the SR-TE policy path?


Step 7 Verify the routing table of XR1.

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 40


The SR-TE policy is not referred in the routing table.
Step 8 Enable the autoroute feature to use the SR-TE policy to routes announced by the
policy destination (XR2). Use the autoroute include command in SR-TE policy
mode.

Step 9 Verify again the routing table of XR1 and check the SR-TE policy is being used.

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 41


Step 10 Verify again the path the packets are taking from CE6 to CE7 customer routers.
Your label values may be different.

XR1 is processing the ingress packets (from CE6 to CE7 - layer 3 VPN -) via the
SR-TE policy path. The inner label is the Layer 3 VPN label (exchanged via MP-
BGP). The other labels are the SR labels used by the policy to direct the IP
packets to the path.

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 42


Step 11 Repeat the process in XR2. Traffic ingressing XR2 to XR1 and all routes
announced by XR1 should follow the path XR2-XE5-XE4-XR1. Verify traffic from
CE7 to CE6 is taking the path specified by the SR- policy.

Discovery Lab 3 | © 2022 Cisco Systems, Inc. INTCSR Lab Guide 43

You might also like