Discussion:
Another Netlink: File exists
micah
2014-10-04 16:16:20 UTC
Permalink
Hello,

I read the FAQ on the wiki, and every thread I could find on this list
to try and track down how to stop this message hitting my logs every 15
seconds (and filling them every few days), but I have had no luck.

I'm just doing bgp, no OSPF, my kernel protocol already is in 'learn'
mode, so I set the preference to 100000, but that didn't change
anything. I tried 'debug all;' and 'debug {routes};' in the kernel
protocol, but ended up only really getting anything from doing:

echo all
debug all all
kernel1: Scanning routing table
kernel1: 0.0.0.0/0: [alien] seen
kernel1: 1.0.0.0/24: seen
kernel1: 1.0.4.0/24: seen
...
Netlink: File exists
Netlink: File exists
Netlink: File exists
bird> show route 0.0.0.0/0
0.0.0.0/0 via 208.99.192.141 on eth3 [kernel1 08:44:51] * (10000)

I am adding that in my system's startup script, not via bird. Also, that
route should be filtered out, as I have the following filters:

function martians()
{
return net ~ [ 169.254.0.0/16+, 192.168.0.0/16+, 10.0.0.0/8+, 172.24.0.0/13+, 172.25.0.0/16+, 172.26.0.0/16+,
172.27.0.0/16+, 172.28.0.0/16+, 172.29.0.0/16+, 172.30.0.0/16+, 172.31.0.0/16+,
224.0.0.0/4+, 240.0.0.0/4+, 0.0.0.0/32-, 0.0.0.0/0{25,32}, 0.0.0.0/0{0,7}, 127.0.0.0/8+ ];

function rt_import_all(int asn)
{
if martians() || local_network() then return false;
if bgp_path.first != asn then return false;
if bgp_path.len > 64 then return false;
# not sure this works with multi-hop, so disabling
# if bgp_next_hop != from then return false;
return true;
}

filter bgp_in_cogent
{
if ! rt_import_all(174) then reject;
accept;
}

filter bgp_in_swiftco
{
if ! rt_import_all(25700) then reject;
accept;
}

I tried to run bird -d to get some debugging output, but it didn't
provide me with any (i'm using debian version 1.4.4-1~bpo70+1).

Finally, is there a way to use a more useful pager with birdc? If I do
'show routes' I cannot search with the existing pager, or do other
interesting things, like I can with 'less'.

Thanks for your help!
micah
micah
2014-10-06 14:15:51 UTC
Permalink
micah <***@riseup.net> writes:

Some additional information, I do have a handful of static routes
defined:

protocol static static_bgp {
import all;
route 204.13.164.0/24 reject;
route 198.252.153.0/24 reject;
route 199.254.238.0/24 reject;
}

and these appear in bird as follows:

# birdc show route |grep '!'
204.13.164.0/24 unreachable [static_bgp 2014-10-04] ! (200)
198.252.153.0/24 unreachable [static_bgp 2014-10-04] ! (200)
199.254.238.0/24 unreachable [static_bgp 2014-10-04] ! (200)

which I understand is bird trying to add a route to the kernel, but it
is already there.
Ondrej Zajicek
2014-10-06 21:06:30 UTC
Permalink
Post by micah
Some additional information, I do have a handful of static routes
protocol static static_bgp {
import all;
route 204.13.164.0/24 reject;
route 198.252.153.0/24 reject;
route 199.254.238.0/24 reject;
}
# birdc show route |grep '!'
204.13.164.0/24 unreachable [static_bgp 2014-10-04] ! (200)
198.252.153.0/24 unreachable [static_bgp 2014-10-04] ! (200)
199.254.238.0/24 unreachable [static_bgp 2014-10-04] ! (200)
which I understand is bird trying to add a route to the kernel, but it
is already there.
Yes, that is exactly the reason for having 'Netlink: File exists' error
message.

BIRD does not rewrite routes that are already in kernel table from other
sources.

If you need them in kernel regardless of BIRD, you can as a workaround
learn these routes from kernel proto and set them higher preference
(using 'preference') than ones from static proto. That would prevent
static routes to be exported to the kernel.
--
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: ***@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."
Alexander Demenshin
2014-10-06 15:24:16 UTC
Permalink
Post by micah
I'm just doing bgp, no OSPF, my kernel protocol already is in 'learn'
mode, so I set the preference to 100000, but that didn't change
anything.
Could you please post your config completely (excluding sensitive
information)?
Post by micah
Finally, is there a way to use a more useful pager with birdc?
You can pipe output of birdc: "birdc show routes|less"

Best regards,
Alexander.
micah
2014-10-06 16:23:50 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...