Bird2 BGP

Bird2 BGP

我从供应商处获得的信息如下。

Router ASN:AS56655
Router endpoint:2a03:94e0:f254::
Your endpoint:2a03:94e0:ffff:185:243:218::43
Multihop:Yes
Route table:Full

因此我进行了路线追踪。

root@debian:~# traceroute -s 2a03:94e0:ffff:185:243:218::43 2a03:94e0:f254::
traceroute to 2a03:94e0:f254:: (2a03:94e0:f254::), 30 hops max, 80 byte packets
 1  2a03:94e0:ffff:185:243:218:0:2 (2a03:94e0:ffff:185:243:218:0:2)  0.217 ms  0.292 ms  0.281 ms
 2  2a03:94e0:f254:: (2a03:94e0:f254::)  0.216 ms  0.494 ms  0.484 ms

一些其他路线追踪。

root@debian:~# traceroute 2600::
traceroute to 2600:: (2600::), 30 hops max, 80 byte packets
 1  2a03:94e0:ffff:185:243:218:0:3 (2a03:94e0:ffff:185:243:218:0:3)  0.214 ms  0.238 ms  0.286 ms
 2  2a03:94e0:f44::1 (2a03:94e0:f44::1)  0.167 ms  0.157 ms  0.193 ms
 3  2a03:94e0:f36::2 (2a03:94e0:f36::2)  19.371 ms xe-4-3-2.bar1.Geneva1.Level3.net (2001:1900:5:2:2:0:10:23d)  2.050 ms  2.039 ms 4  * 2001:1900:2::3:7 (2001:1900:2::3:7)  22.849 ms *
 5  Sprint-level3-1x10G.frankfurt.Level3.net (2001:1900:5:3::7a)  22.828 ms  22.817 ms  22.893 ms
 6  sl-mpe70-fra-be2.sprintlink.net (2600:0:2:1239:217:147:96:68)  23.150 ms Sprint-level3-1x10G.frankfurt.Level3.net (2001:1900:5:3::7a)  24.661 ms  25.014 ms
 7  * * *
 8  * * *
 9  * * *
10  sl-crs1-ffx-be8.sprintlink.net (2600:0:2:1239:144:232:13:193)  122.933 ms  119.550 ms sl-crs1-orl-be12.sprintlink.net (2600:0:2:1239:144:232:17:43)  128.735 ms
11  sl-crs1-orl-be12.sprintlink.net (2600:0:2:1239:144:232:17:43)  128.724 ms *  132.571 ms

事实上我的网关应该是2a03:94e0:ffff:185:243:218::1

我在 Bird2 中设置了静态路由。

protocol static {
    ipv6;

    route 2a03:94e0:f253::/128 via 2a03:94e0:ffff:185:243:218::2;
    route 2a03:94e0:f254::/128 via 2a03:94e0:ffff:185:243:218::2;

    route 2a12:f8c0:6960::/48 reject;
}

2a03:94e0:ffff:185:243:218::2修改为 后问题仍未解决2a03:94e0:ffff:185:243:218::1

所有的路由都存储在lo中,导致网络无法访问。

root@debian:~# ip -6 route | tail
unreachable fd00:10:130:151::8/127 dev lo proto bird metric 32 pref medium
unreachable fd00:10:130:151::10/127 dev lo proto bird metric 32 pref medium
unreachable fd00:10:130:151::100/127 dev lo proto bird metric 32 pref medium
unreachable fd00:10:130:151::249 dev lo proto bird metric 32 pref medium
unreachable fd00:10:130:151::250 dev lo proto bird metric 32 pref medium
unreachable fd00:10:130:151::253 dev lo proto bird metric 32 pref medium
unreachable fd00:10:130:151::254 dev lo proto bird metric 32 pref medium
fe80::/64 dev vmbr0 proto kernel metric 256 pref medium
fe80::/64 dev vmbr1 proto kernel metric 256 pref medium
default via 2a03:94e0:ffff:185:243:218:0:1 dev vmbr0 proto kernel metric 1024 onlink pref medium
root@debian:~# ip -6 route | head
::1 dev lo proto kernel metric 256 pref medium
unreachable 2001::/32 dev lo proto bird metric 32 pref medium
unreachable 2001:4:112::/48 dev lo proto bird metric 32 pref medium
unreachable 2001:200:900::/40 dev lo proto bird metric 32 pref medium
unreachable 2001:200:e00::/40 dev lo proto bird metric 32 pref medium
unreachable 2001:200:c000::/35 dev lo proto bird metric 32 pref medium
unreachable 2001:200:e000::/35 dev lo proto bird metric 32 pref medium
unreachable 2001:200::/32 dev lo proto bird metric 32 pref medium
unreachable 2001:218:2002::/48 dev lo proto bird metric 32 pref medium
unreachable 2001:218:2200::/40 dev lo proto bird metric 32 pref medium

其他 BGP 设置

template bgp bgppeers {
    graceful restart on;
    local as 142418;
    default bgp_local_pref 100; 

    ipv4 {
        import none;
        export filter {
            reject;
        };
    };

    ipv6 {
        import filter { 
            accept;
        };
        export filter {            
            reject;
        };
    };
}

protocol bgp terrahost_v6_rs1 from bgppeers {
  source address 2a03:94e0:ffff:185:243:218::43;
  neighbor 2a03:94e0:f254:: as 56655;

  multihop 2;
  
  ipv4 {
    import none;
    export none;
  };
}

如何让路由存在于正确的接口(vmbr0)上。

root@debian:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq master vmbr0 state UP group default qlen 1000
    link/ether 40:a8:f0:af:c5:ef brd ff:ff:ff:ff:ff:ff
    altname enp0s25
3: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 40:a8:f0:af:c5:ef brd ff:ff:ff:ff:ff:ff
    inet 185.243.218.5/24 scope global vmbr0
       valid_lft forever preferred_lft forever
    inet6 2a03:94e0:ffff:185:243:218:0:43/118 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::42a8:f0ff:feaf:c5ef/64 scope link 
       valid_lft forever preferred_lft forever

我已经花了一个多星期了,但还是找不到问题所在,所以我寻求帮助。

相关内容