Re: Take Specific Value Inside BGP Community

2024-02-20 Thread Ilham Maulana
Hi sir, Thank you for the explanation Your script works. Just started using bird 6 month ago, and found out it is super cool. Many thanks. Best Regard, On 20/02/2024 15:43:06, Alexander Zubkov wrote: Hi, This statement is wrong: peeras = ([(65535, 1000, *)].data2); You try to pick "data2

Re: Take Specific Value Inside BGP Community

2024-02-20 Thread Alexander Zubkov via Bird-users
Hi, This statement is wrong: peeras = ([(65535, 1000, *)].data2); You try to pick "data2" from the communty set (= comunity filter). Filter itself does not contain values. You need to apply it to some community list first. Still you'll get a community list as a result. But you can pick "data2" o

Re: Take Specific Value Inside BGP Community

2024-02-20 Thread Ilham Maulana
Hi, Thanks for the reply. Here's what i'm going to do. -- function is_to_some_ixp_comm() int peeras; {     peeras = ([(65535, 1000, *)].data2);     if bgp_large_community ~ ([( 65535,1000,peeras)]) then {         bgp_large_community.delete([(65535,*,*)]);         bgp_larg

Re: Take Specific Value Inside BGP Community

2024-02-19 Thread Erin Shepherd
It's a bit non-obvious, but you can do this with a loop. For example we basically replicate the Euro-IX routeserver announcement control communities inside our network, and we use the following function to translate them when exporting routes to a (supporting) route server # Translate Euro-IX c

Take Specific Value Inside BGP Community

2024-02-19 Thread Ilham Maulana
Hi, Is it possible in bird to copy specific value inside BGP Community? Example: Route 1, Community (a,b,c) -> inbound Route 2, Community (a,b,d) -> inbound -- Route 1, Community (k,l,c) -> outbound Route 2, Community (k,l,d) -> outbound The specific value I want to preserve is c and d, and it