wget https://github.com/osrg/gobgp/releases/download/v3.20.0/gobgp_3.20.0_linux_amd64.tar.gz
# c1和c2容器启动gobgpd守护进程
# c1
# gobgpd.conf
[global.config]
as = 1002
router-id = "172.17.0.4"
[[neighbors]]
[neighbors.config]
peer-as = 1002
neighbor-address = "172.17.0.5"
./gobgpd -f gobgpd.conf &
# c2
# gobgpd.conf
[global.config]
as = 1002
router-id = "172.17.0.5"
[[neighbors]]
[neighbors.config]
peer-as = 1002
neighbor-address = "172.17.0.4"
./gobgpd -f gobgpd.conf &
# c1容器通过gobgp二进制这个命令行工具宣告路由后c2容器可以收到
./gobgp global rib -a ipv4 add 2.2.2.0/24 nexthop 1.1.1.1
./gobgp global rib
标签:neighbors,gobgpd,global,bgp,conf,config,gobgp,路由
From: https://www.cnblogs.com/WJQ2017/p/17850812.html