Move BGP-specific config to separate file
This commit is contained in:
parent
e5c4ec7119
commit
60e88aac72
34
bgp.conf
Normal file
34
bgp.conf
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
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
|
||||||
|
|
||||||
|
table T_BGP4;
|
||||||
|
import all;
|
||||||
|
export all;
|
||||||
|
import limit 1000 action block;
|
||||||
|
#source address 172.20.170.192;
|
||||||
|
};
|
||||||
|
|
||||||
|
protocol pipe {
|
||||||
|
peer table T_BGP4;
|
||||||
|
import filter {
|
||||||
|
# accept every subnet, except our own advertised subnet
|
||||||
|
# filtering is important, because some guys try to advertise routes like 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
38
bird.conf
38
bird.conf
|
@ -6,7 +6,7 @@ protocol device {
|
||||||
}
|
}
|
||||||
|
|
||||||
protocol static {
|
protocol static {
|
||||||
route 172.20.0.0/14 via 172.20.170.192;
|
# route 172.20.0.0/14 via 172.20.170.192;
|
||||||
route 172.20.170.192/27 reject;
|
route 172.20.170.192/27 reject;
|
||||||
import all;
|
import all;
|
||||||
export none;
|
export none;
|
||||||
|
@ -34,39 +34,5 @@ protocol kernel {
|
||||||
}
|
}
|
||||||
|
|
||||||
include "/etc/bird/ospf.conf";
|
include "/etc/bird/ospf.conf";
|
||||||
|
include "/etc/bird/bgp.conf";
|
||||||
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
|
|
||||||
|
|
||||||
table T_BGP4;
|
|
||||||
import all;
|
|
||||||
export all;
|
|
||||||
import limit 1000 action block;
|
|
||||||
#source address 172.20.170.192;
|
|
||||||
};
|
|
||||||
|
|
||||||
protocol pipe {
|
|
||||||
peer table T_BGP4;
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
include "/etc/bird/peers4/*";
|
include "/etc/bird/peers4/*";
|
||||||
|
|
Loading…
Reference in a new issue