更新了分库分表配置
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
include "/etc/bird/vars.conf";
|
||||
include "/etc/bird/first/*.conf";
|
||||
include "/etc/bird/whitelist/*.conf";
|
||||
include "/etc/bird/function/*.conf";
|
||||
include "/etc/bird/conf/*.conf";
|
||||
|
||||
@@ -7,47 +7,23 @@ protocol device {
|
||||
scan time 10;
|
||||
};
|
||||
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
ipv6 {
|
||||
import none;
|
||||
export filter {
|
||||
if source = RTS_STATIC then reject;
|
||||
if !is_bogon_prefix() then {
|
||||
krt_prefsrc = LOCAL_V6_kernel;
|
||||
accept;
|
||||
}
|
||||
if is_dn42_prefix() then {
|
||||
krt_prefsrc = DN42_V6_kernel;
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
protocol kernel {
|
||||
scan time 20;
|
||||
ipv4 {
|
||||
import none;
|
||||
export filter {
|
||||
if source = RTS_STATIC then reject;
|
||||
if !is_bogon_prefix() then {
|
||||
krt_prefsrc = LOCAL_V4_kernel;
|
||||
accept;
|
||||
}
|
||||
if unet_is_valid_network_v4() then {
|
||||
krt_prefsrc = UNET_V4_kernel;
|
||||
accept;
|
||||
}
|
||||
if is_dn42_prefix() then {
|
||||
krt_prefsrc = DN42_V4_kernel;
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
include "/etc/bird/net/*.conf";
|
||||
include "/etc/bird/template/include.conf";
|
||||
include "/etc/bird/template/*.conf";
|
||||
include "/etc/bird/peers/inet/*.conf";
|
||||
include "/etc/bird/peers/dn42/*.conf";
|
||||
include "/etc/bird/peers/unet/*.conf";
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
protocol static route_int_export_ixp_v6 {
|
||||
route 2406:840:e600::/44 reject;
|
||||
ipv6 {
|
||||
table inet6;
|
||||
import filter {
|
||||
bgp_large_community.add((LOCAL_ASN,3,0));
|
||||
bgp_large_community.add((LOCAL_ASN,1,0));
|
||||
bgp_large_community.add((LOCAL_ASN,200,1));
|
||||
accept;
|
||||
};
|
||||
export none;
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
function is_self_net() {
|
||||
return net ~ [
|
||||
44.32.191.0/24+
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
function is_self_net_v6() {
|
||||
return net ~ [
|
||||
2406:840:e600::/44+,
|
||||
2a0f:1cc5:10::/44+
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
function dn42_is_self_net() {
|
||||
return net ~ [
|
||||
172.20.21.0/26+
|
||||
];
|
||||
}
|
||||
|
||||
function dn42_is_self_net_v6() {
|
||||
return net ~ [
|
||||
fde8:936e:ee29::/48+
|
||||
];
|
||||
}
|
||||
@@ -9,13 +9,13 @@ function unet_is_valid_network_v4() {
|
||||
|
||||
function unet_is_valid_network_v4_allnet(){
|
||||
if unet_is_valid_network_v4() then return true;
|
||||
if is_self_net() then return true;
|
||||
if dn42_is_self_net() then return true;
|
||||
if is_self_net_inet4() then return true;
|
||||
if is_self_net_dn42v4() then return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function unet_is_voalid_net_v6(){
|
||||
if is_self_net_v6() then return true;
|
||||
if dn42_is_self_net_v6() then return true;
|
||||
if is_self_net_inet6() then return true;
|
||||
if is_self_net_dn42v6() then return true;
|
||||
return false;
|
||||
}
|
||||
@@ -1,17 +1,35 @@
|
||||
protocol pipe dn42v4_sync {
|
||||
table dn42v4;
|
||||
peer table master4;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
protocol kernel kernel_dn42v4_105 {
|
||||
scan time 20;
|
||||
kernel table 105;
|
||||
ipv4 {
|
||||
table dn42v4;
|
||||
import none;
|
||||
export filter {
|
||||
if source = RTS_STATIC then reject;
|
||||
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
||||
if is_dn42_prefix() then {
|
||||
krt_prefsrc = DN42_V4_kernel;
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
protocol pipe dn42v6_sync {
|
||||
table dn42v6;
|
||||
peer table master6;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
protocol kernel kernel_dn42v6_105 {
|
||||
scan time 20;
|
||||
kernel table 105;
|
||||
ipv4 {
|
||||
table dn42v6;
|
||||
import none;
|
||||
export filter {
|
||||
if source = RTS_STATIC then reject;
|
||||
if bgp_large_community ~ [(DN42_ASN, 3,*)] then reject;
|
||||
if is_dn42_prefix() then {
|
||||
krt_prefsrc = DN42_V6_kernel;
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -16,12 +16,21 @@ protocol kernel kernel_inet4_102 {
|
||||
};
|
||||
};
|
||||
|
||||
protocol pipe inet6_sync_to_master6 {
|
||||
table inet6;
|
||||
peer table master6;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(LOCAL_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
|
||||
protocol kernel kernel_inet6_102 {
|
||||
scan time 20;
|
||||
kernel table 102;
|
||||
ipv6 {
|
||||
table inet6;
|
||||
import none;
|
||||
export filter {
|
||||
if source = RTS_STATIC then reject;
|
||||
if bgp_large_community ~ [(LOCAL_ASN, 3,*)] then reject;
|
||||
if !is_bogon_prefix() then {
|
||||
krt_prefsrc = LOCAL_V6_kernel;
|
||||
accept;
|
||||
}
|
||||
reject;
|
||||
};
|
||||
};
|
||||
import none;
|
||||
}
|
||||
};
|
||||
@@ -1,9 +0,0 @@
|
||||
include "/etc/bird/template/inet.conf";
|
||||
include "/etc/bird/template/inet_ixp.conf";
|
||||
include "/etc/bird/peers/inet/*";
|
||||
|
||||
include "/etc/bird/template/dn42.conf";
|
||||
include "/etc/bird/peers/dn42/*.conf";
|
||||
|
||||
include "/etc/bird/template/unet.conf";
|
||||
include "/etc/bird/peers/unet/*.conf";
|
||||
@@ -11,7 +11,7 @@ template bgp tpl_inet6_ixp {
|
||||
export filter {
|
||||
if !is_self_net_v6() then reject;
|
||||
if is_bogon_prefix() || (bgp_path.len > 100) then reject;
|
||||
if bgp_large_community !~ [(LOCAL_ASN, 200,1)] then reject;
|
||||
if bgp_large_community !~ [(LOCAL_ASN, 200,0)] then reject;
|
||||
bgp_large_community.empty;
|
||||
accept;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user