Supported Platforms
Configuring Static LSPs
To configure static LSPs, configure the ingress router and each router along the path up to and including the egress router.
To configure static MPLS, perform the following tasks:
Configuring the Ingress Router for Static LSPs
The ingress router checks the IP address in the incoming packet’s destination address field and, if it finds a match in the routing table, applies the label associated with that address to the packets. The label has forwarding information associated with it, including the address of the next-hop router, and the route preference and CoS values.
To configure static LSPs on the ingress router, include the ingress statement:
You can include these statements at the following hierarchy levels:
- [edit protocols mpls static-label-switched-path static-lsp-name]
- [edit logical-systems logical-system-name protocols mpls static-label-switched-path static-lsp-name]
When you configure a static LSP on the ingress router, the next-hop, push, and to statements are required; the other statements are optional.
The configuration for a static LSP on the ingress router requires you to configure the following parts:
Criteria for analyzing an incoming packet:
- The install statement creates an LSP that handles IPv4 packets. All static MPLS routes created using the install statement are installed in inet.3 routing table, and the creating protocol is identified as static. This process is no different from creating static IPv4 routes at the [edit routing-options static] hierarchy level.
- In the to statement, you configure the IP destination address to check when incoming packets are analyzed. If the address matches, the specified outgoing label (push out-label) is assigned to the packet, and the packet enters an LSP. Manually assigned outgoing labels can have values from 0 through 1,048,575. Each prefix that you specify is installed as a static route in the routing table.
- The next-hop statement, which supplies the IP address of the next hop to the destination. You can specify this as the IP address of the next hop, the interface name (for point-to-point interfaces only), or as address/interface-name to specify an IP address on an operational interface. When the next hop is on a directly attached interface, the route is installed in the routing table. You cannot configure a LAN or nonbroadcast multiaccess (NBMA) interface as a next-hop interface.
Properties to apply to the LSP (all are optional):
- Bandwidth reserved for this LSP (bandwidth bps)
- Link protection and node protection to apply to the LSP (bypass bypass-name, link-protection bypass-name name, node-protection bypass-name next-next-label label)
- Metric value to apply to the LSP (metric)
- Class-of-service value to apply to the LSP (class-of-service)
- Preference value to apply to the LSP (preference)
- Traffic policing to apply to the LSP (policing)
- Text description to apply to the LSP (description)
- Install or no-install policy (install or no-install-to-address)
To determine whether a static ingress route is installed, use the command show route table inet.3 protocol static. Sample output follows. The push keyword denotes that a label is to be added in front of an IP packet.
10.0.0.0 *[Static/5] 00:01:48 > to 11.1.1.1 via so-0/0/0, push 1000123
Example: Configuring the Ingress Router
Configure the ingress router for a static LSP that consists of three routers (see Figure 1).
Figure 1: Static MPLS Configuration

For packets addressed to 10.0.0.0, assign label 1000123 and transmit them to the next-hop router at 11.1.1.1:
To determine whether the static ingress route is installed, use the following command:
Sample output follows. The push 1000123 keyword identifies the route.
10.0.0.0/8 *[Static/5] 00:01:48 > to 11.1.1.1 via so-0/0/0.0, push 1000123
Configuring the Intermediate (Transit) and Egress Routers for Static LSPs
Intermediate (transit) and egress routers perform similar functions—they modify the label that has been applied to a packet. An intermediate router can change the label. An egress router removes the label (if the packet still contains a label) and continues forwarding the packet to its destination.
To configure static LSPs on intermediate and egress routers, include the transit statement:
You can include these statements at the following hierarchy levels:
- [edit protocols mpls static-label-switched-path static-lsp-name]
- [edit logical-systems logical-system-name protocols mpls static-label-switched-path static-lsp-name]
For the transit statement configuration, the next-hop and pop | swap statements are required. The remaining statements are optional.
Each statement within the transit statement consists of the following parts:
- Packet label (specified in the transit statement)
- The next-hop statement, which supplies the IP address of the next hop to the destination. The address is specified as the IP address of the next hop, or the interface name (for point-to-point interfaces only), or address and interface-name to specify an IP address on an operational interface. When the specified next hop is on a directly attached interface, this route is installed in the routing table. You cannot configure a LAN or NBMA interface as a next-hop interface.
Operation to perform on the labeled packet:
- For egress routers, you generally just remove the packet’s label altogether (pop) and continue forwarding the packet to the next hop. However, if the previous router removed the label, the egress router examines the packet’s IP header and forwards the packet toward its IP destination.
- For intermediate (transit) routers only, exchange the label for another label (swap out-label). Manually assigned incoming labels can have values from 1,000,000 through 1,048,575. Manually assigned outgoing labels can have values from 0 through 1,048,575.
Label properties to apply to the packet (all are optional):
- Bandwidth reserved for this route (bandwidth bps).
- Link-protection and node-protection to apply to the LSP (bypass bypass-name, link-protection bypass-name name, node-protection bypass-name next-next-label label).
- Text description to apply to the LSP (specified in the description statement).
The static routes are installed in the default MPLS routing table, mpls.0, and the creating protocol is identified as static. To verify that a static route is properly installed, use the command show route table mpls.0 protocol static. Sample output follows:
1000123 *[Static/5] 00:00:38 > to 12.2.2.2 via so-5/0/0.0, swap 1000456
You can configure a revert timer for a static LSP transiting an intermediate router. After traffic has been switched to a bypass static LSP, it is typically switched back to the primary static LSP when it comes back up. There is a configurable delay in the time (called the revert timer) between when the primary static LSP comes up and when traffic is reverted back to it from the bypass static LSP. This delay is needed because when the primary LSP comes back up, it is not certain whether all of the interfaces on the downstream node of the primary path have come up yet. You can display the revert timer value for an interface using the show mpls interface detail command. For more information, see Configuring Primary and Secondary LSPs.
Example: Configuring an Intermediate Router
For packets labeled 1000123 arriving on interface so-0/0/0, assign the label 1000456, and transmit them to the next-hop router at 12.2.2.2:
To determine whether the static intermediate route is installed, use the following command:
Sample output follows. The swap 1000456 keyword identifies the route.
1000123 *[Static/5] 00:01:48 > to 12.2.2.2 via so-0/0/0, swap 1000456
Example: Configuring an Egress Router
For packets labeled 1000456 arriving on interface so-0/0/0, remove the label and transmit the packets to the next-hop router at 13.3.3.3:
To determine whether the static egress route is installed, use the following command:
Sample output follows. The pop keyword identifies the egress route.
1000456 *[Static/5] 00:01:48 > to 13.3.3.3 via so-0/0/0, pop
Configuring a Bypass LSP for the Static LSP
To enable a bypass LSP for the static LSP, configure the bypass statement:
Configuring the Protection Revert Timer for Static LSPs
For static LSPs configured with a bypass static LSP, it is possible to configure the protection revert timer. If a static LSP goes down and traffic is switched to the bypass LSP, the protection revert timer specifies the amount of time (in seconds) that the LSP must wait before it can revert back to the original static LSP.
The range of values you can configure for the protection revert timer is 0 through 65,535 seconds. The default value is 5 seconds.
If you configure a value of 0 seconds, the traffic on the LSP, once switched from the original static LSP to the bypass static LSP, remains on the bypass LSP permanently (until the network operator intervenes or until the bypass LSP goes down).
You can configure the protection revert timer for all LSPs on the router at the [edit protocols mpls] hierarchy level or for a specific LSP at the [edit protocols mpls label-switched-path lsp-name] hierarchy level.
To configure the protection revert timer for static LSPs include the protection-revert-time statement:
For a list of hierarchy levels at which you can include this statement, see the summary section for this statement.
Configuring Static Unicast Routes for Point-to-Multipoint LSPs
You can configure a static unicast IP route with a point-to-multipoint LSP as the next hop. For more information about point-to-multipoint LSPs, see Point-to-Multipoint LSPs Overview, Configuring Primary and Branch LSPs for Point-to-Multipoint LSPs, and Configuring CCC Switching for Point-to-Multipoint LSPs.
To configure a static unicast route for a point-to-multipoint LSP, complete the following steps:
- On the ingress PE router, configure a static
IP unicast route with the point-to-multipoint LSP name as the next
hop by including the p2mp-lsp-next-hop statement:p2mp-lsp-next-hop point-to-multipoint-lsp-next-hop;
You can include this statement at the following hierarchy levels:
- [edit routing-options static route route-name]
- [edit logical-systems logical-system-name routing-options static route route-name]
- On the egress PE router, configure a static IP unicast
route with the same destination address configured in Step 1 (the address configured at the [edit routing-options static route] hierarchy level) by including
the next-hop statement:next-hop address;
You can include this statement at the following hierarchy levels:
- [edit routing-options static route route-name]
- [edit logical-systems logical-system-name routing-options static route route-name]
Note: CCC and static routes cannot use the same point-to-multipoint LSP.
For more information on static routes, see the Junos OS Routing Protocols Configuration Guide.
The following show route command output displays a unicast static route pointing to a point-to-multipoint LSP on the ingress PE router where the LSP has two branch next hops:
user@host> show route 5.5.5.5 detail
inet.0: 29 destinations, 30 routes (28 active, 0 holddown, 1 hidden) 5.5.5.5/32 (1 entry, 1 announced) *Static Preference: 5 Next hop type: Flood Next hop: via so-0/3/2.0 weight 1 Label operation: Push 100000 Next hop: via t1-0/1/1.0 weight 1 Label operation: Push 100064 State: <Active Int Ext> Local AS: 10458 Age: 2:41:15 Task: RT Announcement bits (2): 0-KRT 3-BGP.0.0.0.0+179 AS path: I