Professional Documents
Culture Documents
MPLS Segment Routing
MPLS Segment Routing
MPLS Segment Routing
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
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
Command Description
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 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 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).
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.
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:
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.
Step 8 Verify the LFIB table on SP routers. Analyze the label propagation. Use the
show mpls forwarding command.
Example XE4:
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.
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:
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).
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
Step 5 Verify the LFIB table and check the segment routing information in SP routers.
Example XE4:
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:
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:
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:
Step 14 Check the LFIB table and verify the SR label information.
Example XR1:
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 assign a unique route distinguisher (RD) to a VRF, use the rd command in BGP
rd
VRF 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.
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.
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.
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.
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.
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:
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.
Step 9 Verify CE routers are receiving BGP routes to remote site IP subnet.
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:
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.
Step 7 Enable direct connected interfaces among PE (XR1 and XR2) routers.
Example for XR1:
Command Description
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 display the current state of the routing table, use the show ip route EXEC
show route
command.
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.
Step 6 Verify the path the packets are taking from CE6 to CE7 using the traceroute tool.
Step 9 Verify again the routing table of XR1 and check the SR-TE policy is being used.
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.