42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
template bgp dn42_bgp_up {
|
|
graceful restart;
|
|
local as DN42_ASN;
|
|
ipv4 {
|
|
table dn42v4;
|
|
import filter {
|
|
if !dn42_is_valid_network() then reject;
|
|
if dn42_is_self_net() then reject;
|
|
bgp_large_community.empty;
|
|
bgp_large_community.add((DN42_ASN,200,0));# 传输到Ebgp
|
|
accept;
|
|
};
|
|
export filter {
|
|
if !dn42_is_valid_network() then reject;
|
|
if source !~ [RTS_STATIC, RTS_BGP] then reject;
|
|
if bgp_large_community !~ [(DN42_ASN, 200,0)] then reject;
|
|
bgp_large_community.empty;
|
|
accept;
|
|
};
|
|
import limit 9000 action block;
|
|
};
|
|
ipv6 {
|
|
table dn42v6;
|
|
import filter {
|
|
if !dn42_is_valid_network_v6() then reject;
|
|
if dn42_is_self_net_v6() then reject;
|
|
bgp_large_community.empty;
|
|
bgp_large_community.add((DN42_ASN,200,0));# 传输到Ebgp
|
|
accept;
|
|
};
|
|
export filter {
|
|
if !dn42_is_valid_network_v6() then reject;
|
|
if source !~ [RTS_STATIC, RTS_BGP] then reject;
|
|
if bgp_large_community !~ [(DN42_ASN, 200,0)] then reject;
|
|
bgp_large_community.empty;
|
|
accept;
|
|
};
|
|
import limit 9000 action block;
|
|
};
|
|
}
|
|
|
|
include "/etc/bird/peers/dn42/*.conf"; |