Establish an LSP in Your Network
Create a label-switched path on specified routers in your network using the loopback address of the ingress and egress routers.
To establish an LSP in your network, follow these steps:
Configure the LSP
Action
To configure an LSP in your network, follow these steps:
- In configuration mode, go to the following hierarchy level:[edit]user@host# edit protocols mpls
- Configure the LSP on the ingress and egress routers:[edit protocols mpls]user@host# set label-switched-path lsp-path-name to address
- Verify and commit the configuration:user@host# showuser@host# commit
Sample Output 1
user@R1> edit
Entering configuration mode
[edit]
user@R1# edit protocols mpls
[edit protocols mpls]
user@R1# set label-switched-path R1-to-R6 to 10.0.0.6
[edit protocols mpls]
user@R1# show
label-switched-path R1-to-R6 {
to 10.0.0.6;
}
interface all;
interface fxp0.0 {
disable;
}
[edit protocols mpls
user@R1# commit
commit complete
Sample Output 2
[edit protocols mpls]
user@R6# show
label-switched-path R6-to-R1 {
to 10.0.0.1;
}
interface all;
interface fxp0.0 {
disable;
}
Meaning
The sample output shows that two CSPF LSPs (R1-to-R6 and R6-to-R1) are configured between routers R1 and R6. CSPF is enabled by default with the Junos OS. The example network shown in MPLS Network Topology focuses on CSPF LSPs.
The CSPF algorithm is an advanced form of the SPF algorithm used in OSPF and IS-IS route computations. CSPF is used in computing paths for LSPs that are subject to multiple constraints. When computing paths for LSPs, CSPF considers not only the topology of the network, but also the attributes of the LSP and the links, and attempts to minimize congestion by intelligently balancing the network load.
Typically in a network, LSPs are configured to every other egress router, resulting in a full mesh of LSPs that correspond to the BGP full mesh. In the example network shown in MPLS Network Topology, two LSPs are configured between R1 and R6 to allow for bidirectional traffic. The first LSP is from R1 to R6 (R1-to-R6) and the second is from R6 to R1 (R6-to-R1). If only one LSP was configured, for example, from R1 to R6, only unidirectional traffic would be allowed.
Verify the LSP
Purpose
After configuring the LSP, you must verify that the LSP is up. LSPs can be ingress, transit, or egress. Use the show mpls lsp command for quick verification of the LSP state, with the extensive option (show mpls lsp extensive) as a follow-up if the LSP is down. If your network has numerous LSPs, you might consider specifying the name of the LSP, using the name option (show mpls lsp name name or show mpls lsp name name extensive).
Action
To verify that the LSP is up, enter the following command from the ingress router:
user@host> show mpls lsp extensive
Sample Output
user@R1> show mpls lsp extensive
Ingress LSP: 1 sessions
10.0.0.6
From: 10.0.0.1, State: Up, ActiveRoute: 1, LSPname: R1-to-R6
ActivePath: (primary)
LoadBalance: Random
Encoding type: Packet, Switching type: Packet, GPID: IPv4
*Primary State: Up
Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 20)
10.1.13.2 S 10.1.36.2 S
Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node 10=SoftPreempt):
10.1.13.2 10.1.36.2
6 Dec 13 11:50:15 Selected as active path
5 Dec 13 11:50:15 Record Route: 10.1.13.2 10.1.36.2
4 Dec 13 11:50:15 Up
3 Dec 13 11:50:15 Originate Call
2 Dec 13 11:50:15 CSPF: computation result accepted
1 Dec 13 11:49:45 CSPF failed: no route toward 10.0.0.6[6 times]
Created: Mon Dec 13 11:47:19 2004
Total 1 displayed, Up 1, Down 0
Egress LSP: 1 sessions
10.0.0.1
From: 10.0.0.6, LSPstate: Up, ActiveRoute: 0
LSPname: R6-to-R1, LSPpath: Primary
Suggested label received: -, Suggested label sent: -
Recovery label received: -, Recovery label sent: -
Resv style: 1 FF, Label in: 3, Label out: -
Time left: 127, Since: Mon Dec 13 11:50:10 2004
Tspec: rate 0bps size 0bps peak Infbps m 20 M 1500
Port number: sender 1 receiver 39136 protocol 0
PATH rcvfrom: 10.1.13.2 (so-0/0/2.0) 28709 pkts
Adspec: received MTU 1500
PATH sentto: localclient
RESV rcvfrom: localclient
Record route: 10.1.36.2 10.1.13.2 <self>
Total 1 displayed, Up 1, Down 0
Transit LSP: 0 sessions
Total 0 displayed, Up 0, Down 0
Meaning
The sample output from ingress router R1 show two LSPs in which this router participates: ingress LSP R1-to-R6 and egress LSP R6-to-R1 (the reverse LSP which allows bidirectional traffic). Both LSPs have active routes to the destination: 10.0.0.6 for the ingress LSP and 10.0.0.1 for the egress LSP. The state for both LSPs is up.
For more information on verifying the LSP, see Checklist for Determining LSP Status.

