Once an LSP has been established, topology or resources changes might, over time, make the path suboptimal. A new path might have become available that is less congested, has a lower metric, and traverses fewer hops. You can configure the router to recompute paths periodically to determine whether a more optimal path has become available.
If reoptimization is enabled, an LSP can be rerouted through different paths by constrained-path recomputations. However, if reoptimization is disabled, the LSP has a fixed path and cannot take advantage of newly available network resources. The LSP is fixed until the next topology change breaks the LSP and forces a recomputation.
Reoptimization is not related to failover. A new path is always computed when topology failures occur that disrupt an established path.
Because of the potential system overhead involved, you need to control carefully the frequency of reoptimization. Network stability might suffer when reoptimization is enabled. By default, the optimize-timer statement is set to 0 (that is, it is disabled).
Configuring LSP optimization is meaningful only when constrained-path LSP computation is enabled, which is the default behavior. For more information about constrained-path LSP computation, see Disabling Constrained-Path LSP Computation.
To enable path reoptimization, include the optimize-timer statement:
-
optimize-timer seconds;
For a list of hierarchy levels at which you can include this statement, see the statement summary section for this statement.
Once you have configured the optimize-timer statement, the reoptimization timer continues its countdown to the configured value even if you delete the optimize-timer statement from the configuration. The next optimization uses the new value. You can force the JUNOS software to use a new value immediately by deleting the old value, committing the configuration, configuring the new value for the optimize-timer statement, and then committing the configuration again.
After reoptimization is run, the result is accepted only if it meets the following criteria:
The relative congestion of the new path is determined as follows:
When all the above conditions are met, then:
You can disable the following reoptimization criteria (a subset of the criteria listed previously) by issuing the clear mpls optimize-aggressive command or including the optimize-aggressive statement at the [edit protocols mpls] hierarchy level:
Including the optimize-aggressive statement in the configuration causes the reoptimization procedure to be triggered more often. Paths are rerouted more frequently. It also limits the reoptimization algorithm to the IGP metric only.