When configuring a static route toward an indirect next hop, the path selection based upon the constraints of a particular Flex-Algorithm should be considered. In such a use case, it is necessary to steer traffic into a corresponding flexible algorithm segment routing tunnel. This can be achieved with the tunnel-next-hop flex-algo command. This uses the specified flexible algorithm to construct a tunnel toward the indirect static-route next-hop.
The use of this command assumes that the router is participating in the flexible algorithm. This command instructs the router to lookup the indirect next-hop using flexible algorithm tunnels. The static route is not activated if a flexible algorithm-aware tunnel does not exist in the indirect next-hop.
When a router receives an IP packet, the static-route-entry may steer toward the indirect next-hop using a flexible algorithm-aware SR tunnel, provided that such a tunnel exists. If the tunnel does not exist, the route is not active and the received IP packet is dropped, as long as no longest prefix match (LPM) route exists.
When the flex-algo command is configured, the resolution filter can only use matching flexible algorithm-aware SR tunnels created by flex-algo aware routing protocols (for example, SR IS-IS). If such an entry does not exist in the tunnel-table, the static-route-entry does not become active.
Use the following syntax to configure static routes using flexible algorithms.
- config>router
- [no] static-route-entry ip-prefix/prefix-length [mcast]
- [no] indirect ip-address
- tunnel-next-hop
- [no] disallow-igp
- no flex-algo
- flex-algo flex-algo
- resolution {any|disabled|filter}
- resolution-filter
- [no] sr-isis
- [no] sr-ospf