pathvector icon indicating copy to clipboard operation
pathvector copied to clipboard

Add `only-announce` option

Open rapdodge opened this issue 3 years ago • 10 comments

What feature would you like to see? Whitelist feature to announce to peer, while dont-announce is blocking some prefix to announce to the peer, whitelist announce make it more easier for some cases

rapdodge avatar Aug 27 '22 06:08 rapdodge

Do you have an example of what this config option would look like in practice?

natesales avatar Sep 26 '22 02:09 natesales

Example case:

Let's say, my AS is 3... And my upstream AS is 1 and 2

I have 3 IPv6, subnet

2abc:1234:1515::/44
2abc:cdef:8181::/44
2abc:1353:7676::/44

So, i want to make AS 1 just announce 2abc:1234:1515::/44, and not announce 2abc:cdef:8181::/44 and 2abc:1353:7676::/44

And on AS 2, all prefix is announce

Instead I'm using dont-announce 2abc:cdef:8181::/44 and 2abc:1353:7676::/44, just make it whitelist-announce: 2abc:1234:1515::/44

Best regards,

rapdodge avatar Sep 26 '22 02:09 rapdodge

Got it, that makes sense. I'll add an only-announce option to cover this use case.

natesales avatar Sep 26 '22 03:09 natesales

Ahh, yes, only-announce makes more sense...

Or if wanted 2 subnet can doing like this too

dont-announce version

Upstream_1:
  asn: 1
  dont-announce: ['2abc:1353:7676::/44']

only-announce version

Upstream_1:
  asn: 1
  only-announce: ['2abc:1234:1515::/44','2abc:cdef:8181::/44']

Because i think it would help people that having so much subnet and some subnet dont want to be announced to some upstream...

rapdodge avatar Sep 26 '22 03:09 rapdodge

how would that work with communities in announce: [ "blah,blah", "blah:0:123" ]

would it be like.. yes push all downstreams from said community, and from our own announced stuff. do/don't do this.

or, could possibly do it via adding communities to the

prefix: header.

ie;

prefixes:
  - [ "123.123.123.0/24","123,456", "123:4:567"]
  - [ "2000:3000:400::/40", "123,457", "123:4:568"]
  - 2a0a:2222:/32 

or some sort of similar expression to add certain community to it, then utilizing the announce function to push specific subnet sets.?

could be a whole lot of random stuff, but half asleep at the moment, in my brain it works though.

CloudieLLC avatar Sep 28 '22 13:09 CloudieLLC

prefixes:

  • [ "123.123.123.0/24","123,456", "123:4:567"]
  • [ "2000:3000:400::/40", "123,457", "123:4:568"]
  • 2a0a:2222:/32

or some sort of similar expression to add certain community to it, then utilizing the announce function to push specific subnet sets.?

@CloudieLLC That's a good idea! In the code, as of today, I believe injecting prefixes into a community seems to be declared through the peer template/peer configuration, so for more granularity of prefixes announced per peer, might make sense to use only-announce as a []string config entry under the peer template or peer configuration, and the communities are still taken care of that way?

could be a whole lot of random stuff, but half asleep at the moment, in my brain it works though.

yeah... it's too dang early here, not sure if what I said above makes the most sense, but worth checking into I suppose!

netstx avatar Oct 07 '22 11:10 netstx

I think communities should be handled via a new configuration directive, i.e. https://github.com/natesales/pathvector/issues/135

What do you think about using both only-announce and prefix-communities for this use case?

natesales avatar Oct 07 '22 13:10 natesales

I think i will using only-announce...

rapdodge avatar Oct 07 '22 13:10 rapdodge

I think communities should be handled via a new configuration directive, i.e. #135 What do you think about using both only-announce and prefix-communities for this use case?

I went back and looked at the current configuration structure, and personally I think using only-announce and prefix-communities together makes a lot more sense than my initial reply above.

netstx avatar Oct 07 '22 15:10 netstx

having the option for both options would suit quite well, for those announcing just a couple of prefixes on their own stuff, using only-announce makes sense, but those with a larger number behind them, a prefix community would work perfectly.

Me, personally, would use something prefix-communities if it was available. easier for swap and change ;)

and then follow on from that, been able to prepend specifics maybe? but that's probably another FR at a later date ;)

Either way, Love you're work!

CloudieLLC avatar Oct 08 '22 13:10 CloudieLLC