BGP export connected or static prefixes
Anand Buddhdev
anandb at ripe.net
Fri Mar 6 23:05:54 CET 2015
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/03/15 22:48, Ondrej Filip wrote:
Hi Ondrej,
> the problem is caused by the fact that device routes are handled
> differently than the others. Protocol 'kernel' ignores those
> routes and they are generated by protocol 'direct'. And this
> routing protocol is connected to routing table 'master' in you
> example. So this route is not in routing table 'anycast'. You
> should see it byt 'show route table master' and not 'show route
> table anycast'. There are more ways how to fix this:
Thank you for your responses. Actually I had just figured all this
out, before I saw your reply :)
> 1) Use only routing table 'master'. Is there a reason for using
> special routing table in this case?
No, there isn't. I was confusing bird's tables with the linux kernel's
tables. I then realised that I don't need a special table in bird. I
can just use the default one, but connect it to a linux kernel table
named "anycast" in the "protocol kernel" section.
> 2) Generate this routing in routing table 'anycast' a) You can
> either attach protocol 'direct' to table 'anycast': protocol direct
> { interface "dummy0*"; table anycast; }
I'm using this now, but without a special table.
> b) Or you can export this route using protocol 'pipe' protocol pipe
> { # The Pipe table master; peer table
> anycast; export filter as112; };
This is interesting, but not necessary in my case now.
> c) Or you can generate it using protocol 'static': protocol static
> { route 192.75.48.0/24 via "dummy0"; table anycast; };
I also found out that this works, but I'm preferring to use the
"protocol direct" method.
So my final config now looks like this, and it works. Of course, I'm
open to any more improvements.
- --- bird.conf ---
listen bgp address <myaddr>;
router id <myaddr>;
filter as112 {
if net = 192.175.48.0/24 then accept;
}
protocol device {
}
protocol direct {
interface "dummy0*";
}
protocol kernel {
export all;
kernel table 10;
}
protocol bgp {
export filter as112;
local <myaddr> as 112;
neighbor <peeraddr1> as <peeras1>;
}
protocol bgp {
export filter as112;
local <myaddr> as 112;
neighbor <peeraddr2> as <peeras2>;
}
- --- end ---
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: GPGTools - http://gpgtools.org
iEYEARECAAYFAlT6JMIACgkQi+U8Q0SwlCulogCcDaxyd3jT95bhkfRuVC6zjm69
tYkAoItVc93pLuiZqnilR03ZMvxpsPyA
=eYnA
-----END PGP SIGNATURE-----
More information about the Bird-users
mailing list