First commit
This commit is contained in:
74
bird/conf/dn42.conf
Normal file
74
bird/conf/dn42.conf
Normal file
@@ -0,0 +1,74 @@
|
||||
ipv4 table dn42v4;
|
||||
ipv6 table dn42v6;
|
||||
|
||||
function dn42_is_valid_network() {
|
||||
return net ~ [
|
||||
172.20.0.0/14+
|
||||
];
|
||||
}
|
||||
|
||||
function dn42_is_valid_network_v6() {
|
||||
return net ~ [
|
||||
fd00::/8+
|
||||
];
|
||||
}
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
function dn42_is_self_net() {
|
||||
return net ~ [
|
||||
172.20.21.0/26+
|
||||
];
|
||||
}
|
||||
|
||||
protocol static route_dn42_export_v4 {
|
||||
route 172.20.21.0/26 reject;
|
||||
|
||||
ipv4 {
|
||||
table dn42v4;
|
||||
import filter {
|
||||
bgp_large_community.add((DN42_ASN,3,0));# 不允许导出到内核
|
||||
bgp_large_community.add((DN42_ASN,1,0));# 不允许传输到ibgp
|
||||
bgp_large_community.add((DN42_ASN,200,0));# 传输到Ebgp
|
||||
accept;
|
||||
};
|
||||
export none;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function dn42_is_self_net_v6() {
|
||||
return net ~ [
|
||||
fde8:936e:ee29::/48+
|
||||
];
|
||||
}
|
||||
|
||||
protocol static route_dn42_export_v6 {
|
||||
route fde8:936e:ee29::/48 reject;
|
||||
ipv6 {
|
||||
table dn42v6;
|
||||
import filter {
|
||||
bgp_large_community.add((DN42_ASN,3,0));# 不允许导出到内核
|
||||
bgp_large_community.add((DN42_ASN,1,0));# 不允许传输到ibgp
|
||||
bgp_large_community.add((DN42_ASN,200,0));# 传输到Ebgp
|
||||
accept;
|
||||
};
|
||||
export none;
|
||||
};
|
||||
}
|
||||
43
bird/conf/unet.conf
Normal file
43
bird/conf/unet.conf
Normal file
@@ -0,0 +1,43 @@
|
||||
ipv4 table unet4;
|
||||
|
||||
function unet_is_valid_network_v4() {
|
||||
return net ~ [
|
||||
10.50.0.0/16+,
|
||||
10.88.0.0/16+,
|
||||
10.21.0.0/16+,
|
||||
10.188.0.0/16+,
|
||||
172.20.0.0/14+
|
||||
];
|
||||
}
|
||||
|
||||
protocol pipe unet4_sync {
|
||||
table unet4;
|
||||
peer table master4;
|
||||
export filter {
|
||||
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
|
||||
accept;
|
||||
};
|
||||
}
|
||||
|
||||
function unet_is_self_net() {
|
||||
return net ~ [
|
||||
10.188.18.8/29,
|
||||
172.20.0.0/14
|
||||
];
|
||||
}
|
||||
|
||||
protocol static route_unet_export_v4 {
|
||||
route 10.188.18.8/29 reject;
|
||||
route 172.20.0.0/14 reject;
|
||||
|
||||
ipv4 {
|
||||
table unet4;
|
||||
import filter {
|
||||
bgp_large_community.add((UNET_ASN,3,0));# 不允许导出到内核
|
||||
bgp_large_community.add((UNET_ASN,1,0));# 不允许传输到ibgp
|
||||
bgp_large_community.add((UNET_ASN,200,0));# 传输到Ebgp
|
||||
accept;
|
||||
};
|
||||
export none;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user