Juniper Static Label Switched Paths (Part 1)

Introduction

Label Switched Paths (LSP) are signaled paths in MPLS that allow you designate criteria of how a traffic from one provider edge router traverses the MPLS core to another provider edge router.  These criteria could be something as simple as explicit hops that must be taken or it can be based off of more complex criteria such as available bandwidth or administrative groups (otherwise known as link coloring).  The more complex criteria must have constrained shortest path first (CSPF) enabled but this will be describe in more detail later.  Before we go on, let’s revisit the topology that is common in my scenarios.

Topology

The topology that I used for most of my scenarios is shown below.  This topology is relatively simple in that it has two provider edge routers and two provider routers.  This will allow us to practice certain scenarios like the one we are going to do now with creating LSPs.

Juniper MPLS Diagram

If you followed my configurations in my last scenario (Simple Juniper MPLS Core w/ L3VPN Part 1 and Part 2), when you perform a ping from CE-A-R1 to CE-A-R2’s loopback address of 16.16.16.2/32, then you would see an output like the following:

root@CE-A-R1> traceroute 16.16.16.2
traceroute to 16.16.16.2 (16.16.16.2), 30 hops max, 40 byte packets
 1 172.16.1.1 (172.16.1.1) 15.141 ms 15.343 ms 14.723 ms
 2 * * *
 3 10.0.0.34 (10.0.0.34) 26.028 ms 34.501 ms 29.612 ms
 MPLS Label=299856 CoS=0 TTL=1 S=1
 4 16.16.16.2 (16.16.16.2) 30.116 ms 34.736 ms 35.071 ms

As you can see, we don’t see the full picture of the MPLS core so we are going to enable a feature on the provider routers that allow ICMP to gain visibility on the hop-by-hop pathing through the core from the customer edge device.  Normally, service providers do not enable this but for our purpose, we are going to enable it.  After using the command set protocols mpls icmp-tunneling on the provider routers, our traceroute from CE-A-R1 now looks like the following:

root@CE-A-R1> traceroute 16.16.16.2
traceroute to 16.16.16.2 (16.16.16.2), 30 hops max, 40 byte packets
 1 172.16.1.1 (172.16.1.1) 10.797 ms 19.747 ms 20.047 ms
 2 10.0.0.6 (10.0.0.6) 35.164 ms 25.202 ms 25.228 ms
 MPLS Label=299808 CoS=0 TTL=1 S=0
 MPLS Label=299856 CoS=0 TTL=1 S=1
 3 10.0.0.34 (10.0.0.34) 29.808 ms 25.496 ms 34.414 ms
 MPLS Label=299856 CoS=0 TTL=1 S=1
 4 16.16.16.2 (16.16.16.2) 39.482 ms 29.727 ms 29.874 ms

As you can see, after the MPLS core has converged (both OSPF, LDP and iBGP), the traffic from CE-A-R1 to CE-A-R2’s loopback0 address follows the path of CE-A-R1 -> PE-R1 -> P-R2 -> PE-R3.  For now, we will forget about looking at why the MPLS core is taking that path and focus more on creating and LSP to take a path that we want it to.

Creating an Explicit Label Switched Path

We are going to configure an LSP on PE-R1 to PE-R3 and specify the path we want to it to take.  To keep it simple, we are not going to use CSFP and manually specify the path we want it to take.  We are also not going to get into more complex details such as fast reroute or other quick failure techniques and concentrate on just simple pathing.  If you wish to get familiar with LSPs in JunOS, please take a look at their documentation on Configuring Static LSPs.

We want to configure an LSP to traverse the path PE-R1 -> P-R1 -> PE-R3 so the first thing we need to do is enable the RSVP protocol.  To do this, we configure each of the MPLS routers as follows:

PE-R1, PE-R2, PE-R3, PE-R4

set protocols rsvp interface all
set protocols rsvp interface ge-0/0/3.0 disable
set protocols rsvp interface ge-0/0/4.0 disable

P-R1, P-R2

set protocols rsvp interface all
set protocols rsvp interface ge-0/0/5.0 disable

Again, without going into too much detail (a more complex scenario will be done later), we can see that RSVP has been enabled and bandwidth has been allocated for each interface.  For example, this is the output of show rsvp interface on PE-R1:

root@PE-R1> show rsvp interface
RSVP interface: 4 active
 Active Subscr- Static Available Reserved Highwater
Interface State resv iption BW BW BW mark
ge-0/0/0.0 Up 1 100% 1000Mbps 1000Mbps 0bps 0bps
ge-0/0/1.0 Up 0 100% 1000Mbps 1000Mbps 0bps 0bps
ge-0/0/2.0 Up 0 100% 1000Mbps 1000Mbps 0bps 0bps
sp-0/0/0.0 Up 0 100% 800Mbps 800Mbps 0bps 0bps

Next, we will create two LSP’s between PE-R1.  Notice how I saw two…LSP’s are unidirectional so to create a LSP between the two routers, we need to create two.  So, first, let’s take a look at the configuration for both LSPs then we will go over the configuration.  First, PE-R1:

set protocols mpls label-switched-path CUSTOMER-A to 100.1.1.5
set protocols mpls label-switched-path CUSTOMER-A no-cspf
set protocols mpls label-switched-path CUSTOMER-A primary PRIMARY
set protocols mpls path PRIMARY 10.0.0.2 strict
set protocols mpls path PRIMARY 10.0.0.26 strict

Next, PE-R3:

set protocols mpls label-switched-path CUSTOMER-A to 100.1.1.1
set protocols mpls label-switched-path CUSTOMER-A no-cspf
set protocols mpls label-switched-path CUSTOMER-A primary PRIMARY
set protocols mpls path PRIMARY 10.0.0.25 strict
set protocols mpls path PRIMARY 10.0.0.1 strict

I believe the configurations should be pretty straight-forward.  We are simply creating an LSP named CUSTOMER-A on both PE-R1 and PE-R3 pointing to each others loopback0’s, telling the LSP that it should not use CSPF and that the path for the PRIMARY path is PE-R1 -> P-R1 -> PE-R3.  After the configuration, we can check the LSP on both routers…for instance, PE-R1:

root@PE-R1> show mpls lsp ingress extensive
Ingress LSP: 1 sessions

100.1.1.5
 From: 100.1.1.1, State: Up, ActiveRoute: 0, LSPname: CUSTOMER-A
 ActivePath: PRIMARY (primary)
 LSPtype: Static Configured
 LoadBalance: Random
 Encoding type: Packet, Switching type: Packet, GPID: IPv4
 *Primary PRIMARY State: Up
 Priorities: 7 0
 SmartOptimizeTimer: 180
 Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt 20=Node-ID):
 10.0.0.2 10.0.0.26
 4 Dec 19 20:53:51.855 Selected as active path
 3 Dec 19 20:53:51.853 Record Route: 10.0.0.2 10.0.0.26
 2 Dec 19 20:53:51.853 Up
 1 Dec 19 20:53:51.760 Originate Call
 Created: Sat Dec 19 20:53:51 2015
Total 1 displayed, Up 1, Down 0

As you can see from the command show mpls lsp ingress, the PRIMARY path is UP, the LSP itself is active and the path it takes its via 10.0.0.2 and 10.0.0.26.  Now, if we perform the traceroute on CE-A-R1 to CE-A-R2’s loopback0 address, we will see a completely different route than it original took.  Let’s compare the original traceroute to the new…original:

root@CE-A-R1> traceroute 16.16.16.2
traceroute to 16.16.16.2 (16.16.16.2), 30 hops max, 40 byte packets
 1 172.16.1.1 (172.16.1.1) 10.797 ms 19.747 ms 20.047 ms
 2 10.0.0.6 (10.0.0.6) 35.164 ms 25.202 ms 25.228 ms
 MPLS Label=299808 CoS=0 TTL=1 S=0
 MPLS Label=299856 CoS=0 TTL=1 S=1
 3 10.0.0.34 (10.0.0.34) 29.808 ms 25.496 ms 34.414 ms
 MPLS Label=299856 CoS=0 TTL=1 S=1
 4 16.16.16.2 (16.16.16.2) 39.482 ms 29.727 ms 29.874 ms

New:

root@CE-A-R1> traceroute 16.16.16.2
traceroute to 16.16.16.2 (16.16.16.2), 30 hops max, 40 byte packets
 1 172.16.1.1 (172.16.1.1) 15.742 ms 19.742 ms 19.672 ms
 2 10.0.0.2 (10.0.0.2) 35.266 ms 35.011 ms 30.038 ms
 MPLS Label=299904 CoS=0 TTL=1 S=0
 MPLS Label=299856 CoS=0 TTL=1 S=1
 3 10.0.0.26 (10.0.0.26) 29.531 ms 20.596 ms 29.676 ms
 MPLS Label=299856 CoS=0 TTL=1 S=1
 4 16.16.16.2 (16.16.16.2) 29.838 ms 30.053 ms 30.304 ms

The green output shows that the LSP is working as expected and the path is taking the explicit hops that we defined.

Conclusion

So there you have it…a statically configured LSP.  Once you remove LDP and configure RSVP, you can create LSPs to take a primary path.  In an upcoming post, I will show you how to configure a secondary LSP that traffic can take in the event of a link failure.   But for now, try it out, configure some additional LSPs and mess around with explicit LSP paths.

Troy Perkins

Leave a Reply

Your email address will not be published. Required fields are marked *