Oui je crois que j'ai lu /répondu un peu vite à ton message.
En fait j'ai souvenir d'un truc que j'avais documenté sur IOS-XR qui
m'avait déjà cassé les pieds.
https://beufa.net/blog/rpki-use-routinator-rtr-cache-validator-cisco-ios-xr/
router bgp 64567
!
address-family ipv4 unicast
bgp origin-as validation enable
bgp bestpath origin-as use validity => ne semble pas dispo sur XE.
bgp bestpath origin-as allow invalid
!
address-family ipv6 unicast
bgp origin-as validation enable
bgp bestpath origin-as use validity
bgp bestpath origin-as allow invalid
!
La seule doc que j'ai trouvé sur IOS-XE c'est assez vieux :
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/configuration/xe-3s/irg-xe-3s-book/bgp-origin-as-validation.pdf
Le comportement que tu rencontres est bien documenté :
During BGP best path selection, the default behavior, if neither of the
above options is configured, is that the
system will prefer prefixes in the following order:
• Those with a validation state of valid.
• Those with a validation state of not found.
• Those with a validation state of invalid (which, by default, will not
be installed in the routing table).
These preferences override metric, local preference, and other choices
made during the bestpath computation.
The standard bestpath decision tree applies only if the validation state
of the two paths is the same
Donc un valid c'est un tie breaker prioritaire sur le best selection
path algorithm dans la selection BGP, ce qui est exactement ce que tu
rencontres. Par contre effectivement, j'ai lu trop vite, mais si tu
ajoutes le allow-invalid, ca va juste autoriser les invalid a être
selected au lieu de drop dans le best path. Il manque donc le
use-validity comme sur IOS-XR.
Sinon, ce que j'avais fait par le passé pour éviter les problèmes de BGP
algorithm à la sauce cisco qui change sur des versions mineures (si,si)
:
- route-map ou RPL
- drop state invalid
- <your_rules>
- if roa valid => local-pref ou med ++
et je désactive la feature de BGP best path selection n°1 qui tie break
si ROV=valid>>>ROV=unknown
Bon courage, ca me rappelle pourquoi quelqu'un avait demandé la
suppression des MAY dans les RFC :p
N'hésites pas à partager ta trouvaille.
Le 25-05-2022 16:20, Clement Cavadore a écrit :
Hello Fabien,
On Wed, 2022-05-25 at 09:30 +0200, Fabien VINCENT FrNOG via frnog
if the BGP—Origin AS Validation feature is
enabled, and you want to allow invalid prefixes
to be used as the best path, even if valid prefixes are available.
Thus, you have control over announcing invalid
networks, but preferring them less than valid and not-found
prefixes.
Also, the downstream peer can modify
path attributes based on a route map that matches invalid prefixes
Je ne suis pas devant mon cisco, mais pour le coup, ce ne sont pas des
"invalid" que je cherche à exploiter, juste des unknown. Il faudrait
que je regarde si la directive existe avec un "allow-unknown", pour le
coup, réponse ce soir :)
Merci,
Clément
---------------------------
Liste de diffusion du FRnOG
http://www.frnog.org/
--
Fabien VINCENT
_@beufanet_
---------------------------
Liste de diffusion du FRnOG
http://www.frnog.org/