R2
undo terminal monitor
system-view
sysname R2
interface loopback 0
ip address 10.10.2.2 32
interface gigabitethernet 0/0/0
ip address 192.168.20.1 24
interface gigabitethernet 0/0/1
ip address 192.168.10.2 24
quit
ospf 1 router-id 2.2.2.2
area 0
network 192.168.20.0 0.0.0.255
network 10.10.2.2 0.0.0.0
quit
quit
bgp 64523 \设置联盟的小AS号
router-id 2.2.2.2
confederation id 200 \配置联盟号
peer 10.10.3.3 as-number 64523
peer 10.10.3.3 connect-interface LoopBack0
\ 发送BGP 报文时所使用的源IP
peer 192.168.10.1 as-number 100 \指定邻居的IP地址以及邻居的AS号
peer 10.10.3.3 next-hop-local \设置最大下一跳
quit
R3
undo terminal monitor
system-view
sysname R3
interface gigabitethernet 0/0/0
ip address 192.168.30.1 24
interface gigabitethernet 0/0/1
ip address 192.168.20.2 24
interface loopback 0
ip address 10.10.3.3 32
quit
ospf 1 router-id 3.3.3.3
area 0
network 192.168.20.0 0.0.0.255
network 192.168.30.0 0.0.0.255
network 10.10.3.3 0.0.0.0
quit
quit
bgp 64523
router-id 3.3.3.3
confederation id 200
confederation peer-as 64545 \将 64545 设置为同一个联盟下小AS
peer 10.10.2.2 as-number 64523
peer 10.10.2.2 connect-interface LoopBack0
peer 10.10.4.4 as-number 64545
peer 10.10.4.4 connect-interface LoopBack0
peer 10.10.4.4 ebgp-max-hop \更改TTL值
quit
R4
undo teminal monitor
system-view
sysname R4
interface loopback 0
ip address 10.10.4.4 32
interface gigabitethernet 0/0/0
ip address 192.168.40.1 24
interface gigabitethernet 0/0/1
ip address 192.168.30.2 24
quit
ospf 1 router-id 4.4.4.4
area 0
network 192.168.30.0 0.0.0.255
network 192.168.40.0 0.0.0.255
network 10.10.4.4 0.0.0.0
quit
quit
bgp 64545
router-id 4.4.4.4
confederation id 200
confederation peer-as 64523
peer 10.10.3.3 as-number 64523
peer 10.10.3.3 connect-interface loopback 0
peer 10.10.3.3 ebgp-max-hop
peer 10.10.5.5 as-number 64545
peer 10.10.5.5 connect-interface loopback 0
quit
R5
undo terminal monitor
system-view
sysname R5
interface gigabitethernet 0/0/0
ip address 192.168.50.1 24
interface gigabitethernet 0/0/1
ip address 192.168.40.2 24
interface loopback 0
ip address 10.10.5.5 32
quit
ospf 1 router-id 5.5.5.5
area 0
network 192.168.40.0 0.0.0.255
network 10.10.5.5 0.0.0.0
quit
quit
bgp 64545
router-id 5.5.5.5
confederation id 200
peer 10.10.4.4 as-number 64545
peer 10.10.4.4 connect-interface LoopBack0
peer 10.10.4.4 next-hop-local
peer 192.168.50.2 as-number 600
quit
R6
undo terminal monitor
system-view
sysname R6
interface gigabitethernet 0/0/1
ip address 192.168.50.2 24
interface loopback 0
ip address 10.10.6.6 32
quit
bgp 600
router-id 6.6.6.6
peer 192.168.50.1 as-number 200
import-route direct
quit
原文:http://blog.51cto.com/13975564/2177340