filters: strange protocol restarts
Sergey Popovich
popovich_sergei at mail.ru
Wed Aug 21 18:02:19 CEST 2013
Hello community!!
And again I need to spread some light on BIRD behavior:
why bird restarts protocol instead of just reloading it
when no filter changes in configuration when using
prefix set constant?
There is simple configuration and steps to reproduce this
-------------------------------------------------------------------------
# Configure logging
log syslog all;
log stderr all;
router id 172.16.1.1;
protocol device devices {
scan time 15;
}
### KRT 10
table rt_10;
# This function does not forces "kernel" protocol to reload.
function f1(prefix pfx)
{
if pfx ~ [ 192.168.0.0/16+ ] then
return false;
return true;
}
protocol kernel kernel10 {
table rt_10;
persist no;
scan time 15;
learn yes;
device routes yes;
kernel table 10;
import where f1(net);
export none;
}
### KRT 20
table rt_20;
# And this does, "kernel" protocol restarts without changing PS_1.
define PS_1 = [ 192.168.0.0/16+ ];
function f2(prefix pfx)
{
if pfx ~ PS_1 then
return false;
return true;
}
There is nothing difficult in config: 2 functions f1() and f2() that
do same thing except f2() matches specified as parameter prefix to
a defined constant of type prefix set (PS_1).
Starting bird, and invoking three times on console command to
reconfigure bird (birdc configure) without altering configuration file I get
following in my syslog:
--------------------------------------------------------------------------------
Aug 21 18:50:54 gw1 bird: Started
Aug 21 18:50:59 gw1 bird: Reconfiguring
Aug 21 18:50:59 gw1 bird: Reloading protocol kernel20
Aug 21 18:50:59 gw1 bird: Restarting protocol kernel20
Aug 21 18:50:59 gw1 bird: Reconfigured
Aug 21 18:51:08 gw1 bird: Reconfiguring
Aug 21 18:51:08 gw1 bird: Reloading protocol kernel20
Aug 21 18:51:08 gw1 bird: Restarting protocol kernel20
Aug 21 18:51:08 gw1 bird: Reconfigured
Aug 21 18:51:08 gw1 bird: Reconfiguring
Aug 21 18:51:08 gw1 bird: Reloading protocol kernel20
Aug 21 18:51:08 gw1 bird: Restarting protocol kernel20
Aug 21 18:51:08 gw1 bird: Reconfigured
Same thing can be reproduced with other protocols. This is not
wery good to restart protocol when no REAL things changed in
its filter, as it purges all routes from kernel table, and reinstalls them
again causing flap when huge number of routes needed to be reinstalled.
Can some one explain to me this behavior of BIRD? Does this mean
that usage of constats with type prefix set is not recommended?
Thanks for your support.
--
SP5474-RIPE
Sergey Popovich
More information about the Bird-users
mailing list