BGP 魅力时刻 欧洲中国方向三网160ms

https://j.teno.cx/root/2024/11/07/672bd8246db33.webp

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:

https://j.teno.cx/root/2024/10/13/670bec1a66d0c.webp

https://j.teno.cx/root/2024/10/13/670bec1b787b2.webp

https://j.teno.cx/root/2024/10/13/670bedd4a3d28.webp


11月1日更新。

路由已稳定,移动走retn 不走de-cix

浙江移动 160ms

https://j.teno.cx/root/2024/11/01/6723ee1f8ce87.webp

https://j.teno.cx/root/2024/11/01/6723ee2004f99.webp

浙江电信175ms

https://j.teno.cx/root/2024/11/01/6723ee3fbcc92.webp

https://j.teno.cx/root/2024/11/01/6723ee20851a5.webp

浙江联通 160ms/170ms

https://j.teno.cx/root/2024/11/01/6723efcc52235.webp

https://j.teno.cx/root/2024/11/01/6723ef3a4af46.webp

持续测试

https://j.teno.cx/root/2024/11/01/6723f63bbd9c8.webp

后续...

亚洲三网优化

1730927505458.webp

敬请期待

文章作者: Administrator
本文链接:
版权声明: 本站所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 TENO 的 小站
喜欢就支持一下吧