Another Netlink: File exists
micah anderson
micah at riseup.net
Fri Oct 24 18:05:11 CEST 2014
Ondrej Zajicek <santiago at crfreenet.org> writes:
> On Mon, Oct 06, 2014 at 10:15:51AM -0400, micah wrote:
>> micah <micah at 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.
>
> 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.
How do I learn these from kernel proto?
I've got the following, should I move those route lines I have in
protocol static up into protocol kernel and change the preference in
protocol kernel to be higher? Or do I leave them also in protocol
static, but also have them in protocol kernel, with the preference in
protocol kernel higher?
protocol kernel {
learn; # Learn all alien routes from the kernel
preference 10000;
scan time 15; # Scan kernel routing table every 20 seconds
import all; # Default is import all
export all; # Default is export none
}
##########################################################################
## static routes
##########################################################################
protocol static static_bgp {
# prefixes that are propagated to upstream. These prefixes are represented as
# unreachable routes, which seems strange but it does not matter for BGP and has
# a secondary advantage that packets for AS-local but unreachable destinations are
# rejected and not sent to the upstream.
import all;
preference 10000;
route 204.13.164.0/24 reject;
route 198.252.153.0/24 reject;
route 199.254.238.0/24 reject;
}
Also - will the better rate filtering of log messages changes in 1.4.5
make this less of a problem?
thanks!
micah
More information about the Bird-users
mailing list