Flex-Algo In OcNOS: Optimizing Network Paths Using TE-Metric

In today’s digital world, network traffic is like city traffic i.e. some roads are faster, some are more reliable, and some should be avoided during peak hours. Just like how a GPS chooses the best route based on distance, time, or road conditions, networks also need to choose the best path for data to travel.

That’s where Flexible Algorithms (Flex-Algo) come in.

Flex-Algo is a technology that gives network operators more control and intelligence over how data moves across the network, based on custom goals, such as:

  • Choosing the fastest route
  • Avoiding congested or costly links
  • Sending traffic over only trusted or secure parts of the network

This blog will break down how metric types (TE-Metric) help Flex-Algo optimize routing decisions and why it matters not just to engineers, but to businesses relying on fast and reliable digital experiences.

What is TE-Metric in simple terms?

Imagine you’re planning a road trip for a delivery service. You have two options:

  • Route A is a highway, longer in distance but smooth and fast.
  • Route B is a shortcut through city traffic, shorter, but full of traffic lights and congestion.

If your priority is speed and reliability, you’d probably choose Route A, even though it’s longer. That’s the basic idea behind TE-metric in networks.

In networking, data travels from one point to another, just like vehicles on roads. The TE-metric allows network engineers to assign custom values to different links (or “roads”) in the network, based on how suitable or preferred they are for certain types of traffic.

Instead of just using the shortest or cheapest path, TE-metric lets us define smarter paths based on performance, capacity, or even business policies.

Real-World Example for Business:

Let’s say a company runs both:

  • A critical video conferencing system
  • And routine data backups overnight

Using TE-metric, the network can be tuned so:

  • Video calls go through the fastest and most stable links (high-priority route)
  • Backups take a different, less expensive or slower route (low-priority path)

This ensures that high-priority business services are always running smoothly, even if the network is busy.

Think of TE-metric in Flex-Algo as a way to define custom lanes in your network — some fast, some cost-effective, some private — and steer each type of traffic accordingly.

It’s not just about moving data. It’s about moving the right data, the right way, to meet business needs.

TE Metric Explained:

The TE metric allows more refined path selection by incorporating parameters beyond the default IGP cost.

  • TE metrics are manually assigned to links, allowing precise control over path selection.
  • Typically used in MPLS Traffic Engineering (MPLS-TE) deployments.
  • Enables operators to create alternate topologies where paths are optimized based on custom weightings.
  • Useful for scenarios where traffic should be steered away from congested or lower-capacity links.

Hands-On with Flex-Algo TE-Metric: Topology, Configuration, and Validation

Topology: R4, R5, and R6 will function as Provider Edge (PE) routers, while R1, R2, R3, and R7 will serve as Provider (P) routers. The PE routers (R4, R5, and R6) will run both algorithms, Flex-Algo 130 and Flex-Algo 131. Among the P routers, R3 will run Flex-Algo 130, R1 and R2 will run Flex-Algo 131, and R7 will support both Flex-Algo 130 and Flex-Algo 131.

                                                                    Topology-1: Flex-Algo-0 i.e. default Flexible Algorithm

                                                                                          Topology-2: Flex-Algo-130

                                                                                          Topology-3: Flex-Algo-131

Sample configuration from R1 device:

Loopback interface configuration on R4(PE) router:

Configures the Prefix-SID for both the default and specific algorithms on the loopback interfaces of the respective devices.

Physical interface configuration:

Enables “label-switching” with network type “point-to-point” (can be broadcast also) and configures ISIS process “OCNOS” under the interface. By default, the TE-metric mirrors the IGP metric unless it is explicitly configured otherwise.

Router ISIS configuration:

Note: To enable SR-MPLS under IS-IS, configuring “metric-style wide” and “mpls traffic-engineering” for the respective level is mandatory. For Flex-Algo, we need to enable “capability flex-algo routing” and then configure the required Flex-Algo. By default, the metric type used is IGP metric. To use TE-metric, it must be explicitly configured.

In IS-IS Segment Routing Flex-Algo, the default priority is set to 5. If multiple devices share the same priority, the device with the highest router ID takes precedence. To ensure predictable path selection, it’s advisable to assign a higher priority to the intended device for Flex-Algo computations.

Validation Steps:

Check the ISIS neighborship:

Verifies ISIS neighborship status, outgoing interface, and type.

Check the ISIS neighborship detail:

Provides additional details like uptime and adjacency SID.

Check the ISIS topology:

Shows topology details, including metrics and next-hop information for the default and specified algorithms. In the Metric field, ‘–’ indicates the local device, while ‘**’ signifies exclusion from the respective algorithm.

Check the ISIS routes:

Analyzes IS-IS routes along with their associated metrics and next-hop details for the default and specified algorithms.

Check the ISIS SR state:

Verifies ISIS-SR state and used SRGB on the router.

Check the ISIS SR capabilities of routers in the network:

Identifies IS-IS SR-capable routers in the network, the enabled Flex-Algo instances, and their respective SRGB.

Check the ISIS SR flex-algo status user-config summary:

Shows a summary of the user-configured settings for all Flex-Algos on the local router node.

Shows a summary of the user-configured Flex-Algo settings on the local router node

Check the ISIS SR flex-algo status user-config detail:

Provides a detailed view of the user-configured settings for all Flex-Algos on the local router node, showcasing an example for algorithm 130.

Provides a detailed view of the user-configured Flex-Algo settings on the local router node.

Check the ISIS SR flex-algo status election summary:

Shows a summary of all Flex-Algo FADs learned from participating routers in the election process.

Shows a summary of a Flex-Algo FAD learned from all routers in the SR domain that participated in the election process.

Check the ISIS SR flex-algo status election detail:

Provides a detailed view of all Flex-Algo FADs learned from routers that participated in the election process, showcasing few routers an example from algorithm 130.

Provides a detailed view of a Flex-Algo FAD learned from all routers in the SR domain that participated in the election process, showcasing few routers an example from algorithm 131.

Check the ISIS SR flex-algo status winner summary:

Shows a summary of all Flex-Algo FAD elected as the winner across all routers in the SR domain.

Shows a summary of the Flex-Algo FAD elected as the winner across all routers in the SR domain.

Check the ISIS SR flex-algo status winner detail:

Provides a detailed view of all Flex-Algo FAD elected as the winner across all routers in the SR domain.

Provides a detailed view of the Flex-Algo FAD elected as the winner across all routers in the SR domain.

Check the ISIS database:

Verifies the ISIS-SR database.

Check the ISIS database verbose:

Provides detailed IS-IS SR database information, including SRGB, Prefix-SID for default and respective algorithm, Adjacency SID. Also includes Flex-Algo details such as metric type, calculation type, priority etc.

Check the MPLS forwarding-table (FTN) entries in software (NSM) for respective algorithm:

Verify the MPLS Forwarding Table (FTN) entries for the loopback addresses of all other routers in the network. This command displays key details such as the outbound label (out-label), outbound interface (out-interface), next-hop, and more. Additionally, for Flex-Algo, it ensures that the correct forwarding paths are established based on the algorithm-specific constraints and metrics. Performing this check on the source router is crucial for validating proper routing and label allocation.

Check the MPLS ilm-table entries in software (NSM) for respective algorithm:

Verify the MPLS ILM (Incoming Label Mapping) table entries for the loopback addresses of all other routers and network links. This command provides critical details, including the inbound label (in-label), outbound label (out-label), outbound interface (out-interface), next-hop, and more. For Flex-Algo, it ensures that label forwarding aligns with the algorithm-specific constraints and path selection. Performing this check on the transit router is essential for validating correct label switching and path computation.

Check the P space nodes, Q space node and PQ node (if we have common PQ) for respective algorithm:

Check the ISIS-SR primary route and TI-LFA backup route along with backup tunnel for respective algorithm.

Verifies Flexible Algorithm specific ISIS TI-LFA routing table

Check the ISIS-SR primary route and TI-LFA backup route along with backup tunnel for a particular FEC in respective algorithm:

Verifies Flexible Algorithm specific ISIS TI-LFA routing table for particular FEC.

Check the MPLS ping and trace:

MPLS ping and trace are available for the default algorithm. For specific algorithms, MPLS ping is currently supported, while MPLS trace will be introduced in the next release.

Conclusion:

Flex-Algo with TE-Metric empowers networks to make smarter routing decisions that go beyond traditional shortest-path logic. By assigning custom metrics to network links, operators can prioritize critical services, avoid congestion, and align traffic flow with business needs. This capability enables organizations to deliver more reliable digital experiences while optimizing infrastructure use and controlling costs. Flex-Algo is not just a technical feature, it’s a strategic tool that transforms how networks support real-time business priorities.

Next Topic: Flex-Algo in OcNOS: Optimizing Network Paths Using Link Delay.

Contact us today to learn how OcNOS will work for your network.


Suraj Kumar Singh is Senior Solution Lead at IP Infusion.