各位大佬:
请救救小弟吧。
目前网络情况如下
1.通过 vultr 的 BGP 收了 V4 的全表:
2.配置了配置 WireGuard ,打通了家里与 vultr 的通道
3.安装了 bird2 ,配置文件在/etc/bird 这么写:
router id 我的 vultrIP;
include "asn_cn.conf";
protocol device {}
protocol static {
ipv4 {};
}
protocol bgp vultr
{
local as 我 vultr 的 AS;
neighbor vultr 上面邻居 IP asvultr 上面邻居 AS;
password "BGP 密码";
source address 我 vultr 的 IP;
ipv4 {
import all;
export none;
};
graceful restart on;
multihop 2;
}
protocol bgp home #这是去我家的配置
{
local as 65533;
neighbor 10.88.88.2 as 65532;
source address 10.88.88.1;
ipv4 {
import none;
export filter {
#if bgp_path ~ [4134, 4809, 36678, 4837, 9929, 9808, 9394, 4538, 23910] then accept; else reject;
if bgp_path ~ china_asn then accept; else reject;
};
};
}
其中 asn_cn.conf 文件,通过脚本自动更新了中国区的 AS 号。
ROS 里面配置 BGP:ROS---Routing---Filters 这么写了
if (protocol bgp) {set gw pppoe-out1;accept}
这样是实现了所有中国区 AS 号过滤来的 IP 通过 PPPOE-out1 出去了,但是国外的路由不能走隧道 192.168.100.2 出去,出国留学不了。
请问要这么写才能实现 bgp 分流,解决出国留学问题呢。
请救救小弟吧。
目前网络情况如下
1.通过 vultr 的 BGP 收了 V4 的全表:
2.配置了配置 WireGuard ,打通了家里与 vultr 的通道
3.安装了 bird2 ,配置文件在/etc/bird 这么写:
router id 我的 vultrIP;
include "asn_cn.conf";
protocol device {}
protocol static {
ipv4 {};
}
protocol bgp vultr
{
local as 我 vultr 的 AS;
neighbor vultr 上面邻居 IP asvultr 上面邻居 AS;
password "BGP 密码";
source address 我 vultr 的 IP;
ipv4 {
import all;
export none;
};
graceful restart on;
multihop 2;
}
protocol bgp home #这是去我家的配置
{
local as 65533;
neighbor 10.88.88.2 as 65532;
source address 10.88.88.1;
ipv4 {
import none;
export filter {
#if bgp_path ~ [4134, 4809, 36678, 4837, 9929, 9808, 9394, 4538, 23910] then accept; else reject;
if bgp_path ~ china_asn then accept; else reject;
};
};
}
其中 asn_cn.conf 文件,通过脚本自动更新了中国区的 AS 号。
ROS 里面配置 BGP:ROS---Routing---Filters 这么写了
if (protocol bgp) {set gw pppoe-out1;accept}
这样是实现了所有中国区 AS 号过滤来的 IP 通过 PPPOE-out1 出去了,但是国外的路由不能走隧道 192.168.100.2 出去,出国留学不了。
请问要这么写才能实现 bgp 分流,解决出国留学问题呢。