Issues with parsing config for IPv6 link-local BGP sessions

Sander P me at sanderp.se
Tue Sep 10 15:58:25 CEST 2024


Hi Alexander,

Many thanks for the clarification!

I found a solution that works. It seems to be possible to specify
link-local as a range and the neighbor as external.
Not sure how this works with bfd, but I'll do some more investigations.
Obviously needs more testing and what not before rolling it out to
production.

Pasting config in case someone else stumble on the same use-case. But
essentially I know have leaf switches dialing up my servers and
establishing a session.

template bgp ebgp_client_v6 {
  local as system_as_number;
  ipv6 {
    import none;
    export none;
  };
  bfd graceful;
  connect delay time 1;
  connect retry time 5;
  error wait time 1,5;
  error forget time 10;
};

protocol bgp leaf_auto_1 from ebgp_client_v6 {
  interface "enp67s0f0np0";
  neighbor range fe80::0/64 external;
  dynamic name "leaf";
  dynamic name digits 2;
};

protocol bgp leaf_auto_2 from ebgp_client_v6 {
  interface "enp67s0f1np1";
  neighbor range fe80::0/64 external;
  dynamic name "leaf";
  dynamic name digits 2;
};

Best regards,
Sander

On Tue, Sep 10, 2024 at 9:25 AM Alexander Zubkov <green at qrator.net> wrote:

> Hi Sander,
>
> Yes, a specific interface often not required, because it can be determined
> by the routing table. But, for example, in case when you neighbor IP is
> considered directly reachable (connected) on several interfaces, connection
> might be initiated not on the interface that you expect. And for IPv6 given
> its link local addresses idea, this situation is very common.
> And I'm not aware of the protocol to autodetermine a bgp neighbor. And I
> do not remember of something like that in BIRD. The best you can get, I
> think, is dynamic BGP on one side, that accepts a connection from any
> neighbor. So only one side has to know the exact neighbor IP.
>
> Regards,
> Alexander
>
> On Tue, Sep 10, 2024, 08:44 Sander P <me at sanderp.se> wrote:
>
>> Hi Alexander,
>>
>> Thanks for the fast reply!
>>
>> Yes, that I do understand. But what I'm trying to do here is to auto
>> discover the peers via the interface (IPv6 link-local).
>> So, I'm struggling to understand what the interface option is for if you
>> still need to define the list of neighbors and their ip addresses. It kinda
>> defeats the purpose (I think).
>>
>> Br,
>> Sander
>>
>> On Mon, Sep 9, 2024 at 6:31 PM Alexander Zubkov <green at qrator.net> wrote:
>>
>>> Hi Sander,
>>>
>>> The error indicates that you are missing the neighbor's address in
>>> your configuration.
>>>
>>> Regards,
>>> Alexander
>>>
>>> On Mon, Sep 9, 2024 at 4:54 PM Sander P <me at sanderp.se> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I'm on Bird 2.0.8
>>> > The background is that I'm trying to configure link local BGP sessions
>>> towards Juniper switches.
>>> > I'm trying to follow the the documentation that indicates that it
>>> should be possible to define a interface.
>>> >
>>> > https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.4
>>> > interface string
>>> >
>>> > Define interface we should use for link-local BGP IPv6 sessions.
>>> Interface can also be specified as a part of neighbor address (e.g.,
>>> neighbor fe80::1234%eth0 as 65000;). The option may also be used for non
>>> link-local sessions when it is necessary to explicitly specify an
>>> interface, but only for direct (not multihop) sessions
>>> >
>>> > Here is my config:
>>> >
>>> > template bgp ebgp_client_v6 {
>>> >   local as system_as_number;
>>> >   ipv6 {
>>> >     import all;
>>> >     export filter export_bgp;
>>> >   };
>>> >   bfd graceful;
>>> >   connect delay time 1;
>>> >   connect retry time 5;
>>> >   error wait time 1,5;
>>> >   error forget time 10;
>>> > };
>>> >
>>> > protocol bgp auto_disc_2 from ebgp_client_v6 {
>>> >   interface "enp67s0f0np0";
>>> > };
>>> >
>>> > and from my understanding it should be enough with just that. But I do
>>> get the error:
>>> > /etc/bird/peers.conf:53:1 Neighbor must be configured
>>> >
>>> > I've also tried to add "neighbor as asn_of_neighbor;" To the config
>>> with the same results.
>>> >
>>> > Any help would be much appreciated!
>>> >
>>> > Br,
>>> > Sander
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20240910/bd3dc326/attachment.htm>


More information about the Bird-users mailing list