Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
OSPF User Guide
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

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 1 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.

Figure 1: Flexible Algorithm TopologyFlexible Algorithm Topology

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

content_copy zoom_out_map
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

content_copy zoom_out_map
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

content_copy zoom_out_map
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

content_copy zoom_out_map
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

content_copy zoom_out_map
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

content_copy zoom_out_map
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:

  1. Configure the device interfaces to enable IP transport.

    content_copy zoom_out_map
    [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
  2. Configure the loopback interface (lo0) address that is used as router ID for OSPF sessions.

    content_copy zoom_out_map
    [edit]
    user@R0set interfaces lo0 unit 0 family inet address 192.168.255.10/32
  3. 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.

    content_copy zoom_out_map
    [edit]
    user@R0set routing-options router-id 192.168.255.10
    user@R0set routing-options autonomous-system 65000
  4. Define a policy to load balance packets and apply the per-packet policy to enable load balancing of traffic.

    content_copy zoom_out_map
    [edit]
    user@R0set policy-options policy-statement pplb then load-balance per-packet
    user@R0set routing-options forwarding-table export pplb
  5. Configure the route filter for the routing policy term that enables the Device R0 to reach the 192.168.255.10/32 network.

    content_copy zoom_out_map
    [edit]
    user@R0set policy-options policy-statement prefix-sid term 1001 from route-filter 192.168.255.10/32 exact
  6. Configure MPLS on all interfaces excluding the management interface.
    content_copy zoom_out_map
    [edit]
    user@R0set protocols mpls interface all
    user@R0set protocols mpls interface fxp0.0 disable
  7. Configure the MPLS label range to assign static labels for the links.

    content_copy zoom_out_map
    [edit]
    user@R0set protocols mpls label-range static-label-range 1000 8000
  8. 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.

    content_copy zoom_out_map
    [edit]
    user@R0set protocols ospf backup-spf-options use-source-packet-routing
  9. Configure the maximum number of labels for segment routing routed paths for protection of backup shortest-path-first attributes.

    content_copy zoom_out_map
    [edit]
    user@R0set protocols ospf backup-spf-options use-post-convergence-lfa maximum-labels 5
  10. Configure prefix segment attributes, the start label and the index range for segment routing global blocks (SRGBs) in SPRING for the OSPF protocol.

    content_copy zoom_out_map
    [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
    
  11. Enable node-link protection on the OSPF interfaces that follow post-convergence path.

    content_copy zoom_out_map
    [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
  12. 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.

    content_copy zoom_out_map
    [edit]
    user@R0set protocols ospf area 0.0.0.0 interface lo0.0 passive
    
  13. Define flexible algorithms on the device R0. Assign a name for each of the FADs ranging from 128 through 255.

    content_copy zoom_out_map
    [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.

    1. Specify the calculation type based on which the OSPFv2 protocol calculates the path.

      content_copy zoom_out_map
      [edit]
      user@R0set routing-options flex-algorithm 128 definition spf
      user@R0set routing-options flex-algorithm 128 definition spf
    2. Specify the metric type based on which OSPFv2 calculates the path.

      content_copy zoom_out_map
      [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
    3. If you have enabled RSVP traffic engineering, you can configure admin-groups for many protocols to color an individual link.

      content_copy zoom_out_map
      [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
    4. Assign the configured admin-groups policies to the device R0 interfaces.

      content_copy zoom_out_map
      [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
      
    5. Define the admin-groups as per your requirement.

      content_copy zoom_out_map
      [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.

      content_copy zoom_out_map
      [edit]
      user@R0set protocols ospf traffic-engineering advertisement always
  14. Configure the flexible algorithm participation on the device R0. The same device can advertise a FAD and also participate in a flexible algorithm.
    content_copy zoom_out_map
    [edit]
    user@R0set protocols ospf source-packet-routing flex-algorithm 128
    user@R0set protocols ospf source-packet-routing flex-algorithm 129
  15. Advertise prefix segments through policy configuration.

    content_copy zoom_out_map
    [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.

content_copy zoom_out_map
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

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

content_copy zoom_out_map
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

content_copy zoom_out_map
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

content_copy zoom_out_map
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

content_copy zoom_out_map
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

content_copy zoom_out_map
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.

footer-navigation