Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Enabling OSPF Traffic Engineering Support

This example shows how to enable OSPF traffic engineering support to advertise the label-switched path (LSP) metric in summary link-state advertisements (LSAs).

Requirements

Before you begin:

Overview

You can configure OSPF to treat an LSP as a link and have other routing devices in the network use this LSP. To accomplish this, you configure MPLS and OSPF traffic engineering to advertise the LSP metric in summary LSAs.

In this example, there are four routing devices in area 0.0.0.0, and you want OSPF to treat the LSP named R1-to-R4 that goes from the ingress Device R1 to the egress Device R4 as a link.

For OSPF, you enable traffic engineering on all four routing devices in the area by including the traffic-engineering statement. This configuration ensures that the shortest-path-first (SPF) algorithm takes into account the LSPs configured under MPLS and configures OSPF to generate LSAs that carry traffic engineering parameters. You further ensure that OSPF uses the MPLS LSP as the next hop and advertises the LSP metric in summary LSAs, by including the optional shortcuts lsp-metric-into-summary statement on the ingress Device R1.

For MPLS, you enable traffic engineering so that MPLS performs traffic engineering on both BGP and IGP destinations by including the traffic-engineering bgp-igp statement, and you include the LSP named R1-to-R4 by including the label-switched-path lsp-path-name to address statement on the ingress Device R1. The address specified in the to statement on the ingress Device R1 must match the router ID of the egress Device R4 for the LSP to function as a direct link to the egress routing device and to be used as input to the OSPF SPF calculations. In this example, the router ID of the egress Device R4 is 10.0.0.4.

Configuration

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Modifying the Junos OS Configuration in CLI User Guide.

CLI Quick Configuration

To quickly enable OSPF traffic engineering support to advertise the LSP metric in summary LSAs, copy the following commands and paste them into the CLI.

Configuration on R1:

[edit]set routing-options router-id 10.0.0.1set protocols ospf area 0.0.0.0 interface allset protocols ospf area 0.0.0.0 interface fxp0.0 disableset protocols ospf traffic-engineering shortcuts lsp-metric-into-summaryset protocols mpls traffic-engineering bgp-igpset protocols mpls label-switched-path R1-to-R4 to 10.0.0.4

Configuration on R2:

[edit]set routing-options router-id 10.0.0.2set protocols ospf area 0.0.0.0 interface allset protocols ospf area 0.0.0.0 interface fxp0.0 disableset protocols ospf traffic-engineering

Configuration on R3:

[edit]set routing-options router-id 10.0.0.3set protocols ospf area 0.0.0.0 interface allset protocols ospf area 0.0.0.0 interface fxp0.0 disableset protocols ospf traffic-engineering

Configuration on R4:

[edit]set routing-options router-id 10.0.0.4set protocols ospf area 0.0.0.0 interface allset protocols ospf area 0.0.0.0 interface fxp0.0 disableset protocols ospf traffic-engineering

Step-by-Step Procedure

To enable OSPF traffic engineering support to advertise LSP metrics in summary LSAs:

  1. Configure the router ID.
    [edit]user@R1# set routing-options router-id 10.0.0.1
    [edit]user@R2# set routing-options router-id 10.0.0.2
    [edit]user@R3# set routing-options router-id 10.0.0.3
    [edit]user@R4# set routing-options router-id 10.0.0.4
  2. Configure the OSPF area and add the interfaces.

    Note: To specify OSPFv3, include the ospf3 statement at the [edit protocols] hierarchy level.

    [edit]user@R1# set protocols ospf area 0.0.0.0 interface alluser@R1# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
    [edit]user@R2# set protocols ospf area 0.0.0.0 interface alluser@R2# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
    [edit]user@R3# set protocols ospf area 0.0.0.0 interface alluser@R3# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
    [edit]user@R4# set protocols ospf area 0.0.0.0 interface alluser@R4# set protocols ospf area 0.0.0.0 interface fxp0.0 disable
  3. Enable OSPF traffic engineering.
    [edit]user@R1 set protocols ospf traffic-engineering shortcuts lsp-metric-into-summary
    [edit]user@R2 set protocols ospf traffic-engineering
    [edit]user@R3 set protocols ospf traffic-engineering
    [edit]user@R4 set protocols ospf traffic-engineering
  4. On Device R1, configure MPLS traffic engineering.
    [edit ]user@R1 set protocol mpls traffic-engineering bgp-igpuser@R1 set protocols mpls label-switched-path R1-to-R4 to 10.0.0.4
  5. If you are done configuring the devices, commit the configuration.
    [edit]user@host# commit

Results

Confirm your configuration by entering the show routing-options, show protocols ospf, and show protocols mpls commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

Output for R1:

user@host# show routing-options router-id 10.0.0.1;
user@host# show protocols ospf traffic-engineering {shortcuts lsp-metric-into-summary;}area 0.0.0.0 {interface all;interface fxp0.0 {disable;}}
user@host# show protocols mpls traffic-engineering bgp-igp;label-switched-path R1-to-R4 {to 10.0.0.4;}

Output for R2:

user@host# show routing-options router-id 10.0.0.2;
user@host# show protocols ospf traffic-engineering;area 0.0.0.0 {interface all;interface fxp0.0 {disable;}}

Output for R3:

user@host# show routing-options router-id 10.0.0.3;
user@host# show protocols ospf traffic-engineering;area 0.0.0.0 {interface all;interface fxp0.0 {disable;}}

Output for R4:

user@host# show routing-options router-id 10.0.0.4;
user@host# show protocols ospf traffic-engineering;area 0.0.0.0 {interface all;interface fxp0.0 {disable;}}

To confirm your OSPFv3 configuration, enter the show routing-options, show protocols ospf3, and show protocols mpls commands.

Verification

Confirm that the configuration is working properly.

Verifying the Traffic Engineering Capability for OSPF

Purpose

Verify that traffic engineering has been enabled for OSPF. By default, traffic engineering is disabled.

Action

From operational mode, enter the show ospf overview command for OSPFv2, and enter the show ospf3 overview for OSPFv3.

Verifying OSPF Entries in the Traffic Engineering Database

Purpose

Verify the OSPF information in the traffic engineering database. The Protocol field displays OSPF and the area from which the information was learned.

Action

From operational mode, enter the show ted database command.

Verifying That the Traffic Engineering Database Is Learning Node Information from OSPF

Purpose

Verify that OSPF is reporting node information. The Protocol name field displays OSPF and the area from which the information was learned.

Action

From operational mode, enter the show ted protocol command.

Published: 2012-12-08