Configuring Traffic Engineering for LSPs
When you configure an LSP, a host route (a 32-bit mask) is installed in the ingress router toward the egress router; the address of the host route is the destination address of the LSP. Typically, you configure the BGP option (traffic-engineering bgp), allowing only BGP to use LSPs in its route calculations. The other traffic-engineering statement options allow you to alter this behavior in the master instance. This functionality is not available for specific routing instances. Also, you can enable only one of the traffic-engineering statement options (bgp, bgp-igp, bgp-igp-both-ribs, or mpls-forwarding) at a time.
![]() | Note: Enabling or disabling any of the traffic-engineering statement options causes all the MPLS routes to be removed and then reinserted into the routing tables. |
You can configure OSPF and traffic engineering to advertise the LSP metric in summary link-state advertisements (LSAs) as described in the section Configuring Traffic Engineering for LSPs.
The following sections describe how to configure traffic engineering for LSPs:
Using RSVP and LDP Routes for Traffic Forwarding
Configure the bgp-igp option of the traffic-engineering statement to cause BGP and the interior gateway protocols (IGPs) to use LSPs for forwarding traffic destined for egress routers. The bgp-igp option causes all inet.3 routes to be moved to the inet.0 routing table.
On the ingress router, include the traffic-engineering bgp-igp statement:
You can include this statement at the following hierarchy levels:
- [edit protocols mpls]
- [edit logical-systems logical-system-name protocols mpls]

Note: The bgp-igp option of the traffic-engineering statement cannot be configured for virtual private networks (VPNs). VPN routing instances require that routes be in the inet.3 routing table.
Using RSVP and LDP Routes for Forwarding in Virtual Private Networks
VPNs rely on the routes in the inet.3 routing table to function properly. For VPNs, configure the bgp-igp-both-ribs option of the traffic-engineering statement to cause BGP and the IGPs to use LSPs for forwarding traffic destined for egress routers. The bgp-igp-both-ribs option installs the ingress routes in both the inet.0 routing table (for IPv4 unicast routes) and the inet.3 routing table (for MPLS path information).
On the ingress router, include the traffic-engineering bgp-igp-both-ribs statement:
You can include this statement at the following hierarchy levels:
- [edit protocols mpls]
- [edit logical-systems logical-system-name protocols mpls]
Using RSVP and LDP Routes for Forwarding but Not Route Selection
If you configure the traffic-engineering bgp-igp statement or the traffic-engineering bgp-igp-both-ribs statement, high-priority RSVP and LDP routes can supersede IGP routes in the inet.0 routing table. IGP routes might no longer be redistributed since they are no longer the active routes.
When you configure the mpls-forwarding option at either the [edit logical-systems logical-system-name protocols mpls traffic-engineering] hierarchy level or the [edit protocols mpls traffic-engineering] hierarchy level, RSVP and LDP routes are used for forwarding but are excluded from route selection. These routes are added to both the inet.0 and inet.3 routing tables. RSVP and LDP routes in the inet.0 routing table are given a low preference when the active route is selected. However, RSVP and LDP routes in the inet.3 routing table are given a normal preference and are therefore used for selecting forwarding next hops.
When you activate the mpls-forwarding option, routes whose state is ForwardingOnly are preferred for forwarding even if their preference is lower than that of the currently active route. To examine the state of a route, execute a show route detail command.
To configure, include the traffic-engineering mpls-forwarding statement:
You can include this statement at the following hierarchy levels:
- [edit protocols mpls]
- [edit logical-systems logical-system-name protocols mpls]
When you configure the mpls-forwarding option, IGP shortcut routes are copied to the inet.0 routing table only.
Advertising the LSP Metric in Summary LSAs
You can configure MPLS and OSPF to treat an LSP as a link. This configuration allows other routers in the network to use this LSP. To accomplish this goal, you need to configure MPLS and OSPF traffic engineering to advertise the LSP metric in summary LSAs.
For MPLS, include the traffic-engineering bgp-igp and label-switched-path statements:
You can include these statements at the following hierarchy levels:
- [edit protocols mpls]
- [edit logical-systems logical-system-name protocols mpls]
For OSPF, include the lsp-metric-into-summary statement:
You can include this statement at the following hierarchy levels:
- [edit protocols ospf traffic-engineering shortcuts]
- [edit logical-systems logical-system-name protocols ospf traffic-engineering shortcuts]
For more information about MPLS traffic engineering, see Configuring Traffic Engineering for LSPs. For more information about OSPF traffic engineering, see the Junos Routing Protocols Configuration Guide.
