diff --git a/bird/template/dn42.conf b/bird/template/dn42.conf index e821d45..ae65731 100644 --- a/bird/template/dn42.conf +++ b/bird/template/dn42.conf @@ -4,19 +4,34 @@ template bgp dn42_bgp_up { ipv4 { table dn42v4; import filter { - if is_dn42_prefix() && !dn42_is_self_net() then accept; - reject; + if !is_dn42_prefix() then reject; + if dn42_is_self_net() then reject; + bgp_large_community.add((DN42_ASN,200,0));# 传输到Ebgp + accept; + }; + export filter { + if !is_dn42_prefix() then reject; + if source !~ [RTS_STATIC, RTS_BGP] then reject; + if bgp_large_community !~ [(DN42_ASN, 200,0)] then reject; + accept; }; - export filter { if is_dn42_prefix() && source ~ [RTS_STATIC, RTS_BGP] then accept; else reject; }; import limit 9000 action block; }; + ipv6 { table dn42v6; import filter { - if is_dn42_prefix() && !dn42_is_self_net_v6() then accept; - reject; + if !is_dn42_prefix() then reject; + if dn42_is_self_net_v6() then reject; + bgp_large_community.add((DN42_ASN,200,0));# 传输到Ebgp + accept; + }; + export filter { + if !is_dn42_prefix() then reject; + if source !~ [RTS_STATIC, RTS_BGP] then reject; + if bgp_large_community !~ [(DN42_ASN, 200,0)] then reject; + accept; }; - export filter { if is_dn42_prefix() && source ~ [RTS_STATIC, RTS_BGP] then accept; else reject; }; import limit 9000 action block; }; }