Hi. I'm experimenting with bird as a replacement for a quagga install, and tried the following very simple config: router id 91.203.57.1; protocol device { } protocol direct { } protocol kernel { import all; export all; } protocol bgp { local as 44934; neighbor 84.45.39.149 as 25577; import all; export all; } with bird-1.2.0 running on a (relatively old) linux 2.6.23.9 kernel. This seems to work fine, apart from the message "bird: Netlink: File exists" appearing in syslog every minute. My routing table before starting bird looks like this # ip route show 84.45.39.148/30 dev eth1 proto kernel scope link src 84.45.39.150 91.203.56.0/23 dev eth0 proto kernel scope link src 91.203.57.1 default via 84.45.39.149 dev eth1 in case this is related to bird being unable to overwrite the existing static routes? Also, I needed sysctl net.core.rmem_max=524284 before starting quagga to avoid netlink "recvmsg overrun" messages and occasional loss of prefixes. Am I right in assuming that bird will need the same thing for the same reason? Cheers, Chris.
On 2.2.2010 19:57, Chris Webb wrote:
Hi. I'm experimenting with bird as a replacement for a quagga install, and tried the following very simple config:
router id 91.203.57.1;
protocol device { }
protocol direct { }
protocol kernel { import all; export all; }
protocol bgp { local as 44934; neighbor 84.45.39.149 as 25577; import all; export all; }
with bird-1.2.0 running on a (relatively old) linux 2.6.23.9 kernel.
This seems to work fine, apart from the message "bird: Netlink: File exists" appearing in syslog every minute. My routing table before starting bird looks like this
# ip route show 84.45.39.148/30 dev eth1 proto kernel scope link src 84.45.39.150 91.203.56.0/23 dev eth0 proto kernel scope link src 91.203.57.1 default via 84.45.39.149 dev eth1
in case this is related to bird being unable to overwrite the existing static routes?
Could you start birdc and type: echo all debug all all and send me the output?
Also, I needed
sysctl net.core.rmem_max=524284
before starting quagga to avoid netlink "recvmsg overrun" messages and occasional loss of prefixes. Am I right in assuming that bird will need the same thing for the same reason?
I am not sure. Ondrej
Cheers,
Chris.
On Tue, Feb 02, 2010 at 06:57:14PM +0000, Chris Webb wrote:
This seems to work fine, apart from the message "bird: Netlink: File exists" appearing in syslog every minute. My routing table before starting bird looks like this
# ip route show 84.45.39.148/30 dev eth1 proto kernel scope link src 84.45.39.150 91.203.56.0/23 dev eth0 proto kernel scope link src 91.203.57.1 default via 84.45.39.149 dev eth1
in case this is related to bird being unable to overwrite the existing static routes?
Yes, the behavior is that BIRD will ignore existing 'alien' routes and can't overwrite them. As routes in kernel routing table have protocol tag specifying who added such route, we remove 'our' unexpected routes (for example, if BIRD is killed and restarted), but ignore 'alien' routes. But this explanation of error message "Netlink: File exists" would assume that you receive default route wia BGP, which is not usual. I would like to add a option allowing BIRD to remove 'alien' routes, but it is not here yet. It can be workarounded by creating static routes with 'bird' tag, like: ip r a 192.168.210.0/24 via 192.168.1.45 protocol bird
Also, I needed
sysctl net.core.rmem_max=524284
before starting quagga to avoid netlink "recvmsg overrun" messages and occasional loss of prefixes. Am I right in assuming that bird will need the same thing for the same reason?
I don't know about such requirement. -- 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."
Ondrej Zajicek <santiago@crfreenet.org> writes:
But this explanation of error message "Netlink: File exists" would assume that you receive default route wia BGP, which is not usual.
The debug output suggested by Ondrej Filip suggests that this is exactly what's going on:
bgp1: Connecting to 84.45.39.149 from local address 84.45.39.150 bgp1: Connected bgp1: Sending OPEN(ver=4,as=44934,hold=240,id=5bcb3901) bgp1: Got OPEN(as=25577,hold=180,id=542d5af6) bgp1: Got KEEPALIVE bgp1: BGP session established bgp1: State changed to feed bgp1: Sending KEEPALIVE bgp1: Connected to table master bgp1 < added 91.203.56.0/23 dev eth0 bgp1 < out of scope 127.0.0.0/8 dev lo bgp1 < added 84.45.39.148/30 dev eth1 bgp1: State changed to up bgp1: Sending UPDATE bgp1: Got UPDATE bgp1 > added [best] 0.0.0.0/0 via 84.45.39.149 on eth1 kernel1 < added 0.0.0.0/0 via 84.45.39.149 on eth1 Netlink: File exists bgp1 < rejected by protocol 0.0.0.0/0 via 84.45.39.149 on eth1 [...]
I don't think I should be getting 0.0.0.0/0 by BGP. That's a little puzzling and probably should be fixed or at least filtered.
Also, I needed
sysctl net.core.rmem_max=524284
before starting quagga to avoid netlink "recvmsg overrun" messages and occasional loss of prefixes. Am I right in assuming that bird will need the same thing for the same reason?
I don't know about such requirement.
In the same debug output, I'm seeing [...] ??? <<80 messages lost>>
bgp1: Got UPDATE [...] ??? <<198 messages lost>> [...]
I suspected that this might be prefixes being lost because bird isn't increasing the size of the netlink buffer sufficiently and there's an overflow. I think quagga does something like setsockopt(nl->sock, SOL_SOCKET, SO_RCVBUF, &nl_rcvbufsize, sizeof(nl_rcvbufsize)); where nl_rcvbufsize needs to be set (via a command-line option) to something like 262143 or 524287 to avoid losing routes. I guess I could override the net.core.rmem_default sysctl globally to achieve the same effect, but that affects every socket buffer, not just the bird netlink socket. Cheers, Chris.
On Tue, Feb 02, 2010 at 11:03:57PM +0000, Chris Webb wrote:
Also, I needed
sysctl net.core.rmem_max=524284
before starting quagga to avoid netlink "recvmsg overrun" messages and occasional loss of prefixes. Am I right in assuming that bird will need the same thing for the same reason?
I don't know about such requirement.
In the same debug output, I'm seeing
[...] ??? <<80 messages lost>>
bgp1: Got UPDATE [...] ??? <<198 messages lost>> [...]
I suspected that this might be prefixes being lost because bird isn't increasing the size of the netlink buffer sufficiently and there's an overflow.
No, this is message is related to BIRD debug messages lost and it is unrelated to the netlink socket. -- 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."
Chris Webb <chris@arachsys.com> writes:
I don't think I should be getting 0.0.0.0/0 by BGP. That's a little puzzling and probably should be fixed or at least filtered.
Yes, I can confirm that if I filter 0.0.0.0/0, the message goes away. That's a good workaround until I can get the BGP feed fixed not to include the default route, which you're right shouldn't be there! Many thanks for both of your help. Best wishes, Chris.
Hi, Where can I see the neighbor up/down log? I have set the log files to "/var/log/bird.log" but I can only see: 03-02-2010 11:03:04 <INFO> Reconfigured Is the syslog save in some other place for the neighbor up/down log? Thanks. Regards, Affandi Indraji
Affandi INDRAJI wrote:
Hi,
Where can I see the neighbor up/down log?
I have set the log files to "/var/log/bird.log" but I can only see: 03-02-2010 11:03:04 <INFO> Reconfigured
Is the syslog save in some other place for the neighbor up/down log?
Thanks.
Regards, Affandi Indraji
In the CLI type 'echo all' or you can put in log "/var/log/bird.log" all; into bird.conf. (the configure or restart bird) Hope that helps. Mo -- - - Mo Shivji, Senior Network Engineer, London Internet Exchange Ltd 134-138 Borough High Street, London SE1 1LB Registered in England 3137929 at Trinity Court, Trinity Street, Peterborough, PE1 1DA.
On 3.2.2010 04:51, Affandi INDRAJI wrote:
Hi,
Where can I see the neighbor up/down log?
I have set the log files to "/var/log/bird.log" but I can only see: 03-02-2010 11:03:04 <INFO> Reconfigured
Is the syslog save in some other place for the neighbor up/down log?
You should. Use: debug { states, events }; in the protocol section to get those logs. And use options/commands that Mo has mentioned. F>
Thanks.
Regards, Affandi Indraji
Hi Ondrej, Thanks. It works!! Regards, Affandi Indraji -----Original Message----- From: Ondrej Filip [mailto:feela@network.cz] Sent: Wednesday, February 03, 2010 5:39 PM To: Affandi INDRAJI Cc: bird-users@trubka.network.cz; Ondrej Zajicek Subject: Re: BGP log for neighbor up/down On 3.2.2010 04:51, Affandi INDRAJI wrote:
Hi,
Where can I see the neighbor up/down log?
I have set the log files to "/var/log/bird.log" but I can only see: 03-02-2010 11:03:04 <INFO> Reconfigured
Is the syslog save in some other place for the neighbor up/down log?
You should. Use: debug { states, events }; in the protocol section to get those logs. And use options/commands that Mo has mentioned. F>
Thanks.
Regards, Affandi Indraji
participants (5)
-
Affandi INDRAJI -
Chris Webb -
Mo Shivji -
Ondrej Filip -
Ondrej Zajicek