ix-bird-config/bird.conf

63 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-09-08 08:23:51 +00:00
protocol device {
scan time 10;
}
protocol static {
2018-09-08 11:16:50 +00:00
route 172.20.0.0/14 via 172.20.170.192;
2018-09-08 08:23:51 +00:00
route 172.20.170.192/28 reject;
import all;
export none;
}
include "/etc/bird/local4.conf";
# filter helpers
#################
##include "/etc/bird/filter4.conf";
protocol kernel {
scan time 20;
metric 64; # Use explicit kernel route metric to avoid collisions
# with non-BIRD routes in the kernel routing table
import none;
#export all; # Actually insert routes into the kernel routing table
export filter {
if source = RTS_STATIC then reject;
krt_prefsrc = OWNIP;
accept;
};
}
2018-09-08 11:16:50 +00:00
include "/etc/bird/ospf.conf";
2018-09-08 08:23:51 +00:00
template bgp dnpeers {
local as OWNAS;
# metric is the number of hops between us and the peer
path metric 1;
# this lines allows debugging filter rules
# filtered routes can be looked up in birdc using the "show route filtered" command
import keep filtered;
import filter {
# accept every subnet, except our own advertised subnet
# filtering is important, because some guys try to advertise routes like 0.0.0.0
if is_valid_network() && !is_self_net() then {
accept;
}
reject;
};
export filter {
# here we export the whole net
if is_valid_network() then {
accept;
}
reject;
};
import limit 1000 action block;
#source address 172.20.170.192;
};
include "/etc/bird/peers4/*";