Supported Platforms
Related Documentation
- ACX, M, MX, T Series
- OSPF Support for Traffic Engineering
- ACX, M, MX, PTX, QFX, T Series
- Example: Configuring the Traffic Engineering Metric for a Specific OSPF Interface
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:
- Configure the device interfaces. See the Junos® OS Network Interfaces.
- Configure BGP per your network requirements. See the Junos OS Routing Protocols Configuration Guide
- Configure MPLS per your network requirements. See the Junos OS MPLS Applications Configuration Guide.
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:
Configuration on R2:
Configuration on R3:
Configuration on R4:
Step-by-Step Procedure
To enable OSPF traffic engineering support to advertise LSP metrics in summary LSAs:
- 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
- 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 - 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
- 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
- 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:
Output for R2:
Output for R3:
Output for R4:
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
- Verifying OSPF Entries in the Traffic Engineering Database
- Verifying That the Traffic Engineering Database Is Learning Node Information from OSPF
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.
Related Documentation
- ACX, M, MX, T Series
- OSPF Support for Traffic Engineering
- ACX, M, MX, PTX, QFX, T Series
- Example: Configuring the Traffic Engineering Metric for a Specific OSPF Interface
Published: 2012-12-08
Supported Platforms
Related Documentation
- ACX, M, MX, T Series
- OSPF Support for Traffic Engineering
- ACX, M, MX, PTX, QFX, T Series
- Example: Configuring the Traffic Engineering Metric for a Specific OSPF Interface