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.