03-30-2023 12:42 AM
Hello All,
I have configured following setup.
R1
Gi0/0/0/0 Gi0/0/0/1
/ \
Gi0/0/0/0 Gi0/0/0/1
R2----------R3
R1, R2 and R3 are XRV9k. I am trying to understand how flex-algo works.
I have configured a segment routing policy(pol1) on R2 source-address 2.2.2.2(R2) and end-point (3.3.3.3). flex-algo 128 is configured on all the routers and affinity flex-algo is configured on Gi0/0/0/0 of R2 and Gi0/0/0/0, Gi0/0/0/1 of R1 and Gi0/0/0/1 of R3. According to my understand policy pol1 should take path R2-R1-R3 because of affinity flex-algo GOLD. But still pol1 is taking path from R2-R3. I am not sure what mistake I have made in the configuration
Following is the configuration.
XRV1
-----------------
int gi0/0/0/0
ipv4 address 100.10.20.1 255.255.255.0
no sh
int gi0/0/0/1
ipv4 address 100.10.30.1 255.255.255.0
no sh
int lo0
ipv4 address 1.1.1.1 255.255.255.255
exit
mpls traffic-eng
exit
router isis 1
flex-algo 128
affinity-map GOLD bit-position 1
distribute link-state
net 49.0001.1111.1111.1111.00
is-type level-2
address-family ipv4 unicast
segment-routing mpls
metric-style wide
mpls traffic-eng router-id lo0
mpls traffic-eng level-2
exit
int lo0
passive
address-family ipv4 unicast
prefix-sid index 1
prefix-sid algo 128 index 101
exit
int gi0/0/0/0
point-to-point
affinity flex-algo GOLD
address-family ipv4 unicast
exit
int gi0/0/0/1
point-to-point
affinity flex-algo GOLD
address-family ipv4 unicast
exit
XRV2
-----------------
segment-routing
traffic-eng
policy pol1
source-address ipv4 2.2.2.2
color 100 end-point ipv4 3.3.3.3
candidate-paths
preference 100
dynamic
metric
type igp
int gi0/0/0/0
ipv4 address 100.10.20.2 255.255.255.0
no sh
int gi0/0/0/2
ipv4 address 100.20.30.2 255.255.255.0
no sh
int lo0
ipv4 address 2.2.2.2 255.255.255.255
exit
mpls traffic-eng
exit
router isis 1
flex-algo 128
advertise-definition
affinity include-all GOLD
affinity-map GOLD bit-position 1
distribute link-state
net 49.0001.2222.2222.2222.00
is-type level-2
address-family ipv4 unicast
segment-routing mpls
metric-style wide
mpls traffic-eng router-id lo0
mpls traffic-eng level-2
exit
int lo0
passive
address-family ipv4 unicast
prefix-sid index 2
prefix-sid algo 128 index 102
exit
int gi0/0/0/0
affinity flex-algo GOLD
point-to-point
address-family ipv4 unicast
exit
int gi0/0/0/2
point-to-point
address-family ipv4 unicast
exit
XRV3
-----------------
int gi0/0/0/1
ipv4 address 100.10.30.3 255.255.255.0
no sh
int gi0/0/0/2
ipv4 address 100.20.30.3 255.255.255.0
no sh
int lo0
ipv4 address 3.3.3.3 255.255.255.255
exit
mpls traffic-eng
exit
router isis 1
flex-algo 128
affinity-map GOLD bit-position 1
distribute link-state
net 49.0001.3333.3333.3333.00
is-type level-2
address-family ipv4 unicast
segment-routing mpls
metric-style wide
mpls traffic-eng router-id lo0
mpls traffic-eng level-2
exit
int lo0
passive
address-family ipv4 unicast
prefix-sid index 3
prefix-sid algo 128 index 103
exit
int gi0/0/0/1
affinity flex-algo GOLD
point-to-point
address-family ipv4 unicast
exit
int gi0/0/0/2
point-to-point
address-family ipv4 unicast
exit
Solved! Go to Solution.
03-30-2023 09:14 AM - edited 03-30-2023 09:15 AM
Hi @sachin30720041 ,
Two things you need to change.
1- Configure the restriction for the flex-algo 128.
flex-algo 128
advertise-definition
affinity include-all GOLD
2- configure the policy as follow:
segment-routing
traffic-eng
segment-list test
index 10 mpls label 16103
!
policy pol1
color 100 end-point ipv4 3.3.3.3
candidate-paths
preference 100
explicit segment-list test
!
Regards,
03-30-2023 09:14 AM - edited 03-30-2023 09:15 AM
Hi @sachin30720041 ,
Two things you need to change.
1- Configure the restriction for the flex-algo 128.
flex-algo 128
advertise-definition
affinity include-all GOLD
2- configure the policy as follow:
segment-routing
traffic-eng
segment-list test
index 10 mpls label 16103
!
policy pol1
color 100 end-point ipv4 3.3.3.3
candidate-paths
preference 100
explicit segment-list test
!
Regards,
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