000
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
protocol pipe dn42v4_sync {
|
protocol pipe dn42v4_sync {
|
||||||
table dn42v4;
|
table dn42v4;
|
||||||
peer table master4;
|
peer table t102v4;
|
||||||
export filter {
|
export filter {
|
||||||
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
||||||
if !is_dn42_prefix() then reject;
|
if !is_dn42_prefix() then reject;
|
||||||
bgp_community.empty;
|
bgp_community.empty;
|
||||||
bgp_large_community.empty;
|
bgp_large_community.empty;
|
||||||
bgp_large_community.add((UNET_ASN,10,4));
|
bgp_large_community.add((UNET_ASN,10,10204));
|
||||||
krt_prefsrc = DN42_V4_kernel;
|
krt_prefsrc = DN42_V4_kernel;
|
||||||
accept;
|
accept;
|
||||||
};
|
};
|
||||||
@@ -15,13 +15,13 @@ protocol pipe dn42v4_sync {
|
|||||||
|
|
||||||
protocol pipe dn42v6_sync {
|
protocol pipe dn42v6_sync {
|
||||||
table dn42v6;
|
table dn42v6;
|
||||||
peer table master6;
|
peer table t102v6;
|
||||||
export filter {
|
export filter {
|
||||||
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
||||||
if !is_dn42_prefix() then reject;
|
if !is_dn42_prefix() then reject;
|
||||||
bgp_community.empty;
|
bgp_community.empty;
|
||||||
bgp_large_community.empty;
|
bgp_large_community.empty;
|
||||||
bgp_large_community.add((UNET_ASN,10,6));
|
bgp_large_community.add((UNET_ASN,10,10206));
|
||||||
krt_prefsrc = DN42_V6_kernel;
|
krt_prefsrc = DN42_V6_kernel;
|
||||||
accept;
|
accept;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ protocol pipe unet4_inet4_sync {
|
|||||||
peer table inet4;
|
peer table inet4;
|
||||||
export filter {
|
export filter {
|
||||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||||
if is_bogon_prefix() then reject;
|
if is_bogon_prefix() then {
|
||||||
|
if net!~[10.188.0.0/16+] then reject;
|
||||||
|
};
|
||||||
accept;
|
accept;
|
||||||
};
|
};
|
||||||
import none;
|
import none;
|
||||||
@@ -28,7 +30,9 @@ protocol pipe unet4_dn42v4_sync {
|
|||||||
peer table dn42v4;
|
peer table dn42v4;
|
||||||
export filter {
|
export filter {
|
||||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||||
if !is_dn42_prefix() then reject;
|
if !is_dn42_prefix() then {
|
||||||
|
if net!~[10.188.0.0/16+] then reject;
|
||||||
|
};
|
||||||
accept;
|
accept;
|
||||||
};
|
};
|
||||||
import none;
|
import none;
|
||||||
@@ -60,15 +64,4 @@ protocol pipe unet4_sync {
|
|||||||
accept;
|
accept;
|
||||||
};
|
};
|
||||||
import none;
|
import none;
|
||||||
}
|
|
||||||
|
|
||||||
protocol pipe unet4_syncto_inet4 {
|
|
||||||
table unet4;
|
|
||||||
peer table inet4;
|
|
||||||
export filter {
|
|
||||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
|
||||||
if net!~[10.188.0.0/16+] then reject;
|
|
||||||
accept;
|
|
||||||
};
|
|
||||||
import none;
|
|
||||||
}
|
}
|
||||||
10
update.sh
10
update.sh
@@ -6,14 +6,8 @@ git clone https://git.nia.ink/brnet/bird_config.git
|
|||||||
rm /etc/bird/bird.conf
|
rm /etc/bird/bird.conf
|
||||||
mv ./bird_config/bird/bird.conf /etc/bird/bird.conf
|
mv ./bird_config/bird/bird.conf /etc/bird/bird.conf
|
||||||
|
|
||||||
rm /etc/bird/filter/*.conf
|
rm /etc/bird/net/*.conf
|
||||||
mv ./bird_config/bird/filter/*.conf /etc/bird/filter/
|
mv ./bird_config/bird/net/*.conf /etc/bird/net/
|
||||||
|
|
||||||
rm /etc/bird/function/unet.conf
|
|
||||||
mv ./bird_config/bird/function/unet.conf /etc/bird/function/unet.conf
|
|
||||||
|
|
||||||
rm /etc/bird/net/dn42.conf
|
|
||||||
mv ./bird_config/bird/net/dn42.conf /etc/bird/net/dn42.conf
|
|
||||||
|
|
||||||
rm /etc/bird/template/*.conf
|
rm /etc/bird/template/*.conf
|
||||||
mv ./bird_config/bird/template/*.conf /etc/bird/template/
|
mv ./bird_config/bird/template/*.conf /etc/bird/template/
|
||||||
|
|||||||
Reference in New Issue
Block a user