Hello again, in the bird documentation for BGP it says: -------------------------------------------------------------------------------- neighbor [ip | range prefix] [port number] [as number] [internal|external] ... Like local parameter, this parameter may also be used multiple times with different sub-options. ... -------------------------------------------------------------------------------- That is however not possible, as can be seen : -------------------------------------------------------------------------------- blind:/home/nico# bird -c ./bird.conf bird: ./bird.conf:3:28 Only one neighbor per BGP instance is allowed blind:/home/nico# cat bird.conf protocol bgp client1 { neighbor 10.0.1.1 as 65000; neighbor 10.0.1.2 as 65000; ipv4; } -------------------------------------------------------------------------------- So my question is, is - a) the documentation wrong - b) the code wrong or - c) the reader wrong? Best regards, Nico p.s.: tested on bird 2.14 -- Sustainable and modern Infrastructures by ungleich.ch
Hi,
From my understanding, there can be only one neighbor here, but you can set different parts of it with multiple directives, i.e.:
neighbor 10.0.1.1; neighbor as 65000; But two different IPs would be two neighbors and you must have two separate bgp protocols for that. Or a dynamic protocol that spawns specific protocols. Regards, Alexander On Sat, Dec 30, 2023, 14:42 Nico Schottelius via Bird-users < bird-users@network.cz> wrote:
Hello again,
in the bird documentation for BGP it says:
-------------------------------------------------------------------------------- neighbor [ip | range prefix] [port number] [as number] [internal|external]
... Like local parameter, this parameter may also be used multiple times with different sub-options. ...
--------------------------------------------------------------------------------
That is however not possible, as can be seen :
-------------------------------------------------------------------------------- blind:/home/nico# bird -c ./bird.conf bird: ./bird.conf:3:28 Only one neighbor per BGP instance is allowed blind:/home/nico# cat bird.conf protocol bgp client1 { neighbor 10.0.1.1 as 65000; neighbor 10.0.1.2 as 65000;
ipv4; }
--------------------------------------------------------------------------------
So my question is, is
- a) the documentation wrong - b) the code wrong or - c) the reader wrong?
Best regards,
Nico
p.s.: tested on bird 2.14
-- Sustainable and modern Infrastructures by ungleich.ch
Hi, An earlier paragraph under "Protocol configuration" (<https://bird.network.cz/?get_doc&v=20&f=bird-6.html#bgp-proto-config>) gives a bit more context (emphasis added): ---8<--- Each instance of the BGP corresponds to **one neighboring router**. This allows to set routing policy and all the other parameters differently for each neighbor using the following configuration parameters: local [ip] [port number] [as number] [..] The parameter may be used multiple times with different sub-options (e.g., both local 10.0.0.1 as 65000; and local 10.0.0.1; local as 65000; are valid). neighbor [ip | range prefix] [port number] [as number] [internal|external] [..] Like local parameter, this parameter may also be used multiple times with different sub-options. --->8--- With the context of "one neighboring router" and the examples from the `local` stanza, the example Nico gives in
protocol bgp client1 { neighbor 10.0.1.1 as 65000; neighbor 10.0.1.2 as 65000;
ipv4; }
is indeed not possible. It would be possible to say (as noted by Alexander): ``` protocol bgp client1 { neighbor 10.0.1.1; neighbor as 65000; ipv4; } ``` On 30/12/2023 14:30, Nico Schottelius via Bird-users wrote:
- a) the documentation wrong - b) the code wrong or - c) the reader wrong?
I'm opting for c in this case :-). One option for multiple BGP instances is by using templates, e.g. ``` template bgp TPL_CLIENT { local as 65042; neighbor as 65000; ipv4; } protocol bgp client1 from TPL_CLIENT { neighbor 10.0.1.1; } protocol bgp client2 from TPL_CLIENT { neighbor 10.0.1.2; } ``` Best regards, Gerdriaan Mulder
participants (3)
-
Alexander Zubkov -
Gerdriaan Mulder -
Nico Schottelius