First commit
This commit is contained in:
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