Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS-XR: originates-from instead of ios-regex in as-path-set. #105

Open
sigurbjartur opened this issue Jan 31, 2024 · 3 comments
Open

IOS-XR: originates-from instead of ios-regex in as-path-set. #105

sigurbjartur opened this issue Jan 31, 2024 · 3 comments

Comments

@sigurbjartur
Copy link

sigurbjartur commented Jan 31, 2024

Hey team!

Might it be possible to implement the 'originates-from' matcher instead of, or alongside the 'ios-regex' for as-path-set in IOS XR?

ios-regex based elements can be processor intensive and for peers with many prefixes it can take a long time to parse all against a large and recursive AS-SET objects.

'originates-from' is much better and, in fact recommended by Cisco. Will only match the right-most ASN instead of trying to match the entire path. Also, only takes one ASN per line.

An example might be:

as-path-set example
  originates-from '64496',
  originates-from '64497',
  originates-from '64498',
  originates-from '64499',
  originates-from '64500'
end-set

Thanks for a great tool!

@job
Copy link
Member

job commented Jan 31, 2024

Since what version is this available?

@sigurbjartur
Copy link
Author

sigurbjartur commented Feb 1, 2024

Hey Job!

I've only been using IOS XR since version 6.7.3 but according to the ASR9K command reference it was introduced in version 3.7.2. It's certainly available in all currently supported releases.

https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/routing/command/reference/b-routing-cr-asr9000/routing-policy-language-commands.html#wp1346673425

Also, I was rather imprecise in my original post when saying it only takes one ASN per line. If I want to filter only on the origin, that is correct but it is possible to have more than one ASN matched but then that sequence must match from the right.

The following is valid, for example:

as-path-set example
  originates-from '64496 64497',
  originates-from '64498 64499'
end-set

Althought it would match the two right-most ASNs. So if one wants to match a substring from the right, with multiple ASNs, that is possible as well. I'm not sure if it's relevant in terms of this project, but figured I'd mention it.

@job
Copy link
Member

job commented May 1, 2024

What exact invocation of bgpq4 do you use to produce as-path-sets for XR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants