Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


flex-algorithm (Protocols OSPF)


Hierarchy Level


Define a flexible algorithm for OSPFv2 to compute a path based on specified parameters to thin slice a network. We recommend configuring flexible algorithms on only a couple of routers to provide redundancy and to avoid conflicts.

Configure participation of routers in a specific flexible algorithm in a network at the [edit protocols] hierarchy level.


Modifying the flexible algorithm definition could cause traffic disruptions until all the nodes converge on the new paths.



Specify a flexible algorithm id to identify a flexible algorithm definition.

  • Range: 128 through 255


Specify a color to be associated with this flexible algorithm.

The remaining statements are explained separately. See CLI Explorer.

Required Privilege Level


Release Information

Statement introduced in Junos OS Release 21.1R1.