10
This commit is contained in:
@@ -1,22 +1,9 @@
|
|||||||
define DN42_PREFIXES_V4 = [
|
|
||||||
172.20.0.0/14+
|
|
||||||
];
|
|
||||||
define DN42_PREFIXES_V6 = [
|
|
||||||
fd00::/8+
|
|
||||||
];
|
|
||||||
|
|
||||||
function is_dn42_prefix() {
|
function is_dn42_prefix() {
|
||||||
case net.type {
|
return net ~ [
|
||||||
NET_IP4: return net ~ DN42_PREFIXES_V4;
|
172.20.0.0/14+
|
||||||
NET_IP6: return net ~ DN42_PREFIXES_V6;
|
];
|
||||||
else: print "is_dn42_prefix: unexpected net.type ", net.type, " ", net; return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function is_dn42_self_net() {
|
function is_dn42_self_net() {
|
||||||
case net.type {
|
return net ~ is_dn42_self_IPv4;
|
||||||
NET_IP4: return net ~ is_dn42_self_IPv4;
|
|
||||||
NET_IP6: return net ~ is_dn42_self_IPv6;
|
|
||||||
else: print "is_dn42_prefix: unexpected net.type ", net.type, " ", net; return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,17 @@ template bgp dn42_up1_new {
|
|||||||
ipv6 {import none;export none;};
|
ipv6 {import none;export none;};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template bgp dn42_ds {
|
||||||
|
graceful restart;
|
||||||
|
local as DN42_ASN;
|
||||||
|
ipv4 {
|
||||||
|
table dn42v4;
|
||||||
|
import filter {if !function_inet6_downstream_import() then reject; accept; };
|
||||||
|
export filter {if !function_inet6_downstream_export() then reject; accept; };
|
||||||
|
};
|
||||||
|
ipv6 {import none;export none;};
|
||||||
|
}
|
||||||
|
|
||||||
template bgp dn42_ibgp_new {
|
template bgp dn42_ibgp_new {
|
||||||
graceful restart;
|
graceful restart;
|
||||||
local as DN42_ASN;
|
local as DN42_ASN;
|
||||||
@@ -33,17 +44,4 @@ template bgp dn42_ibgp_new {
|
|||||||
export filter {if !function_dn42_ibgp_export() then reject; accept; };
|
export filter {if !function_dn42_ibgp_export() then reject; accept; };
|
||||||
};
|
};
|
||||||
ipv6 {import none;export none;};
|
ipv6 {import none;export none;};
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template bgp dn42_ibgp_mp_new {
|
|
||||||
graceful restart;
|
|
||||||
local as DN42_ASN;
|
|
||||||
med metric;
|
|
||||||
ipv4 {
|
|
||||||
table dn42v4;
|
|
||||||
import filter {if !function_dn42_ibgp_import() then reject; accept; };
|
|
||||||
export filter {if !function_dn42_ibgp_export() then reject; accept; };
|
|
||||||
};
|
|
||||||
ipv6 {import none;export none;};
|
|
||||||
}
|
}
|
||||||
@@ -24,8 +24,6 @@ trigger() {
|
|||||||
#空格来分隔不同的前缀
|
#空格来分隔不同的前缀
|
||||||
ALL_TUNNEL_SUBNETS="44.32.191.0/24"
|
ALL_TUNNEL_SUBNETS="44.32.191.0/24"
|
||||||
BASE_PRIORITY=200
|
BASE_PRIORITY=200
|
||||||
LAN_SUBNET_V4="172.20.0.0/14"
|
|
||||||
LAN_SUBNET_V6_FD="fd00::/8"
|
|
||||||
TUNNEL_SUBNET_V6="2000::/3"
|
TUNNEL_SUBNET_V6="2000::/3"
|
||||||
|
|
||||||
add_rules() {
|
add_rules() {
|
||||||
|
|||||||
Reference in New Issue
Block a user