cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
798
Views
0
Helpful
1
Replies

FLEX-ALGO configuration in SR-TE

sachin30720041
Level 1
Level 1

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

 

1 Accepted Solution

Accepted Solutions

Harold Ritter
Level 12
Level 12

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

1 Reply 1

Harold Ritter
Level 12
Level 12

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,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México