首先
如果您是第一次操作 BGP,建議可以先參考 上一篇文章 ,然後準備好您的ASN,IP地址,和驗證好RPKI。接下來就是聯絡海豹(seadog007),將您的設備 Colo 託管進機房。
跟 RS 起 Peer Session
define MyASN = 123456; #修改成你的ASN
define MySTUIXIP4 = 103.158.187.???; #修改成你的STUIX IPv4
define MySTUIXIP6 = 2a0f:5707:ffe3::???; #修改成你的STUIX IPv6
unction bgp_export4() {
if net ~ [你在TWNIC申請的IPv4/23+] then return true;
return false;
}
unction bgp_export6() {
if net ~ [你在TWNIC申請的IPv6/32+] then return true;
return false;
}
##省略了 device、kernel按需填寫 ##
template bgp stuix {
local MySTUIXIP4 as MyASN;
graceful restart on;
ipv4 {
import all;
export where bgp_export4();
};
ipv6 {
import all;
export where bgp_export6();
};
}
protocol bgp STUIX_RS1_4 from stuix {
neighbor 103.158.187.1 as 38855;
source address MySTUIXIP4;
}
protocol bgp STUIX_RS2_4 from stuix{
neighbor 103.158.187.2 as 38855;
source address MySTUIXIP4;
}
protocol bgp STUIX_RS1_6 from stuix {
neighbor 2a0f:5707:ffe3::1 as 38855;
source address MySTUIXIP6;
}
protocol bgp STUIX_RS2_6 from stuix {
neighbor 2a0f:5707:ffe3::2 as 38855;
source address MySTUIXIP6;
}