Configuring IGPs and MPLS
You can use the tunnel mpls autoroute announce command to configure a tunnel to announce its endpoint to IS-IS or OSPF so that the IGP can then use the LSP as a shortcut to a destination based on the LSP's metric.
Note: This section discusses IS-IS and OSPF; for information on BGP and MPLS, see Configuring Virtual Private Networks in this chapter and Chapter 3, Configuring BGP/MPLS VPNs.![]()
If no tunnels are present, the IGP calculates the shortest path to a destination by using the shortest path first (SPF) algorithm. The results are represented by the destination node, next-hop address, and output interface, where the output interface is a physical interface. With traffic engineering, the IGP can include MPLS label-switched paths (LSPs or tunnels) as part of the SPF calculation.
If you configure an LSP to be announced to the IGP with a certain metric, the LSP appears as a logical interface directly connected to the LSP endpoint. The IGP can consider the LSP as a potential output interface for the LSP endpoint and for destinations beyond the endpoint. In this case, the SPF computation results are represented by the destination node and the output LSP, effectively using the LSP as a shortcut through the network to the destination.
By default, IS-IS and OSPF always use the MPLS tunnel to reach the tunnel endpoint. Best paths determined by SPF calculations are not considered. You can enable the consideration of best paths by issuing the mpls spf-use-any-best-path command. This command causes the IGP to evaluate the LSP as it would any other path. The IGP then either forwards traffic along the best path (which might be the MPLS tunnel), or load-balances between the MPLS tunnel and another path.
The default behavior applies only to reaching the tunnel endpoint itself. For prefixes downstream of the tunnel endpoint, the value of the tunnel metric always determines whether the IGP uses the LSP or the native path, or load-balances between the native path and one or more LSPs.
The tunnel metric can be absolute or relative. An absolute metric indicates there is no relationship to the underlying IGP cost. A relative metric is added to or subtracted from the underlying IGP shortest path cost.
Example 1
The following commands announce the tunnel to OSPF and specify a relative metric of -2:
host1(config-if)#tunnel mpls autoroute announce ospfhost1(config-if)#tunnel mpls autoroute metric relative -2By default, the LSP is preferred to reach the tunnel endpoint. OSPF will treat this LSP as having a metric of 2 less than the shortest path metric it has calculated. The LSP is therefore also preferred over other paths to prefixes beyond the tunnel endpoint.
Example 2
The following commands announce the tunnel to OSPF, specify an absolute metric of 25, and configure OSPF to enable the consideration of SPF best paths:
host1(config-if)#tunnel mpls autoroute announce ospfhost1(config-if)#tunnel mpls autoroute metric absolute 25...host1(config-router)#mpls spf-use-any-best-pathOSPF will consider this metric in its SPF calculations for traffic to the tunnel endpoint as well as beyond the endpoint. Traffic will be routed via this LSP only if the other calculated paths have higher metrics.
Configuring the IGPs for Traffic Engineering
For both IGPs, you must issue two commands to enable the IGP to support traffic engineering. Refer to the ERX Routing Protocols Configuration Guide, Vol. 1, Chapter 8, Configuring IS-IS and ERX Routing Protocols Configuration Guide, Vol. 1, Chapter 7, Configuring OSPF for more information on using these commands.
- IS-IS - Enable the flooding of MPLS traffic-engineering link information into the specified IS-IS level with the mpls traffic-eng command. You must also specify a stable router interface with the mpls traffic-eng router-id command.
MPLS traffic engineering also requires that IS-IS generate the new-style TLVs that enable wider metrics. Use the metric-style wide command to generate the new-style TLVs. If you are using some IS-IS routers that still do not understand the new-style TLVs, use the metric-style transition command.
- OSPF - Enable OSPF areas for traffic engineering with the mpls traffic-eng area command. OSPF generates opaque LSAs—also known as type-10 opaque link area link states—to flood the traffic-engineering information to the specified area. OSPF builds a traffic-engineering database that it uses in the calculation of shortest path to destinations that satisfy specified traffic-engineering constraints. As with IS-IS, you must also specify a stable router interface with the mpls traffic-eng router-id command.
When you configure a node as the downstream endpoint of an LSP, you must provide a stable interface as the router ID for the endpoint. Typically you select a loopback interface because of its inherent stability. Use the mpls traffic-eng router-id command to designate the router as TE capable and to specify the router ID. For all tunnels that end at this node, set the tunnel destination to the destination node's traffic-engineering router identifier, because the traffic-engineering topology database at the tunnel ingress uses that for its path calculation.
Monitoring Traffic Engineering
The following show commands display information about IS-IS traffic engineering:
- show isis mpls tunnel - displays information about any tunnels that are used by IS-IS when calculating next hops. These are tunnels that are either registered with IS-IS when the MPLS tunnel is established or that are explicitly configured as static routes.
- show isis database verbose - displays MPLS traffic-engineering information about the IS-IS database.
- show isis mpls advertisements - displays the last record flooded from MPLS
- show isis mpls adjacency-log - displays a log of the last 20 IS-IS adjacency changes
For OSPF, you can use the show ip ospf database opaque-area command to display information about traffic-engineering opaque LSAs.