06-16-2024 08:10 AM
Hi all,
I have the following setup, trying to get Flex Algo to work with OSPFv2 on an IOS-XR device. I've distribute link-states and even added mpls traffic-eng router-ids (which I'm not sure if I technically need to do) but still the policy will just not come up. The output below shows only one device in the topology but all other have a similar setup (with router-ids and distribute link state and a reference to flex-algo 240 and an appropriate node-sid under their OSPF instance).
I think I'm missing something obvious but cannot see what. Funnily enough this works with IS-IS.
Can anyone see what is wrong?
RP/0/RP0/CPU0:PE3#sh segment-routing traffic-eng policy color 110
Sun Jun 16 15:03:10.016 UTC
SR-TE policy database
---------------------
Color: 110, End-point: 10.1.1.101
Name: srte_c_110_ep_10.1.1.101
Status:
Admin: up Operational: down for 00:17:04 (since Jun 16 14:46:06.023)
Candidate-paths:
Preference: 100 (configuration) (inactive)
Name: FLEX-ALGO-TEST
Requested BSID: dynamic
Constraints:
Prefix-SID Algorithm: 240
Protection Type: protected-preferred
Maximum SID Depth: 10
Attributes:
Forward Class: 0
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: no
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
RP/0/RP0/CPU0:PE3#sh run router ospf
Sun Jun 16 15:03:18.960 UTC
router ospf CORE
apply-group CORE-OSPF
distribute link-state
router-id 10.1.1.103
segment-routing mpls
segment-routing sr-prefer
address-family ipv4 unicast
area 0
mpls traffic-eng
interface Loopback0
prefix-sid index 103
prefix-sid algorithm 240 index 303
!
interface GigabitEthernet0/0/0/3
!
interface GigabitEthernet0/0/0/4
cost 100
!
!
mpls traffic-eng router-id Loopback0
flex-algo 240
priority 200
advertise-definition
affinity exclude-any
BLUE
!
!
!
RP/0/RP0/CPU0:PE3#sh run segment-routing
Sun Jun 16 15:05:06.629 UTC
segment-routing
global-block 17000 23999
traffic-eng
policy FLEX-ALGO-TEST
color 110 end-point ipv4 10.1.1.101
candidate-paths
preference 100
constraints
segments
sid-algorithm 240
!
!
!
!
!
affinity-map
name BLUE bit-position 6
!
pcc
source-address ipv4 10.1.1.103
pce address ipv4 10.1.1.98
precedence 100
password encrypted 00141253514C5B140B61
!
pce address ipv4 10.1.1.99
precedence 50
password encrypted 00141253514C5B140B61
!
!
!
!
RP/0/RP0/CPU0:PE3#
06-16-2024 12:15 PM - edited 06-16-2024 02:07 PM
Hi @steven.crutchley ,
There are four things missing from the configuration you provided:
1. You should configure the following under your SR policy.
segment-routing
traffic-eng
policy FLEX-ALGO-TEST
candidate-paths
preference 100
dynamic
metric
type igp
2. Make sure your interfaces are configure as point to point.
router ospf CORE
area 0
interface GigabitEthernet0/0/0/3
network point-to-point
!
interface GigabitEthernet0/0/0/4
network point-to-point
!
3. Add the affinity-map under router ospf.
router ospf CORE
affinity-map
BLUE bit-position 6
4. Colour the link you want to exclude under router ospf.
router ospf CORE
area 0
interface GigabitEthernet0/0/0/3
affinity flex-algo
BLUE
Regards,
06-17-2024 03:42 AM
Thanks. I have added igp as the metric and it seems to come up. But I don't think it is avoiding the BLUE links.
This leads me to have two questions about flex-algo:
1. So SR policies always need to have a metric defined (in this case igp)? - I thought they would just default to igp...
2. For coloring links... do I color them under the IGP like this?
router ospf CORE
area 0
interface GigabitEthernet0/0/0/0
affinity flex-algo
BLUE
!
!
!
!
end
Or do I colour them under SR... like this:
segment-routing
traffic-eng
interface GigabitEthernet0/0/0/0
affinity
name BLUE
!
!
affinity-map
name BLUE bit-position 6
!
And when do I use which?
Is the color under the IGP for Flex-Algo and then under SR for the normal (non-flex-algo) SR policies?
06-17-2024 06:51 AM
Hi @steven.crutchley ,
> 1. So SR policies always need to have a metric defined (in this case igp)? - I thought they would just > default to igp...
There is no default. It needs to be configured
> 2. For coloring links... do I color them under the IGP like this?
Yes, this is how it needs to be done for Flex Algo. You would need to configure it under SR if you wanted to configure a SRTE policy using colors.
> Is the color under the IGP for Flex-Algo and then under SR for the normal (non-flex-algo) SR policies?
That is correct.
Regards,
10-04-2024 06:21 AM
Thanks, I found this exchange useful as I had got muddled when trying to test a SR TE policy linked to a flex-algo topology configured with link affinities.
I notice that the metric type defined in the flex-algo overrules the metric type in the SR TE policy (when the SR TE policy references the flex-algo via the constraints section). I suppose this makes sense, but it caused a bit of initial head-scratching to work out what was going on.
Adrian
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide