更新了缓冲区设置选项,并修复了部分错误

This commit is contained in:
2025-11-26 20:25:23 +08:00
parent ee3d66217a
commit 8ed9e13f2b
6 changed files with 19 additions and 12 deletions

View File

@@ -2,12 +2,16 @@ include "/etc/bird/vars.conf";
include "/etc/bird/function/*.conf"; include "/etc/bird/function/*.conf";
include "/etc/bird/conf/*.conf"; include "/etc/bird/conf/*.conf";
log "/var/log/bird.log" {info, warning, error};
protocol device { protocol device {
scan time 10; scan time 10;
} };
protocol kernel { protocol kernel {
scan time 20; scan time 20;
merge paths yes limit 4;
netlink rx buffer 8388608;
ipv6 { ipv6 {
import none; import none;
export filter { export filter {
@@ -23,11 +27,12 @@ protocol kernel {
protocol kernel { protocol kernel {
scan time 20; scan time 20;
merge paths yes limit 4;
ipv4 { ipv4 {
import none; import none;
export filter { export filter {
if source = RTS_STATIC then reject; if source = RTS_STATIC then reject;
if unet_is_valid_network_v4() then { # 检查UNET自有网段 if unet_is_valid_network_v4() then {
krt_prefsrc = UNET_V4_kernel; krt_prefsrc = UNET_V4_kernel;
accept; accept;
} }

View File

@@ -1,6 +1,8 @@
protocol kernel { protocol kernel {
scan time 20; scan time 20;
kernel table 102; kernel table 102;
merge paths yes limit 4;
netlink rx buffer 8388608;
ipv4 { ipv4 {
table inet4; table inet4;
import none; import none;

View File

@@ -1,9 +1,9 @@
protocol pipe inet6_sync { protocol pipe inet6_sync {
table inet6; table inet6;
peer table master6; peer table master6;
import none;
export filter { export filter {
if bgp_large_community ~ [(LOCAL_ASN, 3,*)] then reject; if bgp_large_community ~ [(LOCAL_ASN, 3,*)] then reject;
accept; accept;
}; };
import none;
} }

View File

@@ -5,6 +5,7 @@ protocol pipe ospf4_sync {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject; if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
accept; accept;
}; };
import none;
} }
protocol pipe ospf6_sync { protocol pipe ospf6_sync {
@@ -14,6 +15,7 @@ protocol pipe ospf6_sync {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject; if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
accept; accept;
}; };
import none;
} }
include "/etc/bird/peers/ospf/*.conf"; include "/etc/bird/peers/ospf/*.conf";

View File

@@ -5,6 +5,7 @@ protocol pipe unet4_sync {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject; if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
accept; accept;
}; };
import none;
} }
protocol pipe unet6_sync { protocol pipe unet6_sync {
table unet6; table unet6;
@@ -13,4 +14,5 @@ protocol pipe unet6_sync {
if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject; if bgp_large_community ~ [(UNET_ASN, 3,*)] then reject;
accept; accept;
}; };
import none;
} }

View File

@@ -2,18 +2,14 @@
cd cd
git clone https://git.nia.ink/brnet/bird_config.git git clone https://git.nia.ink/brnet/bird_config.git
mv /etc/bird /etc/bird.old rm -rf /etc/bird/net
mv bird_config/bird /etc/ mv bird_config/bird/net /etc/bird/
rm -rf /etc/bird/peers rm -rf /etc/bird/bird.conf
cp -r /etc/bird.old/peers /etc/bird/ mv bird_config/bird/bird.conf /etc/bird/
rm -rf /etc/bird/conf
cp -r /etc/bird.old/conf /etc/bird/
rm /etc/bird/vars.conf
cp /etc/bird.old/vars.conf /etc/bird/vars.conf.dis
chmod -R 755 /etc/bird chmod -R 755 /etc/bird
echo "请务必检查配置文件修改vars文件名并重新启动bird" birdc c
cd cd
rm -rf bird_config rm -rf bird_config