bgp router with multi asn's - neighbor config ?
G'day! For the configuration we want to set up, I couldn't find any details in the docs, the wiki or the list archive. So please allow me to ask my questions here (questions see below). desired setup: We want to establish a router ('A') announcing two different ASNs (as1,as2) to it's neighbours. In fact we want to setup three routers A, B and C, all of them corporately announcing as1 and as2. I'd guess the config on router A should include some lines like these: protocol bgp { local as <as1>; neighbor X as as9; (...) } protocol bgp { local as <as2>; neighbor X as as9; (...) } X being one of the neighbours and announcing as9. Question 1: Is this basically the correct approach? Question 2: What would be the correct config on router X (A's neighbour) in this setup? Would it look like: protocol bgp { local as <as9>; neighbor A as as1; (...) } protocol bgp { local as <as9>; neighbor A as as2; (...) } Question 3: Does anyone have a pointer to a text/tutorial/whatever that explains in detail what config is needed for this kind of setup? Best regards, Kai -- "Das ist Demokratie, wenn man sich aussuchen darf, wer einen verarscht." (Hagen Rether) D-65203 Wiesi fast: kai_pf (aT] web(dot)de ++ PGP Key fingerprint B567 C43E 99D1 7709 7D64 3BF8 2DE8 1092 0EEF D58E ++ -----BEGIN GEEK CODE BLOCK----- VERSION: 3.12 GCS/IT/CM d- s:- a+>-----(?) C++$ UL++(++++$) P+++ L++ E-(+) W--(+) N !w---($) !O !M V? PS+ PE-() Y+ PGP(+) t R*@ tv--@ b+>++ DI++ G e+++(*) h? y? ------END GEEK CODE BLOCK------
Hello bird-users and -experts! Does anyone have hints for a bird-neewbie like me on this kind of setup (see below)? Best regards, Kai On Tue, 2014-09-02 at 23:36 +0200, Kai wrote:
G'day!
For the configuration we want to set up, I couldn't find any details in the docs, the wiki or the list archive. So please allow me to ask my questions here (questions see below).
desired setup:
We want to establish a router ('A') announcing two different ASNs (as1,as2) to it's neighbours. In fact we want to setup three routers A, B and C, all of them corporately announcing as1 and as2.
I'd guess the config on router A should include some lines like these: protocol bgp { local as <as1>; neighbor X as as9; (...) } protocol bgp { local as <as2>; neighbor X as as9; (...) } X being one of the neighbours and announcing as9.
Question 1: Is this basically the correct approach?
Question 2: What would be the correct config on router X (A's neighbour) in this setup? Would it look like: protocol bgp { local as <as9>; neighbor A as as1; (...) } protocol bgp { local as <as9>; neighbor A as as2; (...) }
Question 3: Does anyone have a pointer to a text/tutorial/whatever that explains in detail what config is needed for this kind of setup?
Best regards, Kai
-- "Das ist Demokratie, wenn man sich aussuchen darf, wer einen verarscht." (Hagen Rether) D-65203 Wiesi fast: kai_pf (aT] web(dot)de ++ PGP Key fingerprint B567 C43E 99D1 7709 7D64 3BF8 2DE8 1092 0EEF D58E ++ -----BEGIN GEEK CODE BLOCK----- VERSION: 3.12 GCS/IT/CM d- s:- a+>-----(?) C++$ UL++(++++$) P+++ L++ E-(+) W--(+) N !w---($) !O !M V? PS+ PE-() Y+ PGP(+) t R*@ tv--@ b+>++ DI++ G e+++(*) h? y? ------END GEEK CODE BLOCK------
On 2.9.2014 23:36, Kai wrote:
G'day!
Hi!
For the configuration we want to set up, I couldn't find any details in the docs, the wiki or the list archive. So please allow me to ask my questions here (questions see below).
desired setup:
We want to establish a router ('A') announcing two different ASNs (as1,as2) to it's neighbours. In fact we want to setup three routers A, B and C, all of them corporately announcing as1 and as2.
You cannot have two BGP relations to a single peer. I see two options: 1) You will announce two different AS paths with the same first AS: < as1 > < as2 as1 > so you can see as2 is announced "behind" as1. 2) You can announce two same as paths: < as1 > < as2 > But the peer must disable check on 1st AS in AS paths. Cisco command "no bgp enforce-first-as" In both case the configuration is: protocol bgp { local as <as1>; neighbor X as as9; (...) } Different is synthesis of propagated prefixes. Ondrej
I'd guess the config on router A should include some lines like these: protocol bgp { local as <as1>; neighbor X as as9; (...) } protocol bgp { local as <as2>; neighbor X as as9; (...) } X being one of the neighbours and announcing as9.
Question 1: Is this basically the correct approach?
Question 2: What would be the correct config on router X (A's neighbour) in this setup? Would it look like: protocol bgp { local as <as9>; neighbor A as as1; (...) } protocol bgp { local as <as9>; neighbor A as as2; (...) }
Question 3: Does anyone have a pointer to a text/tutorial/whatever that explains in detail what config is needed for this kind of setup?
Best regards, Kai
Hi, On Thu, 04 Sep 2014, Ondrej Filip wrote:
On 2.9.2014 23:36, Kai wrote:
G'day!
Hi!
For the configuration we want to set up, I couldn't find any details in the docs, the wiki or the list archive. So please allow me to ask my questions here (questions see below).
desired setup:
We want to establish a router ('A') announcing two different ASNs (as1,as2) to it's neighbours. In fact we want to setup three routers A, B and C, all of them corporately announcing as1 and as2.
You cannot have two BGP relations to a single peer. I see two options:
You will certainly have to do this on different IP's. And actually I only do it with different IP's in different netmasks. I think this config is exactly what's requested. It was written for use on FreeBSD (using multifib). At one point I got collisons, and I did all my best to prevent that (with success). So probaly you can make it more simple. The compact version of bird.conf would be: table as1; table as2; listen bgp address 10.0.1.102 port 179; listen bgp address 10.0.2.102 port 179; protocol static stat_net1 { table as1; route 192.168.3.0/24 via "em0"; } protocol static stat_net2 { table as2; route 192.168.188.0/24 via "em0"; } protocol bgp COMPANY1 { table as1; router id 10.0.1.102; local 10.0.1.102 as 1; neighbor 10.0.1.101 as 69; direct; export where proto = "stat_net1"; } protocol bgp COMPANY2 { table as2; router id 10.0.2.102; local 10.0.2.102 as 2; neighbor 10.0.2.101 as 69; direct; export where proto = "stat_net2"; } I'm very curious to hear any comments, or see different approaches. Leo. -- Sent from my Google Glass
On Thu, Sep 04, 2014 at 12:32:46PM +0000, Leo Vandewoestijne wrote:
We want to establish a router ('A') announcing two different ASNs (as1,as2) to it's neighbours. In fact we want to setup three routers A, B and C, all of them corporately announcing as1 and as2.
You cannot have two BGP relations to a single peer. I see two options:
You will certainly have to do this on different IP's. And actually I only do it with different IP's in different netmasks.
Yes, you can have two BGP sessions between two BGP neighbors if you use two pairs of IP addresses, IMHO it should work even if all addresses have the same netmask.
I think this config is exactly what's requested. It was written for use on FreeBSD (using multifib). At one point I got collisons, and I did all my best to prevent that (with success). So probaly you can make it more simple.
listen bgp address 10.0.1.102 port 179; listen bgp address 10.0.2.102 port 179;
I don't think you should have two 'listen bgp' options. AFAIK there is only one listening BGP socket in BIRD, but it is OK to have it listen on 0.0.0.0 (default value). Incoming sessions are dispatched based on their source addresses. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@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."
Hello, Many thanks already for your input! While working further on the topic, I stubled about one more uncertainty - maybe some kind soul can provide me with one or two additional answers? :)
Von: "Leo Vandewoestijne" <bird@unicycle.net> On Thu, 04 Sep 2014, Ondrej Filip wrote:
On 2.9.2014 23:36, Kai wrote:
desired setup:
We want to establish a router ('A') announcing two different ASNs (as1,as2) to it's neighbours. In fact we want to setup three routers A, B and C, all of them corporately announcing as1 and as2.
You cannot have two BGP relations to a single peer. I see two options:
You will certainly have to do this on different IP's. And actually I only do it with different IP's in different netmasks.
I think this config is exactly what's requested. [...] protocol bgp COMPANY1 { table as1; router id 10.0.1.102; local 10.0.1.102 as 1; neighbor 10.0.1.101 as 69; direct; export where proto = "stat_net1"; }
protocol bgp COMPANY2 { [...]
In this example, that would supposedly perfectly suit my problem, the "router id" config param is used _inside_ a "protocol bgp" block. The version of the "BIRD User's Guide" I have (it doesn't tell it's version, quite new, pdf 49 pages) documents the use of "router id" only _outside_ of "protocol" blocks. So, (1) should it work to use "router id" inside a "protocol" block (and different router ids inside different blocks), and (2) is this use of the "router id" directive officially supported? (Regarding 1: it apparently does!?) Best regards, Kai
On Mon, 08 Sep 2014, Kai wrote:
So, (1) should it work to use "router id" inside a "protocol" block (and different router ids inside different blocks), and (2) is this use of the "router id" directive officially supported?
I found that on http://bird.network.cz/?get_doc&f=bird-3.html#ss3.3 under "router id IPv4 address" (the one first listed under 3.3): "This option can be used to override global router id for a given protocol. Default: uses global router id." -- Met vriendelijke groet, With kind regards, Leo Vandewoestijne -- Sent from my Google Glass
participants (4)
-
Kai -
Leo Vandewoestijne -
Ondrej Filip -
Ondrej Zajicek