How to Configure Flexible Algorithms in OSPF for Segment Routing Traffic Engineering
SUMMARY A flexible algorithm allows IGPs alone to compute constraint based paths over the network thereby providing simple traffic engineering without using a network controller. This is a light weight solution for networks that have not implemented a controller with full fledged segment routing but still want to reap the benefits of segment routing in their network.
What's Next
For more information on configuring flexible algorithms, see the OSPF User Guide
Understanding OSPF Flexible Algorithm for Segment Routing
Starting in Junos OS Release 21.1R1, you can thin slice a network by defining flexible algorithms that compute paths using different parameters and link constraints based on your requirements. For example, you can define a flexible algorithm that computes a path to minimize IGP metric and define another flexible algorithm to compute a path based on traffic engineering metric to divide the network into separate planes. This feature allows networks without a controller to configure traffic engineering using segment routing without actually implementing a network controller. You can use the prefix SIDs to steer packets along the constraint-based paths. You can configure the prefix SIDs for flexible algorithm through policy configurations.
IGP protocols use a link metric to calculate a best path. However, the best IGP path might not always be the best path for certain types of traffic. Therefore, the IGP computed best path based on the shortest IGP metric is often replaced with traffic engineered path due to the traffic requirements that are not reflected by the IGP metric. Typically RSVP-TE or SR TE is used for computing the path based on additional metrics and constraints to overcome this limitation. Junos installs such paths in the forwarding tables in addition to or as a replacement for the original path computed by the IGPs.
- Benefits of Configuring Flexible Algorithm
- What is Flexible Algorithm Definition (FAD)?
- Participation in a Flexible Algorithm
- Network Topology Configured with Flexible Algorithm Definitions
- Flexible Algorithm RIBs
- BGP Community and Flexible Algorithms
- Supported and Unsupported Features
- Application-specific Link Attribute based flexible algorithm
- Strict Application-Specific Link Attribute based flexible algorithm
Benefits of Configuring Flexible Algorithm
-
A lightweight version of segment routing traffic engineering that can be used in the core of the network.
-
Allows you to configure traffic engineering using segment routing even without installing a network controller.
-
Utilize equal-cost multipath (ECMP) and TI-LFA per-slice without configuring BGP-LS or static path.
-
Compute TI-LFA backup path using the same flexible algorithm definition and constraints computation.
-
Take advantage of segment routing traffic engineering using only OSPFv2 without configuring RSVP or LDP.
-
Ability to provision constrained primary path based on a single label.
What is Flexible Algorithm Definition (FAD)?
A flexible algorithm allows IGP to calculate additional best paths based on specified constraints thereby providing simple traffic engineering without using a network controller. This is a lightweight solution for networks that have not implemented a controller with full fledged segment routing but still want to reap the benefits of segment routing in their network. Every operator can define separate constraints or colors depending on their requirements.
To define a flexible algorithm, include flex-algorithm
id
statement at the [edit routing-options]
hierarchy level. The flexible algorithm definition (FAD) is assigned with an identifier
ranging from 128 through 255. This flexible algorithm can be defined on one or more routers
in a network. A flexible algorithm computes a best path based on the following
parameters:
-
Calculation type—SPF or strict SPF are the two available calculation type options. You can specify one of these calculation types in your FAD. Select the SPF calculation type if you want to influence the SPF computation on your device based on a certain local policy such as traffic engineering shortcuts. If you select strict SPF then the local policy cannot influence the SPF path selection.
-
Metric type- IGP metric or TE metric are the available metric type options. You can specify one of these metric types in your FAD depending on your network requirement. If you do not want to use the IGP metric for a specific link you can configure a TE metric that OSPFv2 can use for calculating the route.
-
Priority- You can assign a priority to your FADs as per your requirement and OSPFv2 prioritizes a particular FAD advertisement over another FAD based on your assigned priority.
-
Set of Link constraints- You can configure admin-groups for many protocols at the
[edit protocols mpls admin-groups]
hierarchy level to color an individual link. Theseadmin-groups
can then be defined asinclude any
,include-all
orexclude
at the[edit routing-options flex-algorithm definition admin-groups]
hierarchy level.
We recommend configuring flexible algorithm on only a few routers to provide redundancy and
to avoid conflicts. Flexible algorithm definition is advertised in IGP as FAD
sub-TLVs
. In very large networks, we do not recommend configuring more than 8
flexible algorithm definitions as each flexible algorithm will compute its own path and
might cause performance issues beyond that.
The default FAD has the following parameters:
-
calculation type: spf
-
metric type: igp-metric
-
priority: 0
-
Link constraints: none
Modifying the flexible algorithm definition in a live network or on the fly could cause traffic disruptions until all the nodes converge on the new paths.
Starting in Junos OS 21.4R1, we support flexible Algorithm Definition (FAD)” and “Flexible Algorithm Prefix Metric (FAPM)” in TED and implements two new corresponding TLVs "FAD TLV" and "FAPM TLV" in BGP-LS. The value of FAD TLV contains Flex-Algorithm, Metric-Type, Calculation-Type and Priority, all of which are one byte each. The TLV might have zero or more sub-TLVs included in it. The five sub-tlvs are Flex Algo Exclude Any Affinity, Flex Algo Include Any Affinity, Flex Algo Include All Affinity, Flex Algo Definition Flags and Flex Algo Exclude SRLG.
The FAD TLV can only be added to the BGP-LS Attribute of the Node NLRI if the corresponding node originates in the underlying IGP TLV or sub-TLV. The BGP-LS Attribute associated with a Node NLRI might include one or more FAD TLVs corresponding to the Flexible Algorithm Definition for each algorithm that the node is advertising.
The value of FAPM TLV contains Flex-Algorithm (1 byte), Reserved (3 bytes) and Metric (4 bytes). The FAPM TLV can be added to the BGP-LS Attribute of the Prefix NLRI originated by a node, only if the corresponding node originates from the Prefix.
Starting in Junos OS Release 22.4R1, we've defined the Flexible Algorithm Prefix Metric (FAPM) to allow optimal end-to-end path for an interarea prefix. The area border router (ABR) must include the FAPM when advertising the prefix between areas that is reachable in that given Flexible Algorithm (flex algo). When a prefix is unreachable, the ABR must not include that prefix in that flex algo when advertising between areas. The defined FAPM provides inter-area support.
Participation in a Flexible Algorithm
You can configure specific routers to participate in a particular flexible algorithm as per your requirement. Paths computed based on a flexible algorithm definition is used by various applications each potentially using its own specific data plane for forwarding the data over such paths. The participating device must explicitly advertise its participation in a particular flexible algorithm to every application in the segment routing flexible algorithm sub TLV for OSPFv2. You can configure a node to participate in a certain flexible algorithm provided it can support the constraints specified in that FAD.
To configure participation in a flexible algorithm include the
flex-algorithm
statement at the [edit protocols isis
source-packet- routing]
hierarchy level. The same device can advertise a FAD and
also participate in a flexible algorithm.
Network Topology Configured with Flexible Algorithm Definitions
Figure 1 shows the sample topology, there are 8 routers R0, R1, R2, R3, R4, R5, R6, and R7. Four flexible algorithms, 128, 129, 130, and 135 are defined and configured with admin-groups as listed in the following table:
Flex Algorithm Definition (FAD) |
Color |
---|---|
128 |
Include any Red |
129 |
Include any Green |
130 |
Include any Green and Blue |
135 |
Exclude Red |
Figure 2 shows how FAD 128 routes traffic on any interface that is configured with admin group red.
Figure 3 shows how FAD 129 routes traffic on any interface that is configured with admin group green.
Figure 4 shows how FAD 130 routes traffic on any interface that is configured with admin group green and blue.
Figure 5 shows how FAD 135 routes traffic on any interface that is not configured with admin group red.
Flexible Algorithm RIBs
For every flexible algorithm that a router participates in the corresponding flexible
algorithm routes are installed in the corresponding flexible algorithm RIB groups also known
as routing tables. By default, labeled OSPFv2 flexible algorithm routes are installed in the
inet.color, inet(6)color.0
and mpls.0
RIBs.
BGP Community and Flexible Algorithms
A flexible algorithm can have an associated BGP color community to resolve routes of other
services such as VPN service. By default, the associated BGP color community is the same as
the flexible algorithm ID. The flexible algorithm ingress routes that are installed in the
inet(6)color.0 tables will have this color community in the route. However, you can
configure a different BGP color community at the [edit routing-options
flex-algorithm id color desired color community
value]
hierarchy level.
Changing the BGP color community for a flexible algorithm might result in traffic disruption. If you modify a BGP color community for a flexible algorithm then all routes pertaining to that flexible algorithm are removed from the RIB and added again with new colors.
Supported and Unsupported Features
Junos OS supports flexible algorithms in the following scenarios:
-
Support for configuring and advertising prefix SIDs for different flexible algorithms.
-
Partially supports Internet Draft draft-ietf-lsr-flex-algo-05.txt IGP Flexible Algorithm
- The current implementation for flexible algorithms is supported for only OSPFv2 only as only OSPFv2 supports segment routing.
Junos OS does not support the following features in conjunction with flexible algorithms:
-
Link delay metric is not supported.
-
Flexible algorithm is applicable only for default unicast topology, OSPFv2 multi-topology is not supported.
- OSPFv2 shortcuts and other OSPFv2 traffic engineering configuration options are not applicable for flexible algorithm computation. .
- The current implementation for flexible algorithms is not supported for OSPFv3.
-
Inter-area (OSPFv2) leaking of flexible algorithm prefix SIDs is not supported.
-
Prefix and SID conflict resolution is not supported.
-
Remote loop free alternate functionality is not supported because TI-LFA is the preferred FRR computation.
-
Advertising flexible algorithm definition in the absence of flexible algorithm participation is not supported.
-
Advertisement of link attributes for flex algorithm using the application-specific link attribute advertisements is not supported.
-
Transport class RIB is not supported.
Application-specific Link Attribute based flexible algorithm
Starting in Junos OS and Junos OS Evolved Release 22.2R1, you can advertise different te-attributes such as te-metric, delay-metric, or admin-groups for RSVP and flexible algorithms on the same link. This is done using flexible algorithm specific application-specific link attribute as defined in RFC 8920.
The advantage of having a flexible algorithm application-specific link attribute advertise te-metric, delay-metric, or admin-groups is that a single link can advertise different te-link-attributes for legacy applications such as RSVP and different te-link-attributes for flexible algorithms.
To configure flexible algorithm application-specific te-attribute, include the
application-specific
statement at the [edit protocols ospf area
interface]
hierarchy level and the
strict-asla-based-flex-algorithm
statement at the [edit protocols
ospf source-packet-routing]
hierarchy level. With this implementation, it is no
longer mandatory for the link to have RSVP enabled and [edit protocols ospf
traffic-engineering advertisement always]
to be configured which is the case with
the existing behavior of advertising traffic engineering attributes.
The Junos OS and Junos OS Evolved implementation of application-specific link attribute supports flexible algorithm applications only.
Strict Application-Specific Link Attribute based flexible algorithm
The default behavior of application-specific flexible algorithm is to use the flexible algorithm application-specific te-attributes for a link if available, and if not, then fall back to the common application-specific te-attributes, and if neither are available, use the legacy te-attributes.
The configuration statement strict-asla-based-flex-algorithm
at the
[edit protocols ospf source-packet-routing]
has to be applied to all the
flexible algorithms running on the devices in the network to avoid routing loops.
If strict-asla-based-flex-algorithm
is configured on all the devices,
either a common application-specific te-attribute or flexible algorithm application-specific
te-attribute must be advertised for each flexible algorithm link. In the absence of
application-specific te-attributes, the device does not fall back to the legacy
te-attributes and simply ignores the link.
The Operating System supports the following features in conjunction with application-specific link attribute based flexible algorithm:
-
The application-specific te-attribute subTLV to comply with RFC 8920. The application-specific te-attributes sub-TLV is a sub-TLV of the OSPFv2 extended link TLV as defined in RFC 7684.
-
Partially supports standard application identifier bit mask to advertise X-bit for flexible algorithms. Only the te-metric, delay-metric, or admin-groups are advertised as part of the application-specific link attribute sub-TLV.
The Operating System does not support the following features in conjunction with application-specific link attribute based flexible algorithm:
- Advertising user-defined application identifier bit masks is not supported.
- Readvertising flexible algorithm application-specific link attribute or rather any application-specific link attributes with BGP-LS is not supported because Traffic Engineering Database (TED) does not support application-specific link attribute.
-
Advertising a common application-specific link attribute with standard application identifier bit mask and user-defined application identifier bit masks length set to zero is not supported.
-
Advertising SRLG link constraint in flexible algorithm is not supported.
-
Supporting traffic engineering for multiple applications is not supported, except for flexible algorithms.
-
Defining admin-groups independent of MPLS is not supported.
See Also
Example: OSPF Flexible Algorithm
Overview
This example shows how to configure flexible algorithm in an OSPFv2 network. The flexible algorithm allows networks without a controller to configure traffic engineering using segment routing without actually implementing a network controller.
Starting in Junos OS Release 21.1R1, you can thin-slice a network by defining flexible algorithms that compute paths using different parameters and link constraints based on your requirements. The set consisting of calculation-type, metric-type, and a set of constraints is referred to as a flexible algorithm definition (FAD). You can define FADs and advertise the same in an OSPFv2 network. A device can also be configured to participate in a certain flexible algorithm provided it supports the constraints for that specific FAD.
Topology
Figure 6 shows a flexible algorithm topology in which there are 6 devices R0, R1, R2, R3, R4, and R5. Two flexible algorithms 128 and 129 are defined on each of these devices. The admin-groups red, blue, and green are configured on the devices. The FADs with different parameters such as metric-types, calculation-types, and link constraints are defined on each of the devices.
Requirements
This example uses the following hardware and software components:
- Six MX Series routers.
- Junos OS Release 21.1R1 or later running on all devices.
Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.
Device R0
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R0_to_R1_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.1/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R0_to_R1_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.5/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R0_to_R3_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.3.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R0_to_R3_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.3.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.10/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement ex-bgp term 1 from route-filter 10.1.1.0/24 exact set policy-options policy-statement ex-bgp term 1 then community add blue set policy-options policy-statement ex-bgp term 1 then accept set policy-options policy-statement ex-bgp term 0 from route-filter 10.1.0.0/24 exact set policy-options policy-statement ex-bgp term 0 then community add red set policy-options policy-statement ex-bgp term 0 then accept set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.10/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1280 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1290 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 index 1300 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 index 1310 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 index 1320 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 index 1330 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 index 1340 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 index 1350 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1000 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set policy-options community blue members color:1:129 set policy-options community red members color:0:128 set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group GREEN set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set routing-options flex-algorithm 128 definition metric-type igp-metric set routing-options flex-algorithm 128 definition spf set routing-options flex-algorithm 128 definition admin-group include-any RED set routing-options flex-algorithm 129 definition metric-type te-metric set routing-options flex-algorithm 129 definition spf set routing-options flex-algorithm 129 definition admin-group include-all BLUE set routing-options router-id 192.168.255.10 set routing-options autonomous-system 65000 set routing-options static route 10.1.1.0/24 receive set routing-options static route 10.1.0.0/24 receive set routing-options forwarding-table export pplb
Device R1
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R1_to_R0_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R1_to_R0_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R1_to_R2_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.12.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R1_to_R2_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.12.5/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R1_to_R3 set interfaces ge-0/0/4 unit 0 family inet address 10.10.13.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R1_to_R4 set interfaces ge-0/0/5 unit 0 family inet address 10.10.14.1/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.11/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.11/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1281 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1291 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1001 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group GREEN set protocols mpls interface ge-0/0/4.0 admin-group BLUE set protocols mpls interface ge-0/0/5.0 admin-group GREEN set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.11 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
Device R2
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R2_to_R1_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.12.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R2_to_R1_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.12.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R2_to_R3 set interfaces ge-0/0/2 unit 0 family inet address 10.10.23.1/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R2_to_R4 set interfaces ge-0/0/3 unit 0 family inet address 10.10.24.1/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R2_to_R5_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.25.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R2_to_R5_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.25.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.12/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.12/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1282 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1292 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1002 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group BLUE set protocols mpls interface ge-0/0/4.0 admin-group RED set protocols mpls interface ge-0/0/5.0 admin-group GREEN set protocols mpls interface ge-0/0/5.0 admin-group BLUE set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.12 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
Device R3
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R3_to_R0_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.3.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R3_to_R0_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.3.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R3_to_R1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.13.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R3_to_R2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.23.2/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R3_to_R4_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.34.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R3_to_R4_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.34.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.13/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.13/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1284 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1294 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1003 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/2.0 admin-group BLUE set protocols mpls interface ge-0/0/3.0 admin-group RED set protocols mpls interface ge-0/0/4.0 admin-group RED set protocols mpls interface ge-0/0/5.0 admin-group BLUE set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.13 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
Device R4
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R4_to_R1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.14.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R4_to_R2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.24.2/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R4_to_R3_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.34.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R4_to_R3_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.34.6/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces ge-0/0/4 description R4_to_R5_1 set interfaces ge-0/0/4 unit 0 family inet address 10.10.45.1/30 set interfaces ge-0/0/4 unit 0 family mpls set interfaces ge-0/0/5 description R4_to_R5_2 set interfaces ge-0/0/5 unit 0 family inet address 10.10.45.5/30 set interfaces ge-0/0/5 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.14/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.14/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1284 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1294 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1004 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/2.0 admin-group RED set protocols mpls interface ge-0/0/3.0 admin-group BLUE set protocols mpls interface ge-0/0/0.0 admin-group GREEN set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/4.0 admin-group GREEN set protocols mpls interface ge-0/0/5.0 admin-group RED set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/4.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/5.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.14 set routing-options autonomous-system 65000 set routing-options forwarding-table export pplb
Device R5
set chassis network-services enhanced-ip set interfaces ge-0/0/0 description R5_to_R2_1 set interfaces ge-0/0/0 unit 0 family inet address 10.10.25.2/30 set interfaces ge-0/0/0 unit 0 family mpls set interfaces ge-0/0/1 description R5_to_R2_2 set interfaces ge-0/0/1 unit 0 family inet address 10.10.25.6/30 set interfaces ge-0/0/1 unit 0 family mpls set interfaces ge-0/0/2 description R5_to_R4_1 set interfaces ge-0/0/2 unit 0 family inet address 10.10.45.2/30 set interfaces ge-0/0/2 unit 0 family mpls set interfaces ge-0/0/3 description R5_to_R4_2 set interfaces ge-0/0/3 unit 0 family inet address 10.10.45.6/30 set interfaces ge-0/0/3 unit 0 family mpls set interfaces lo0 unit 0 family inet address 192.168.255.15/32 set policy-options policy-statement pplb then load-balance per-packet set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.15/32 exact set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1285 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1295 set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1005 set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment set policy-options policy-statement prefix-sid term 1001 then accept set protocols mpls admin-groups RED 0 set protocols mpls admin-groups BLUE 1 set protocols mpls admin-groups GREEN 2 set protocols mpls label-range static-label-range 1000 8000 set protocols mpls interface all set protocols mpls interface fxp0.0 disable set protocols mpls interface ge-0/0/0.0 admin-group RED set protocols mpls interface ge-0/0/1.0 admin-group GREEN set protocols mpls interface ge-0/0/1.0 admin-group BLUE set protocols mpls interface ge-0/0/2.0 admin-group GREEN set protocols mpls interface ge-0/0/3.0 admin-group RED set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5 set protocols ospf backup-spf-options use-source-packet-routing set protocols ospf traffic-engineering advertisement always set protocols ospf source-packet-routing prefix-segment prefix-sid set protocols ospf source-packet-routing srgb start-label 80000 set protocols ospf source-packet-routing srgb index-range 5000 set protocols ospf source-packet-routing flex-algorithm 128 set protocols ospf source-packet-routing flex-algorithm 129 set protocols ospf area 0.0.0.0 interface lo0.0 passive set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection set routing-options router-id 192.168.255.15 set routing-options autonomous-system 65000 set routing-options static route 10.1.15.0/24 reject set routing-options forwarding-table export pplb
Configuring Device R0
To configure flexible algorithm for OSPFv2, perform the following steps on the device R0:
-
Configure the device interfaces to enable IP transport.
[edit] user@R0set interfaces ge-0/0/0 description R0_to_R1_1 user@R0set interfaces ge-0/0/0 unit 0 family inet address 10.10.1.1/30 user@R0set interfaces ge-0/0/0 unit 0 family mpls user@R0set interfaces ge-0/0/1 description R0_to_R1_2 user@R0set interfaces ge-0/0/1 unit 0 family inet address 10.10.1.5/30 user@R0set interfaces ge-0/0/1 unit 0 family mpls user@R0set interfaces ge-0/0/2 description R0_to_R3_1 user@R0set interfaces ge-0/0/2 unit 0 family inet address 10.10.3.1/30 user@R0set interfaces ge-0/0/2 unit 0 family mpls user@R0set interfaces ge-0/0/3 description R0_to_R3_2 user@R0set interfaces ge-0/0/3 unit 0 family inet address 10.10.3.5/30 user@R0set interfaces ge-0/0/3 unit 0 family mpls
-
Configure the loopback interface (lo0) address that is used as router ID for OSPF sessions.
[edit] user@R0set interfaces lo0 unit 0 family inet address 192.168.255.10/32
-
Configure the router ID and autonomous system (AS) number to propagate routing information within a set of routing devices that belong to the same AS.
[edit] user@R0set routing-options router-id 192.168.255.10 user@R0set routing-options autonomous-system 65000
-
Define a policy to load balance packets and apply the per-packet policy to enable load balancing of traffic.
[edit] user@R0set policy-options policy-statement pplb then load-balance per-packet user@R0set routing-options forwarding-table export pplb
-
Configure the route filter for the routing policy term that enables the Device R0 to reach the 192.168.255.10/32 network.
[edit] user@R0set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.10/32 exact
- Configure MPLS on all interfaces excluding the management
interface.
[edit] user@R0set protocols mpls interface all user@R0set protocols mpls interface fxp0.0 disable
-
Configure the MPLS label range to assign static labels for the links.
[edit] user@R0set protocols mpls label-range static-label-range 1000 8000
-
Configure TI-LFA to enable protection against link and node failures. SR using TI-LFA provides faster restoration of network connectivity by routing the traffic instantly to a backup or an alternate path if the primary path fails or becomes unavailable.
[edit] user@R0set protocols ospf backup-spf-options use-source-packet-routing
-
Configure the maximum number of labels for segment routing routed paths for protection of backup shortest-path-first attributes.
[edit] user@R0set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5
-
Configure prefix segment attributes, the start label and the index range for segment routing global blocks (SRGBs) in SPRING for the OSPF protocol.
[edit] user@R0set protocols ospf source-packet-routing prefix-segment prefix-sid user@R0set protocols ospf source-packet-routing srgb start-label 80000 user@R0set protocols ospf source-packet-routing srgb index-range 5000
-
Enable node-link protection on the OSPF interfaces that follow post-convergence path.
[edit] user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/0.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/2.0 post-convergence-lfa node-protection user@R0set protocols ospf area 0.0.0.0 interface ge-0/0/3.0 post-convergence-lfa node-protection
-
Configure the loopback interface as passive to ensure the protocols do not run over the loopback interface and that the loopback interface is advertised correctly throughout the network.
[edit] user@R0set protocols ospf area 0.0.0.0 interface lo0.0 passive
-
Define flexible algorithms on the device R0. Assign a name for each of the FADs ranging from 128 through 255.
[edit] user@R0set routing-options flex-algorithm 128 user@R0set routing-options flex-algorithm 129
Specify the parameters of the definition. OSPFv2 calculates the path based on these specified parameters of the FAD.
-
Specify the calculation type based on which the OSPFv2 protocol calculates the path.
[edit] user@R0set routing-options flex-algorithm 128 definition spf user@R0set routing-options flex-algorithm 128 definition spf
-
Specify the metric type based on which OSPFv2 calculates the path.
[edit] user@R0set routing-options flex-algorithm 128 definition metric-type igp-metric user@R0set routing-options flex-algorithm 129 definition metric-type te-metric
-
If you have enabled RSVP traffic engineering, you can configure admin-groups for many protocols to color an individual link.
[edit] user@R0set protocols mpls admin-groups RED 0 user@R0set protocols mpls admin-groups BLUE 1 user@R0set protocols mpls admin-groups GREEN 2
-
Assign the configured admin-groups policies to the device R0 interfaces.
[edit] user@R0set protocols mpls interface ge-0/0/0.0 admin-group RED user@R0set protocols mpls interface ge-0/0/1.0 admin-group GREEN user@R0set protocols mpls interface ge-0/0/2.0 admin-group RED user@R0set protocols mpls interface ge-0/0/3.0 admin-group GREEN
-
Define the admin-groups as per your requirement.
[edit] user@R0set routing-options flex-algorithm 128 definition admin-group include-any RED user@R0set routing-options flex-algorithm 129 definition admin-group include-all GREEN user@R0set routing-options flex-algorithm 129 definition admin-group include-all BLUE
Note:For FADs with link-constraints to work, all relevant links should advertise the admin-colors in OSPFv2. You must either enable RSVP on the interfaces or if you have not configured RSVP for traffic engineering, make sure you configure set traffic-engineering advertise always at the
[edit protocols ospf]
hierarchy level.[edit] user@R0set protocols ospf traffic-engineering advertisement always
-
- Configure the flexible algorithm participation on the device R0. The same
device can advertise a FAD and also participate in a flexible
algorithm.
[edit] user@R0set protocols ospf source-packet-routing flex-algorithm 128 user@R0set protocols ospf source-packet-routing flex-algorithm 129
-
Advertise prefix segments through policy configuration.
[edit] user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 index 1280 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 128 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 index 1290 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 129 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 index 1300 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 130 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 index 1310 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 131 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 index 1320 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 132 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 index 1330 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 133 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 index 1340 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 134 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 index 1350 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment algorithm 135 node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment index 1000 user@R0set policy-options policy-statement prefix-sid term 1001 then prefix-segment node-segment user@R0set policy-options policy-statement prefix-sid term 1001 then accept
Results
Check the results of the configuration:
From configuration mode, confirm your configuration by entering the, show
interfaces
, show routing-options
, show
protocols
, and show policy-options
commands. If
the output does not display the intended configuration, repeat the instructions
in this example to correct the configuration.
interfaces { ge-0/0/0 { description R0_to_R1_1; unit 0 { family inet { address 10.10.1.1/30; } family mpls; } } ge-0/0/1 { description R0_to_R1_2 unit 0 { family inet { address 10.10.1.5/30; } family mpls; } } ge-0/0/2 { description R0_to_R3_1 unit 0 { family inet { address 10.10.3.1/30; } family mpls; } } ge-0/0/3 { description R0_to_R3_2 unit 0 { family inet { address 10.10.3.5/30; } family mpls; } } lo0 { unit 0 { family inet { address 192.168.255.10/32; } } } } policy-options { policy-statement pplb { then { load-balance per-packet; } } policy-statement prefix-sid { term 1001 { from { route-filter 192.168.255.10/32 exact; } then { prefix-segment { algorithm 128 index 1280 node-segment; algorithm 129 index 1290 node-segment; algorithm 130 index 1300 node-segment; algorithm 131 index 1310 node-segment; algorithm 132 index 1320 node-segment; algorithm 133 index 1330 node-segment; algorithm 134 index 1340 node-segment; algorithm 135 index 1350 node-segment; index 1000; node-segment; } accept; } } } } protocols { mpls { admin-groups { RED 0; BLUE 1; GREEN 2; } label-range { static-label-range 1000 8000; } interface all; interface fxp0.0 { disable; } interface ge-0/0/0.0 { admin-group RED; } interface ge-0/0/1.0 { admin-group GREEN; } interface ge-0/0/2.0 { admin-group RED; } interface ge-0/0/3.0 { admin-group GREEN; } } ospf { backup-spf-options { use-post-convergence-lfa maximum-labels 5; use-source-packet-routing; } traffic-engineering { advertisement always; } source-packet-routing { prefix-segment prefix-sid; srgb start-label 80000 index-range 5000; flex-algorithm [ 128 129 ]; } area 0.0.0.0 { interface lo0.0 { passive; } interface ge-0/0/0.0 { post-convergence-lfa { node-protection; } } interface ge-0/0/1.0 { post-convergence-lfa { node-protection; } } interface ge-0/0/2.0 { post-convergence-lfa { node-protection; } } interface ge-0/0/3.0 { post-convergence-lfa { node-protection; } } } } } routing-options { flex-algorithm 128 { definition { metric-type igp-metric; spf; admin-group include-any RED; } } flex-algorithm 129 { definition { metric-type te-metric; spf; admin-group include-all [ GREEN BLUE ]; } } router-id 192.168.255.10; autonomous-system 65000; forwarding-table { export pplb; } }
Verification
To confirm that the configuration is working properly, perform the following tasks:
- Verifying the OSPF Database
- Action
- Verifying the Flexible Algorithm Details
- Action
- Verifying Flexible Algorithm Specific OSPF Internal Routes
- Action
- Verifying Flex Colored routes
- Action
- Verifying OSPF Logs
- Action
Verifying the OSPF Database
Purpose
Verifying that the flexible algorithm signaling is displayed in the OSPF database.
Action
From operational mode, run the show ospf database opaque-area
extensive
command.
On R0
user@R0>show ospf database opaque-area extensive OpaqArea 4.0.0.0 192.168.255.10 0x800000ad 503 0x22 0xb85d 76 Opaque LSA SR-Algorithm (8), length 3: Algo (1), length 1: 0 Algo (2), length 1: 128 Algo (3), length 1: 129 SID/Label Range (9), length 12: Range Size (1), length 3: 5000 SID/Label (1), length 3: Label (1), length 3: 80000 Flex-Algorithm Definition (16), length 12: Flex-Algo (1), length 1: 128 Metric-Type (2), length 1: 0 Calc-Type (3), length 1: 0 Priority (4), length 1: 0 FAD AG Include Any (2), length 4: Include Any AG (1), length 4: 0x1 Flex-Algorithm Definition (16), length 12: Flex-Algo (1), length 1: 129 Metric-Type (2), length 1: 2 Calc-Type (3), length 1: 0 Priority (4), length 1: 0 FAD AG Include All (3), length 4: Include All AG (1), length 4: 0x6 Aging timer 00:51:37 Installed 00:08:20 ago, expires in 00:51:37, sent 00:08:18 ago Last changed 5d 13:35:52 ago, Change count:
Meaning
This output on R0 illustrates that:
Three segment-routing algorithms (including two flexible algorithms) are advertised by this device.
Two FADs are advertised by this device.
Verifying the Flexible Algorithm Details
Purpose
Verifying that the flexible algorithm details are displayed.
Action
From operational mode, run the show ospf spring flex-algorithm
<flex-algorithm-id>
command.
On R0
user@R0>show ospf spring flex-algorithm 128 Flex Algo: 128, Area: 0.0.0.0 Color: 128, Participating, FAD supported Winner: 192.168.255.10, Metric: 0, Calc: 0, Prio: 0, inc-any: 0x1, FAD supported Include-Any: 0x1 RED SPF Version: 296 Participation toggles: 1 Topo refresh count: 0 Full SPFs: 296, Partial SPFs: 0
Meaning
The flexible algorithm details that are configured on R0 are displayed.
Verifying Flexible Algorithm Specific OSPF Internal Routes
Purpose
Verifying that the fexible algorithm specific OSPF internal routes are displayed.
Action
From operational mode, run the show ospf route flex-algorithm
<flex-algorithm-id>
command.
On R0
user@R0>show ospf route flex-algorithm 128 Prefix Path Route NH Metric NextHop Nexthop Type Type Type Interface Address/LSP 192.168.255.11 Intra Router IP 1 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 192.168.255.12 Intra Router IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.13 Intra Router IP 1 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.14 Intra Router IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.15 Intra Router IP 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.1.0/30 Intra Network IP 1 ge-0/0/0.0 10.10.1.4/30 Intra Network IP 1 ge-0/0/1.0 10.10.3.0/30 Intra Network IP 1 ge-0/0/2.0 10.10.3.4/30 Intra Network IP 1 ge-0/0/3.0 10.10.12.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 10.10.12.4/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 10.10.13.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.14.0/30 Intra Network IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 10.10.23.0/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.24.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.25.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.25.4/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.34.0/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.34.4/30 Intra Network IP 2 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.45.0/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 10.10.45.4/30 Intra Network IP 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 128.49.106.245/32 Intra Network IP 1 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 128.49.107.40/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.10/32 Intra Network IP 0 lo0.0 192.168.255.10/32 Intra Network Spring 0 lo0.0 192.168.255.11/32 Intra Network IP 1 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 192.168.255.11/32 Intra Network Spring 1 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 192.168.255.12/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.12/32 Intra Network Spring 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.13/32 Intra Network IP 1 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.13/32 Intra Network Spring 1 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.14/32 Intra Network IP 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.14/32 Intra Network Spring 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.15/32 Intra Network IP 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 192.168.255.15/32 Intra Network Spring 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 16 Intra Network Mpls 0 ge-0/0/0.0 10.10.1.2 Bkup MPLS ge-0/0/1.0 10.10.1.6 16 (S=0) Intra Network Mpls 0 ge-0/0/0.0 10.10.1.2 Bkup MPLS ge-0/0/1.0 10.10.1.6 17 Intra Network Mpls 0 ge-0/0/1.0 10.10.1.6 Bkup MPLS ge-0/0/0.0 10.10.1.2 17 (S=0) Intra Network Mpls 0 ge-0/0/1.0 10.10.1.6 Bkup MPLS ge-0/0/0.0 10.10.1.2 20 Intra Network Mpls 0 ge-0/0/2.0 10.10.3.2 Bkup MPLS ge-0/0/3.0 10.10.3.6 20 (S=0) Intra Network Mpls 0 ge-0/0/2.0 10.10.3.2 Bkup MPLS ge-0/0/3.0 10.10.3.6 21 Intra Network Mpls 0 ge-0/0/3.0 10.10.3.6 Bkup MPLS ge-0/0/2.0 10.10.3.2 21 (S=0) Intra Network Mpls 0 ge-0/0/3.0 10.10.3.6 Bkup MPLS ge-0/0/2.0 10.10.3.2 81001 Intra Network Mpls 1 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 81001 (S=0) Intra Network Mpls 1 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 81003 Intra Network Mpls 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 81004 Intra Network Mpls 1 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 81004 (S=0) Intra Network Mpls 1 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 81006 Intra Network Mpls 2 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6 81007 Intra Network Mpls 3 ge-0/0/0.0 10.10.1.2 ge-0/0/1.0 10.10.1.6 ge-0/0/2.0 10.10.3.2 ge-0/0/3.0 10.10.3.6
Meaning
The show ospf route
command is extended with
flex-algorithm
option to show flexible algorithm
specific OSPF internal routes. Each route is prefixed with the
flex-algo-id:
Verifying Flex Colored routes
Purpose
Verifying that the fexible algorithm specific OSPF internal routes are displayed.
Action
From operational mode, run the show route protocol ospf
command.
On R0
user@R0>show route protocol ospf inetcolor.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden) + = Active Route, - = Last Active, * = Both 192.168.255.11-128<c>/64 *[L-OSPF/10/5] 1w2d 01:23:04, metric 1 > to 10.10.1.2 via ge-0/0/0.0 to 10.10.3.2 via ge-0/0/2.0, Push 81281, Push 81283(top) 192.168.255.12-128<c>/64 *[L-OSPF/10/5] 1w2d 01:23:04, metric 2 to 10.10.1.2 via ge-0/0/0.0, Push 81283 > to 10.10.3.2 via ge-0/0/2.0, Push 81283 192.168.255.13-128<c>/64 *[L-OSPF/10/5] 1w2d 01:23:04, metric 1 > to 10.10.3.2 via ge-0/0/2.0 to 10.10.1.2 via ge-0/0/0.0, Push 81284, Push 81283(top) 192.168.255.14-128<c>/64 *[L-OSPF/10/5] 1w2d 01:23:04, metric 2 > to 10.10.3.2 via ge-0/0/2.0, Push 81286 to 10.10.1.2 via ge-0/0/0.0, Push 81286, Push 81283(top) 192.168.255.15-128<c>/64 *[L-OSPF/10/5] 1w2d 01:23:04, metric 3 to 10.10.1.2 via ge-0/0/0.0, Push 81287 > to 10.10.3.2 via ge-0/0/2.0, Push 81287
Meaning
The output displays all the colored flex routes programmed in inetcolor.0 table in the following format: prefix_address-flex-algo-id<c>/64
Verifying OSPF Logs
Purpose
Verifying that the OSPF logs displays the flexible algorithm keyword.
Action
From operational mode, run the show ospf log
command.
On R0
user@R0>show ospf log Topology default SPF log: Last instance of each event type When Type Elapsed 1w2d 13:59:18 SPF 0.000316 1w2d 13:59:18 Stub 0.000233 1w2d 13:59:18 Interarea 0.000002 1w2d 13:59:18 External 0.000004 1w2d 13:59:18 NSSA 0.000001 1w2d 13:59:18 Cleanup 0.000551 Maximum length of each event type When Type Elapsed 1w2d 14:34:27 SPF 0.000997 1w2d 15:59:35 Stub 0.000675 1w3d 07:08:27 Interarea 0.000010 1w3d 07:29:07 External 0.000013 1w3d 07:15:21 NSSA 0.000008 1w3d 08:38:05 Cleanup 0.001044 Last 100 events When Type Elapsed 1w2d 14:08:36 FlexAlgo SPF 0.000680 1w2d 14:08:36 SPF 0.000204 1w2d 14:08:36 Stub 0.000025 1w2d 14:08:36 Interarea 0.000003 1w2d 14:08:36 External 0.000002 1w2d 14:08:36 NSSA 0.000001 1w2d 14:08:36 Prefix SID 0.000222 1w2d 14:08:36 Adj SID 0.000074 1w2d 14:08:36 Cleanup 0.000607 1w2d 14:08:36 Total 0.001209 1w2d 14:08:31 SPF 0.000188 1w2d 14:08:31 Stub 0.000054 1w2d 14:08:31 Interarea 0.000002 1w2d 14:08:31 External 0.000001 1w2d 14:08:31 NSSA 0.000001 1w2d 14:08:31 Prefix SID 0.000181 1w2d 14:08:31 Adj SID 0.000178 1w2d 14:08:31 Cleanup 0.000413 1w2d 14:08:31 Total 0.001656 1w2d 14:06:54 FlexAlgo SPF 0.001914 1w2d 14:06:54 FlexAlgo SPF 0.000081 1w2d 14:06:54 SPF 0.000215 1w2d 14:06:54 Stub 0.000030 1w2d 14:06:54 Interarea 0.000003 1w2d 14:06:54 External 0.000001 1w2d 14:06:54 NSSA 0.000001 1w2d 14:06:54 Prefix SID 0.000227 1w2d 14:06:54 Adj SID 0.000075 1w2d 14:06:54 Cleanup 0.000233 1w2d 14:06:54 Total 0.000859 1w2d 14:06:49 SPF 0.000234 1w2d 14:06:49 Stub 0.000072 1w2d 14:06:49 Interarea 0.000003 1w2d 14:06:49 External 0.000002 1w2d 14:06:49 NSSA 0 1w2d 14:06:49 Prefix SID 0.000262 1w2d 14:06:49 Adj SID 0.000254 1w2d 14:06:49 Cleanup 0.000495 1w2d 14:06:49 Total 0.001936 1w2d 14:06:30 FlexAlgo SPF 0.001356 1w2d 14:06:30 FlexAlgo SPF 0.000061 1w2d 14:06:30 SPF 0.000207 1w2d 14:06:30 Stub 0.000023 1w2d 14:06:30 Interarea 0.000003 1w2d 14:06:30 External 0.000002 1w2d 14:06:30 NSSA 0.000001 1w2d 14:06:30 Prefix SID 0.000237 1w2d 14:06:30 Adj SID 0.000087 1w2d 14:06:30 Cleanup 0.000430 1w2d 14:06:30 Total 0.001060 1w2d 14:06:25 SPF 0.000207 1w2d 14:06:25 Stub 0.000077 1w2d 14:06:25 Interarea 0.000002 1w2d 14:06:25 External 0.000002 1w2d 14:06:25 NSSA 0.000001 1w2d 14:06:25 Prefix SID 0.000250 1w2d 14:06:25 Adj SID 0.000245 1w2d 14:06:25 Cleanup 0.000399 1w2d 14:06:25 Total 0.001840 1w2d 14:05:56 FlexAlgo SPF 0.001781 1w2d 14:05:56 FlexAlgo SPF 0.000080 1w2d 14:05:55 SPF 0.000215 1w2d 14:05:55 Stub 0.000025 1w2d 14:05:55 Interarea 0.000002 1w2d 14:05:55 External 0.000001 1w2d 14:05:55 NSSA 0.000001 1w2d 14:05:55 Prefix SID 0.000240 1w2d 14:05:55 Adj SID 0.000073 1w2d 14:05:55 Cleanup 0.000422 1w2d 14:05:55 Total 0.001055 1w2d 14:05:50 SPF 0.000212 1w2d 14:05:50 Stub 0.000082 1w2d 14:05:50 Interarea 0.000003 1w2d 14:05:50 External 0.000001 1w2d 14:05:50 NSSA 0.000001 1w2d 14:05:50 Prefix SID 0.000264 1w2d 14:05:50 Adj SID 0.000239 1w2d 14:05:50 Cleanup 0.000458 1w2d 14:05:50 Total 0.002053 1w2d 13:59:23 FlexAlgo SPF 0.001603 1w2d 13:59:23 FlexAlgo SPF 0.000062 1w2d 13:59:23 SPF 0.000224 1w2d 13:59:23 Stub 0.000021 1w2d 13:59:23 Interarea 0.000002 1w2d 13:59:23 External 0.000001 1w2d 13:59:23 NSSA 0.000001 1w2d 13:59:23 Prefix SID 0.000222 1w2d 13:59:23 Adj SID 0.000087 1w2d 13:59:23 Cleanup 0.000413 1w2d 13:59:23 Total 0.001228 1w2d 13:59:18 SPF 0.000316 1w2d 13:59:18 Stub 0.000233 1w2d 13:59:18 Interarea 0.000002 1w2d 13:59:18 External 0.000004 1w2d 13:59:18 NSSA 0.000001 1w2d 13:59:18 Prefix SID 0.000324 1w2d 13:59:18 Adj SID 0.000318 1w2d 13:59:18 Cleanup 0.000551 1w2d 13:59:18 Total 0.002751
Meaning
The output displays the FlexAlgo keyword added for the SPF logs.