netns-testbed
https://qiita.com/_norin_/items/f2c1b0158ee34abcdd0c
Confederation
定义
- 考虑到在AS内部的防环机制,iBGP之间传递路由只能有一跳。
- 联邦,在一个AS之内,划分出多个子AS域,建立EBGP邻接关系,可以将路由母AS之内进行多跳的传递。
举个例子:
- 拓扑
R1-R2-R3-R4
- R1在AS1,R2、R3、R4在AS2,R2,、R3在65002子AS,R4在65004子AS。
R1:
router bgp 1
network 1.1.1.1 mask 255.255.255.255
neighbor 12.1.1.2 remote-as 2
R2:
router bgp 65002 # 宣告子AS号
bgp router-id 2.2.2.2
bgp confederation identifier 2 # 宣告主AS号
neighbor 12.1.1.1 remote-as 1
neighbor 23.1.1.3 remote-as 65002 # 使用子AS号指定邻居
R3:
router bgp 65002
bgp router-id 3.3.3.3
bgp confederation identifier 2
bgp confederation peers 65004
neighbor 23.1.1.2 remote-as 65002
neighbor 34.1.1.4 remote-as 65004
R4:
router bgp 65004
bgp router-id 4.4.4.4
bgp confederation identifier 2
bgp confederation peers 65002
neighbor 34.1.1.3 remote-as 65002
可以将路由反射器和联邦联合使用,解决复杂问题