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 common communities for use by a route server
function translate_routeserver_communities(
  int dest_asn
)
{
  lclist announce_controls = filter(bgp_large_community, [(OURAS, 0..1, *)]);
  for lc c in announce_controls do {
bgp_large_community.add((dest_asn, c.data1, c.data2));
  }

  lclist prepends = filter(bgp_large_community, [(OURAS, 101..103, *)]);
  for lc c in prepends do {
bgp_large_community.add((dest_asn, c.data1, c.data2));
  }
}

(I think we could combine those into one with a filter(bgp_large_community, 
[(OURAS, 0..1, *), (OURAS, 101..103, *)])? This code originally looked slightly 
different and at the time combining these wasn't posible.

Note that this doesn't strip the input communities - we do that as a separate 
step later where we strip all non-informational communities

- Erin

On Tue, 20 Feb 2024, at 00:30, Ilham Maulana wrote:
> 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 is dynamic variable.
> 
> whatever c and d inbound, copy to c and d outbound.
> 
> Thanks.
> Ilham
> 5f622eb5-c189-4e05-8584-e4a1d2071a6b


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 is dynamic variable.

whatever c and d inbound, copy to c and d outbound.

Thanks.
Ilham
[5f622eb5-c189-4e05-8584-e4a1d2071a6b]

Re: Adding support for an experimental IPv6 Hop By Hop Extension header

2024-02-19 Thread Nico Schottelius via Bird-users


Hello Paul,

"Mccherry, Paul (Postgraduate Researcher)"  writes:

> I am a Phd Researcher at Lancaster university researching the security of the 
> UK Internet infrastructure.
>
> I need to add support for a proposed experimental IPv6 Hop By Hop Extension 
> Header to a routers Kernel to test my theories. I am
> more a server/network engineer and researcher than I am a programmer but I am 
> able to write in Python and use scripting languages.
> Can anyone recommend tools and Router emulation software where one could add 
> support for an experimental IPv6 Hop By Hop
> Extension Header in order to test the methodology ?

scapy (https://scapy.net/) is likely going to be your friend for that
type of research. I did my thesis on NAT64, so I assume you will have a
lot of fun coding that.

> If Bird is unable to provide such a testbed, can anyone recommend another 
> solution. ? However, I do think a capability to provide
> researchers with an easy method to test new IPv6 Extension headers would be 
> really useful considering the takeup of IPv6 and the
> future of the internet.

While we do a lot of things with bird, I am not sure why you'd need it
for your research, because it is mainly a control plane utility,
forwarding is still done in kernel.

Best regards,

Nico




--
Sustainable and modern Infrastructures by ungleich.ch


Re: Adding support for an experimental IPv6 Hop By Hop Extension header

2024-02-19 Thread Maria Matejka via Bird-users

Hello Paul,

I'm afraid that this topic may be out of BIRD's primary scope. If I 
assess your needs correctly, this is maybe more to do in NetworkManager 
or something like that, or maybe even in-kernel. But I may be wrong.


If you could describe what exactly you're trying to achieve (even 
off-list of you don't like publishing the details now), I may try to 
give you a direct pointer where to look at, or help you find out whether 
this task matches your skills. Also there may be some collab possibility 
between us and you, if we conclude that this thing actually fits into 
our needs as well.


Looking forward to hearing back from you.
Maria

On 2024-02-19 12:08, Mccherry, Paul (Postgraduate Researcher) wrote:


I am a Phd Researcher at Lancaster university researching the security 
of the UK Internet infrastructure.


I need to add support for a proposed experimental IPv6 Hop By Hop 
Extension Header to a routers Kernel to test my theories. I am more a 
server/network engineer and researcher than I am a programmer but I am 
able to write in Python and use scripting languages. Can anyone 
recommend tools and Router emulation software where one could add 
support for an experimental IPv6 Hop By Hop Extension Header in order 
to test the methodology ? The new extension header requires changes to 
the IFindex table (an additional field) and a new ACL to make routing 
decisions on the new field within the IFindex table. It also will need 
to provide the capability of allowing an installation engineer to make 
changes to this field on initial setup.


If Bird is unable to provide such a testbed, can anyone recommend 
another solution. ? However, I do think a capability to provide 
researchers with an easy method to test new IPv6 Extension headers 
would be really useful considering the takeup of IPv6 and the future 
of the internet.



--
Maria Matejka (she/her) | BIRD Team Leader | CZ.NIC, z.s.p.o.


Adding support for an experimental IPv6 Hop By Hop Extension header

2024-02-19 Thread Mccherry, Paul (Postgraduate Researcher)
I am a Phd Researcher at Lancaster university researching the security of the 
UK Internet infrastructure.

I need to add support for a proposed experimental IPv6 Hop By Hop Extension 
Header to a routers Kernel to test my theories. I am more a server/network 
engineer and researcher than I am a programmer but I am able to write in Python 
and use scripting languages. Can anyone recommend tools and Router emulation 
software where one could add support for an experimental IPv6 Hop By Hop 
Extension Header in order to test the methodology ? The new extension header 
requires changes to the IFindex table (an additional field) and a new ACL to 
make routing decisions on the new field within the IFindex table. It also will 
need to provide the capability of allowing an installation engineer to make 
changes to this field on initial setup.

If Bird is unable to provide such a testbed, can anyone recommend another 
solution. ? However, I do think a capability to provide researchers with an 
easy method to test new IPv6 Extension headers would be really useful 
considering the takeup of IPv6 and the future of the internet.