Configuring Multitopology Routing in OSPF
Multitopology Routing OSPF (MT-OSPF) enables you to define multiple topologies and to configure topology-specific metrics for individual links as well as to exclude individual links from specific topologies. As a result, you can use a single instance of OSPF to carry connectivity and IP reachability information for different topologies. Information for different topologies is used to calculate independent shortest-path-first (SPF) trees and routing tables. For information about configuration tasks for MT-OSPF, see the following sections:
- Configuring Topologies and SPF Options for MT-OSPF
- Configuring a Prefix Export Limit for MT-OSPF
- Configuring a Topology to Appear Overloaded
- Configuring Interface Properties for MT-OSPF
- Disabling MT-OSPF on OSPF Interfaces
- Disabling MT-OSPF on Virtual Links
- Advertising MPLS Label-Switched Paths into MT-OSPF
- Configuring Other MT-OSPF Properties
Configuring Topologies and SPF Options for MT-OSPF
Include the following statements to enable topologies for OSPF and to configure topology identifiers. Any topologies you enable for OSPF must first be created under the [edit routing-options] hierarchy level. The routes for each topology are added to the routing table for the topology. For more information about the naming conventions for routing tables for topologies, see Multitopology Routing Overview.
The default topology is automatically created and has a topology identifier of 0 (zero), which cannot be modified. The routes that correspond to the default topology are added to the inet.0 routing table. You can, however, modify other parameters, such as shortest-path first (SPF) options. In addition, you can specify a topology for IPv4 multicast traffic. The topology for IPv4 multicast has a topology identifier of 1, which you cannot modify. The routes corresponding to this topology are added to the inet.2 routing table. You can also configure for each topology options for the SPF algorithm that override the default or globally configured SPF values. Include the following statements to configure a topology for OSPF and SPF options for the topology at the [edit protocols ospf] hierarchy level:
For name, include the name of a topology that you configured under the [edit routing-options] hierarchy level to create the topology.
Use ipv4-multicast for IPv4 multicast traffic. You must first enable this topology under the [edit routing-options] hierarchy level.
topology-id number is the topology identifier. The range for topology-id number is from 32 through 127 for any topology you create, except for the default and IPv4 multicast topologies. The identifier for those topologies is predefined and cannot be modified.
![]() | Note: Multitopology Routing is not currently supported for OSPF version 3 (OSPFv3). |
You can configure SPF options for each topology. The values you configure for each of the following options override the default or globally configured values.
- The delay in the time between the detection of a topology change and when the SPF algorithm actually runs
- The maximum number of times that the SPF algorithm can run in succession before the hold-down timer begins
- The time to hold down, or wait, before running another SPF calculation after the SPF algorithm has run in succession the configured maximum number of times
To configure the SPF delay, include the delay statement when specifying the spf-options statement:
By default, the SPF algorithm runs 200 milliseconds after the detection of a topology change. The range that you can configure is from 50 through 8000 milliseconds.
To configure the maximum number of times that the SPF algorithm can run in succession, include the rapid-runs statement when specifying the spf-options statement:
The default number of SPF calculations that can occur in succession is 3. The range that you can configure is from 1 through 5. Each SPF algorithm is run after the configured SPF delay. When the maximum number of SPF calculations occurs, the hold-down timer begins. Any subsequent SPF calculation is not run until the hold-down timer expires.
To configure the SPF hold-down timer, include the holddown statement when specifying the spf-options statement:
The default is 5000 milliseconds, and the range that you can configure is from 2000 through 20,000 milliseconds. Use the hold-down timer to hold down, or wait, before running any subsequent SPF calculations after the SPF algorithm runs for the configured maximum number of times. If the network stabilizes during the hold-down period and the SPF algorithm does not need to run again, the system reverts to the configured values for the delay and rapid-runs statements.
Configuring a Prefix Export Limit for MT-OSPF
By default, each topology uses the globally configured value to determine the maximum number of prefixes that can be exported into OSPF. You can override the globally configured value for any configured topology. Include the prefix-export-limit number statement at the [edit protocols ospf topology name] hierarchy level:
The number that you can configure for each topology is from 0 through 4,294,967,295.
Configuring a Topology to Appear Overloaded
You can configure a specific topology so that it appears to be overloaded. You might do this when you want the topology to participate in OSPF routing but do not want it to be used for transit traffic.
To mark a topology as overloaded, include the overload statement:
Configuring Interface Properties for MT-OSPF
The default value of the topology metric is the same as the default metric value calculated by OSPF or the value configured for the OSPF metric. You can configure a topology-specific metric for an OSPF interface. To configure interfaces of MT-OSPF, Include the following statements at the [edit protocols ospf area area-id] hierarchy level:
All OSPF interfaces have a cost, which is a routing metric that is used in the link-state calculation. Routes with lower total path metrics are preferred over those with higher path metrics. The default value for the OSPF metric for an interface is 1. You can modify the default value for an OSPF interface and configure a topology-specific metric for that interface. The topology-specific metric applies to routes advertised from the interface that belong only to that topology. The range that you can configure is from 1 through 65,535.
You can also configure any interface that belongs to one or more topologies to advertise the direct interface addresses without actually running OSPF on that interface. By default, OSPF must be configured on an interface for direct interface addresses to be advertised as interior routes. Include the passive statement at the [edit protocols ospf area area-id interface interface-name] hierarchy level:
![]() | Note: If you configure an interface with the passive statement, it applies to all the topologies to which the interface belongs. You cannot configure an interface as passive for only one specific topology and have it remain active for any other topologies to which it belongs. |
Disabling MT-OSPF on OSPF Interfaces
By default, all topologies configured for OSPF are enabled on all OSPF interfaces. You can disable one or more configured topologies on an OSPF interface. To disable a configured topology on an OSPF interface, include the disable statement at the [edit protocols ospf area area-id interface interface-name topology name] hierarchy level:
You cannot disable an interface in the default topology and have it remain active in any other configured topologies.
![]() | Note: If you disable OSPF on an interface by including the disable statement at the [edit protocols ospf area area-id interface interface-name] hierarchy level, the interface is disabled for all topologies, including the default topology. |
Disabling MT-OSPF on Virtual Links
By default, control packets sent to the remote end of a virtual link must be forwarded using the default topology. In addition, the transit area path consists only of links that are in the default topology. You can disable a virtual link for a configured topology, but not for a default topology. Include the disable statement at the [edit protocols ospf area area-id virtual-link neighbor-id router-id transit-area area-id topology name] hierarchy level:
![]() | Note: If you disable the virtual link by including the disable statement at the [edit protocols ospf area area-id virtual-link neighbor-id router-id transit-area area-id] hierarchy level, you disable the virtual link for all topologies, including the default topology. You cannot disable the virtual link only in the default topology. |
Advertising MPLS Label-Switched Paths into MT-OSPF
You can advertise label-switched paths (LSPs) into OSPFv2 as point-to-point links so that all participating routers can take the LSP into account when performing SPF calculations. By default, all topologies configured for OSPF are enabled on all MPLS LSPs advertised into OSPF. You can override this behavior by disabling one or more configured topologies on an MPLS LSP.
The LSP advertisement contains a local address (the from address of the LSP), a remote address (the to address of the LSP), and a metric with the following precedence:
- Use the LSP metric defined under OSPFv2.
- Use the LSP metric configured under MPLS.
- If you do not configure any of the above, use the default OSPFv2 metric of 1.
In addition, the default value of the topology-specific metric is the same as the default metric calculated by OSPF or configured for the MPLS LSPs. You can also override this value by configuring a specific metric for the topology. For more information about configuring a topology-specific metric, see Configuring Topologies.
To disable a topology on LSPs and configure a label-switched path metric for OSPFv2, include the following statements at the [edit protocols ospf] hierarchy level:
![]() | Note: You cannot disable an MPLS LSP only on the default topology and have it remain enabled on other topologies. |
For more information about advertising LSPs, see the Junos MPLS Applications Configuration Guide.
Configuring Other MT-OSPF Properties
You can also configure the following properties for all topologies in an instance. You cannot configure the following properties for an individual topology:
- Disable not-so-stubby-area (NSSA) support on an autonomous-system border router (ASBR)
- Modify the preference value for OSPF internal routes
- Modify the default preference value for OSPF external routes
- Modify the reference-bandwidth value
- Enable graceful restart
To disable exporting Type 7 LSAs into LSAs, include the no-nssa-abr statement.
For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.
By default, internal OSPF routes have a preference value of 10, and external OSPF routes have a preference value of 150. To modify the preference values for all topologies, include the preference statement (for internal routes) or the external-preference statement (for external routes):
For a complete list of hierarchy levels at which you can configure these statements, see the statement summary sections for these statements.
You can configure a preference value of from 0 through 255 for each statement.
The reference bandwidth is used to calculate the default cost of a route using the following formula:
The default value for the reference bandwidth is 100 Mbps (which you specify as 100,000,000), which gives a metric of 1 for any bandwidth that is 100 Mbps or greater. To modify the default value, Include the reference-bandwidth statement:
The range that you can specify is from 9,600 through 1,000,000,000,000
For a complete list of hierarchy levels at which you can configure this statement, see the statement summary section for this statement.
![]() | Note: You can specify topology-specific metrics for routes advertised from an interface. For more information, see Configuring Topologies. |
Graceful restart enables a restarting router and its neighbors to continue forwarding packets without disrupting network performance. Because neighboring routers assist in the restart (these neighbors are called helper routers), the restarting router can quickly resume full operation without recalculating algorithms.
Graceful restart is disabled by default. You can globally configure graceful restart for all routing protocols at the [edit routing-options] hierarchy level. To configure graceful restart parameters specifically for OSPF, include the graceful-restart statement at the [edit protocols ospf] hierarchy level. For more information about how to configure graceful restart, see the Junos High Availability Configuration Guide.
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
