Fix:add dn42 and change config
This commit is contained in:
17
bird/net/dn42.conf
Normal file
17
bird/net/dn42.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
protocol pipe dn42v4_sync {
|
||||
table dn42v4;
|
||||
peer table master4;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
};
|
||||
}
|
||||
|
||||
protocol pipe dn42v6_sync {
|
||||
table dn42v6;
|
||||
peer table master6;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
};
|
||||
}
|
||||
34
bird/net/inet.conf
Normal file
34
bird/net/inet.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
kernel table 102;
|
||||
ipv4 {
|
||||
table inet4;
|
||||
import none;
|
||||
export filter {
|
||||
if source = RTS_STATIC then reject;
|
||||
if !is_bogon_prefix() then {
|
||||
krt_prefsrc = LOCAL_V4_kernel;
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
kernel table 102;
|
||||
ipv6 {
|
||||
table inet6;
|
||||
import none;
|
||||
export filter {
|
||||
if source = RTS_STATIC then reject;
|
||||
if !is_bogon_prefix() then {
|
||||
krt_prefsrc = LOCAL_V6_kernel;
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
kernel table 102;
|
||||
merge paths yes limit 4;
|
||||
ipv4 {
|
||||
table inet4;
|
||||
import none;
|
||||
export filter {
|
||||
if source = RTS_STATIC then reject;
|
||||
if !is_bogon_prefix() then {
|
||||
krt_prefsrc = LOCAL_V4_kernel;
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
protocol pipe inet6_sync {
|
||||
table inet6;
|
||||
peer table master6;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(LOCAL_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
};
|
||||
import none;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
protocol pipe ospf4_sync {
|
||||
table ospf4;
|
||||
peer table master4;
|
||||
peer table unet4;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
@@ -10,7 +10,7 @@ protocol pipe ospf4_sync {
|
||||
|
||||
protocol pipe ospf6_sync {
|
||||
table ospf6;
|
||||
peer table master6;
|
||||
peer table unet6;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
|
||||
@@ -1,18 +1,63 @@
|
||||
# 公网处理
|
||||
protocol pipe unet4_inet4_sync {
|
||||
table unet4;
|
||||
peer table inet4;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
if is_bogon_prefix() then reject;
|
||||
bgp_path.empty;
|
||||
accept;
|
||||
};
|
||||
import none;
|
||||
}
|
||||
|
||||
protocol pipe unet6_inet6_sync {
|
||||
table unet6;
|
||||
peer table inet6;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
if is_bogon_prefix() then reject;
|
||||
bgp_path.empty;
|
||||
accept;
|
||||
};
|
||||
import none;
|
||||
}
|
||||
|
||||
|
||||
# DN42处理
|
||||
protocol pipe unet4_dn42v4_sync {
|
||||
table unet4;
|
||||
peer table dn42v4;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
if !is_dn42_prefix() then reject;
|
||||
bgp_path.empty;
|
||||
accept;
|
||||
};
|
||||
import none;
|
||||
}
|
||||
|
||||
protocol pipe unet6_dn42v6_sync {
|
||||
table unet6;
|
||||
peer table dn42v6;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
if !is_dn42_prefix() then reject;
|
||||
bgp_path.empty;
|
||||
accept;
|
||||
};
|
||||
import none;
|
||||
}
|
||||
|
||||
|
||||
# 剩下的进入master (只有V4)
|
||||
protocol pipe unet4_sync {
|
||||
table unet4;
|
||||
peer table master4;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
if !unet_is_valid_network_v4() then reject;
|
||||
accept;
|
||||
};
|
||||
import none;
|
||||
}
|
||||
protocol pipe unet6_sync {
|
||||
table unet6;
|
||||
peer table master6;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
};
|
||||
import none;
|
||||
}
|
||||
Reference in New Issue
Block a user