要求如下:
网段分配如下:
进行BGP配置:
R1(R8):
bgp 1(3)
peer 172.16.0.2(172.16.8.2) as-number 2
R2(R7):
bgp 64512 (64513)
confederation id 2
peer 172.16.0.1(172.16.8.1) as-number 1
R2:
R3和R4同理:
R3:
bgp 64512
confederation id 2
peer 2.2.2.2 as-number 64512
peer 2.2.2.2 connect-interface LoopBack0
peer 4.4.4.4 as-number 64512
peer 4.4.4.4 connect-interface LoopBack0
R4:
bgp 64512
confederation id 2
confederation peer-as 64513(由于R4和R7要建立联邦此处需要声明AS)
peer 3.3.3.3 as-number 64512
peer 3.3.3.3 connect-interface LoopBack0
而R5,R6,R7则是as为64513中
R5:
bgp 64513
confederation id 2
confederation peer-as 64512
peer 6.6.6.6 as-number 64513
peer 6.6.6.6 connect-interface LoopBack0
R6:
bgp 64513
confederation id 2
peer 5.5.5.5 as-number 64513
peer 5.5.5.5 connect-interface LoopBack0
peer 7.7.7.7 as-number 64513
peer 7.7.7.7 connect-interface LoopBack0
R7:
bgp 64513
confederation id 2
confederation peer-as 64512
peer 6.6.6.6 as-number 64513
peer 6.6.6.6 connect-interface LoopBack0
之后需要对BGP网段进行宣告:
而在宣告完1.1.1.1后发现无法学习3.3.3.3处的网段,此时是由于下一跳的不可达导致所以要在R2进行如下配置将下一跳改为本地:
peer 3.3.3.3 next-hop-local
IBGP内部进行反射器配置:
将R4作为R3的客户,R5则为R6的客户
[r3-bgp]peer 4.4.4.4 reflect-client
[r6-bgp]peer 5.5.5.5 reflect-client