BGP 魅力时刻 欧洲中国方向三网160ms
BGP 魅力时刻 欧洲中国方向三网160ms
BGP Player 白嫖的transit
刚才写了下过滤器,手搓出欧洲ipv6优化网
本人是新手,主打一个能用就完事,bird配置仅供各位参考
log syslog all;
router id ***.**.***.**; # 指定路由ID
define ASN=215750;
define OWNIPv6s=[*******::/48];
define BadASNs = [4134, 9808, 4837, 56041];
define TargetASNs = [4837];
protocol device {
}
protocol kernel {
ipv6 {
export all;
};
}
protocol static static_v6 {
ipv6;
route ******::/48 blackhole;
# route略
route ****/128 via fe80::********%***;
route ****/128 via fe80::********%***;
route ****/128 via fe80::********%***;
}
filter import_cn_v6 {
if net ~ [::/0] then reject; # 拒绝默认路由
# 对于到达指定 ASN 的路由,降低本地优先级
if (bgp_path.last ~ BadASNs) || (bgp_path ~ BadASNs) then {
bgp_local_pref = 50; # 设置较低的本地优先级
}
accept;
};
filter import_open_v6 {
if net ~ [::/0] then reject; # 拒绝默认路由
if (bgp_path ~ [6939]) then reject;
if (bgp_path ~ [174]) then reject;
# 如果路径中包含目标 ASN,设置较低的本地优先级
if (bgp_path ~ TargetASNs) then {
bgp_local_pref = 40; # 设置较低的本地优先级
} else {
bgp_local_pref = 100; # 默认本地优先级
}
accept;
};
filter import_filter_v6 {
if net ~ [::/0] then reject;
accept;
};
filter export_filter_v6 {
if net ~ OWNIPv6s then accept;
reject;
};
filter export_filter_pre_v6 {
if net ~ OWNIPv6s then {
bgp_path.prepend(ASN);
bgp_path.prepend(ASN);
accept;
}
reject;
};
filter export_filter_pre2_v6 {
if net ~ OWNIPv6s then {
bgp_community.add((34927, 9610)); /* 拒发到 ASN 1299 (Telia) */
bgp_community.add((34927, 9470)); /* 拒发到 ASN 174 (Cogent) */
bgp_community.add((34927, 9130)); /* 拒发到 he */
accept;
}
reject;
};
filter export_open_v6 {
if net ~ OWNIPv6s then {
bgp_path.prepend(ASN);
accept;
}
reject;
};
protocol bgp as209022_v6 {
local *** as ASN;
neighbor *** as 209022;
ipv6 {
import filter import_cn_v6;
export filter export_filter_pre_v6;
export limit 10;
};
graceful restart;
};
protocol bgp as34927_v6 {
local **** as ASN;
neighbor ***** as 34927;
ipv6 {
import filter import_cn_v6;
export filter export_filter_pre2_v6;
export limit 10;
};
graceful restart;
};
protocol bgp as41051_v6 {
local ***** as ASN;
neighbor ***** as 41051;
ipv6 {
import filter import_open_v6;
export filter export_open_v6;
export limit 10;
};
graceful restart;
};
双向160ms 打流200mbps
本来电信也可以走decix 和移动一样压到160ms,说再优化下联通改了下过滤器,重启了几波bird 电信路由没了 :ac03:
11月1日更新。
路由已稳定,移动走retn 不走de-cix
浙江移动 160ms
浙江电信175ms
浙江联通 160ms/170ms
持续测试
后续...
亚洲三网优化
敬请期待
本文链接:
/archives/bgp-opt-01
版权声明:
本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自
TENO 的 小站!
喜欢就支持一下吧