更新INET协议栈格式

This commit is contained in:
2025-11-08 21:38:35 +08:00
parent 1bd6e4b59e
commit 7510834a1e
6 changed files with 42 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
template bgp tpl_bgp_up {
template bgp tpl_inet4_up {
graceful restart;
local as LOCAL_ASN;
ipv4 {
@@ -19,6 +19,11 @@ template bgp tpl_bgp_up {
accept;
};
};
}
template bgp tpl_inet6_up {
graceful restart;
local as LOCAL_ASN;
ipv6 {
table inet6;
import filter {
@@ -39,7 +44,7 @@ template bgp tpl_bgp_up {
};
}
template bgp tpl_ibgp {
template bgp tpl_inet4_ibgp {
graceful restart;
local as LOCAL_ASN;
med metric;
@@ -61,6 +66,13 @@ template bgp tpl_ibgp {
accept;
};
};
}
template bgp tpl_inet6_ibgp {
graceful restart;
local as LOCAL_ASN;
med metric;
direct;
ipv6 {
table inet6;
next hop self;
@@ -79,4 +91,5 @@ template bgp tpl_ibgp {
};
};
}
include "/etc/bird/peers/inet/*";

View File

@@ -0,0 +1,9 @@
protocol bgp bgp_int_44324_v4 from tpl_inet4_up {
source address 10.188.6.1;
neighbor 10.188.6.2 as 44324;
}
protocol bgp bgp_int_44324_v6 from tpl_inet6_up {
source address fe80:1::2;
neighbor fe80:1::1%wg_40005 as 44324;
}

View File

@@ -1,4 +1,9 @@
protocol bgp int_ibgp_zj1 from tpl_ibgp {
protocol bgp ibgp_int_zj1_v6 from tpl_inet6_ibgp {
source address fe80:1::2;
neighbor fe80:1::1%wg_40005 as LOCAL_ASN;
}
protocol bgp ibgp_int_zj1_v4 from tpl_inet4_ibgp {
source address 10.188.1.1;
neighbor 10.188.1.2 as LOCAL_ASN;
}

View File

@@ -0,0 +1,9 @@
protocol bgp bgp_unet_hk2 from unet_bgp_up0 {
source address fe80:15:3376:3::2:2;
neighbor fe80:15:3376:3::3:2%pccw1 as 4218818801;
}
protocol bgp bgp_unet_hk3 from unet_bgp_up1 {
source address fe80:15:3376:3::2:2;
neighbor fe80:15:3376:3::3:2%pccw1 as 4218818802;
}

View File

@@ -1,4 +1,4 @@
protocol bgp unet_ibgp_hk1 from unet_ibgp {
protocol bgp ibgp_unet_hk1 from unet_ibgp {
source address fe80:15:3376:3::2:2;
neighbor fe80:15:3376:3::3:2%pccw1 as UNET_ASN;
}

View File

@@ -1,13 +1,11 @@
#!/bin/bash
rm /etc/bird/net/unet.conf
curl https://git.nia.ink/brnet/bird_config/raw/branch/master/bird/net/unet.conf > /etc/bird/net/unet.conf
rm /etc/bird/net/inet.conf
curl https://git.nia.ink/brnet/bird_config/raw/branch/master/bird/net/inet.conf > /etc/bird/net/inet.conf
chmod -R 755 /etc/bird
birdc c
echo "请更新peers/inet的全部配置信息birdc c"
cd
rm update.sh