Binding to some interfaces only for multihop bgp

2023-02-19 Thread Sebastian Hahn
Hi,

I would like bird to bind to some interfaces only, but use some multihop
neighbours. Is there any easy way to achieve such a configuration? The
strict bind option is incompatible with multihop, and I haven't seen
anything where i can give a positive or negative list of interfaces to
bind to / not to bind to.

Thanks
Sebastian


Re: Binding to some interfaces only for multihop bgp

2023-02-19 Thread Alexander Zubkov via Bird-users
Hi,

I doubt that strict bind option is incompatible with multihop. Do you have
some problems with it?

On Sun, Feb 19, 2023 at 4:17 PM Sebastian Hahn 
wrote:

> Hi,
>
> I would like bird to bind to some interfaces only, but use some multihop
> neighbours. Is there any easy way to achieve such a configuration? The
> strict bind option is incompatible with multihop, and I haven't seen
> anything where i can give a positive or negative list of interfaces to
> bind to / not to bind to.
>
> Thanks
> Sebastian
>


Re: Binding to some interfaces only for multihop bgp

2023-02-19 Thread Sebastian Hahn
Hi Alexander,

thanks a lot for the fast response.

> On 19. Feb 2023, at 16:31, Alexander Zubkov  wrote:
> Hi,
> 
> I doubt that strict bind option is incompatible with multihop. Do you have 
> some problems with it?

I get the following error:

Multihop BGP cannot be bound to interface

when I am trying with an ibgp config like this:

protocol bgp test {

local  as ;
interface "";
strict bind yes;
ipv6 {
...
}
neighbour  as ;
}

Thanks
Sebastian


Re: Binding to some interfaces only for multihop bgp

2023-02-19 Thread Ondrej Zajicek
On Sun, Feb 19, 2023 at 06:28:03PM +0100, Sebastian Hahn wrote:
> Hi Alexander,
> 
> thanks a lot for the fast response.
> 
> > On 19. Feb 2023, at 16:31, Alexander Zubkov  wrote:
> > Hi,
> > 
> > I doubt that strict bind option is incompatible with multihop. Do you have 
> > some problems with it?
> 
> I get the following error:
> 
> Multihop BGP cannot be bound to interface

Hi

The strict bind option is not really related to interface, but to local
IP (because binding to interface really means binding to its IP). Just do
not use inteface option, while keep strict bind enabled and local IP set.


> when I am trying with an ibgp config like this:
> 
> protocol bgp test {
> 
>   local  as ;
>   interface "";
>   strict bind yes;
>   ipv6 {
>   ...
>   }
>   neighbour  as ;
> }

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."


Re: Binding to some interfaces only for multihop bgp

2023-02-19 Thread Sebastian Hahn
Hi Ondrej,

many thanks to you, too!

> On 19. Feb 2023, at 18:41, Ondrej Zajicek  wrote:
> On Sun, Feb 19, 2023 at 06:28:03PM +0100, Sebastian Hahn wrote:
>>> On 19. Feb 2023, at 16:31, Alexander Zubkov  wrote:
>>> Hi,
>>> 
>>> I doubt that strict bind option is incompatible with multihop. Do you have 
>>> some problems with it?
>> 
>> I get the following error:
>> 
>> Multihop BGP cannot be bound to interface
> 
> Hi
> 
> The strict bind option is not really related to interface, but to local
> IP (because binding to interface really means binding to its IP). Just do
> not use inteface option, while keep strict bind enabled and local IP set.

For each BGP connection I have a separate interface and I am wondering
how I would deal with this suggestion then. I think it would mean a
separate unique IP for each neighbour, assigned to the interface, yes?

Thanks
Sebastian


Re: Binding to some interfaces only for multihop bgp

2023-02-19 Thread Sebastian Hahn
Hi Ondrej,

> On 19. Feb 2023, at 19:02, Sebastian Hahn  
> wrote:
>> On 19. Feb 2023, at 18:41, Ondrej Zajicek  wrote:
>> On Sun, Feb 19, 2023 at 06:28:03PM +0100, Sebastian Hahn wrote:
 On 19. Feb 2023, at 16:31, Alexander Zubkov  wrote:
 Hi,
 
 I doubt that strict bind option is incompatible with multihop. Do you have 
 some problems with it?
>>> 
>>> I get the following error:
>>> 
>>> Multihop BGP cannot be bound to interface
>> 
>> Hi
>> 
>> The strict bind option is not really related to interface, but to local
>> IP (because binding to interface really means binding to its IP). Just do
>> not use inteface option, while keep strict bind enabled and local IP set.
> 
> For each BGP connection I have a separate interface and I am wondering
> how I would deal with this suggestion then. I think it would mean a
> separate unique IP for each neighbour, assigned to the interface, yes?

I have to apologize, it works just as you described. When I tried earlier,
I had received an error about being unable to open a listening socket,
but this was, I assume, due to reloading bird instead of restarting. I
had assumed that this was because bird tried to open the same socket
once for each protocol, but it does not.

Thanks
Sebastian







Re: [PATCH] IPv4 over IPv6 nexthop support on FreeBSD

2023-02-19 Thread Ondrej Zajicek
On Sat, Feb 18, 2023 at 03:41:31PM +0100, Luiz Amaral wrote:
> Hello,
> 
> While experimenting in FreeBSD 13.1 with IPv4 over IPv6 nexthop routes, I
> realized that BIRD was unable to read routes from the kernel as well as
> export routes to the kernel. The support for it was implemented in FreeBSD
> 13.1 [1].
> 
> I have attached a patch that made it work for me on FreeBSD 13.1, both
> importing and exporting to/from kernel. I believe the patch will still need
> some work, as from a quick look, OpenBSD still has no support for it. I'm
> happy to implement any suggested improvements and send a v2 of it.

Hello

This looks particularly simple. Will check that.

> [1] https://reviews.freebsd.org/D30398

> diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
> index 1f793293..92f8c837 100644
> --- a/sysdep/bsd/krt-sock.c
> +++ b/sysdep/bsd/krt-sock.c
> @@ -314,6 +314,10 @@ krt_send_route(struct krt_proto *p, int cmd, rte *e)
>if (ipa_is_link_local(gw))
>   _I0(gw) = 0xfe80 | (i->index & 0x);
>  
> +  if (ipa_is_ip6(gw)) {
> +af = AF_INET6;
> +  }
> +
>sockaddr_fill(&gate, af, gw, NULL, 0);
>msg.rtm.rtm_flags |= RTF_GATEWAY;
>msg.rtm.rtm_addrs |= RTA_GATEWAY;
> @@ -469,7 +473,7 @@ krt_read_route(struct ks_msg *msg, struct krt_proto *p, 
> int scan)
>  
>idst  = ipa_from_sa(&dst);
>imask = ipa_from_sa(&mask);
> -  igate = (gate.sa.sa_family == dst.sa.sa_family) ? ipa_from_sa(&gate) : 
> IPA_NONE;
> +  igate = ipa_from_sa(&gate);
>  
>  #ifdef KRT_SHARED_SOCKET
>if (!scan)


-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."