实验要求:
1、如图连接网络,合理规划IP地址,AS200内IGP协议为OSPF
2、R1属于AS 100;R2-R3-R4小AS 234 R5-R6-R7小AS 567,同时声明大AS 200,R8属于AS300
3、R2-R5 R4-R7之间为联邦Ebgp邻居关系
4、R1-R8之间通行
配置:
R1:
undo t m
sys
sys R1
user-interface con 0
idle-timeout 0 0
int g0/0/0
ip add 12.1.1.1 24
int l1
ip add 1.1.1.1 24
bgp 100
router-id 1.1.1.1
peer 12.1.1.2 as-number 200
network 1.1.1.0 255.255.255.0
___________________________________________________________
R2:
undo t m
sys
sys R2
user-interface con 0
idle-timeout 0 0
int g0/0/0
ip add 23.1.1.1 24
int g0/0/1
ip add 12.1.1.2 24
int g0/0/2
ip add 25.1.1.1 24
ospf 200 rou 92.1.1.1
area 0
net 23.1.1.1 0.0.0.0
net 25.1.1.1 0.0.0.0
bgp 234
router-id 2.2.2.2
confederation id 200
confederation peer-as 567
peer 12.1.1.1 as-number 100
peer 23.1.1.2 as-number 234
peer 25.1.1.2 as-number 567
peer 23.1.1.2 next-hop-local
peer 25.1.1.2 next-hop-local
___________________________________________________________
R3:
undo t m
sys
sys R3
user-interface con 0
idle-timeout 0 0
int g0/0/0
ip add 34.1.1.1 24
int g0/0/1
ip add 23.1.1.2 24
ospf 200 rou 93.1.1.1
area 0
net 0.0.0.0 255.255.255.255
bgp 234
router-id 3.3.3.3
confederation id 200
peer 23.1.1.1 as-number 234
peer 34.1.1.2 as-number 234
___________________________________________________________
R4:
undo t m
sys
sys R4
user-interface con 0
idle-timeout 0 0
int g0/0/0
ip add 47.1.1.1 24
int g0/0/1
ip add 34.1.1.2 24
ospf 200 rou 94.1.1.1
area 0
net 0.0.0.0 255.255.255.255
bgp 234
router-id 4.4.4.4
confederation id 200
confederation peer-as 567
peer 34.1.1.1 as-number 234
peer 47.1.1.2 as-number 567
___________________________________________________________
R5:
undo t m
sys
sys R5
user-interface con 0
idle-timeout 0 0
int g0/0/0
ip add 25.1.1.2 24
int g0/0/1
ip add 56.1.1.1 24
ospf 200 rou 95.1.1.1
area 0
net 0.0.0.0 255.255.255.255
bgp 567
router-id 5.5.5.5
confederation id 200
confederation peer-as 234
peer 25.1.1.1 as-number 234
peer 56.1.1.2 as-number 567
___________________________________________________________
R6:
undo t m
sys
sys R6
user-interface con 0
idle-timeout 0 0
int g0/0/0
ip add 56.1.1.2 24
int g0/0/1
ip add 67.1.1.1 24
ospf 200 rou 96.1.1.1
area 0
net 0.0.0.0 255.255.255.255
bgp 567
router-id 6.6.6.6
confederation id 200
peer 56.1.1.1 as-number 567
peer 67.1.1.2 as-number 567
peer 56.1.1.1 reflect-client
___________________________________________________________
R7:
undo t m
sys
sys R7
user-interface con 0
idle-timeout 0 0
int g0/0/0
ip add 67.1.1.2 24
int g0/0/1
ip add 47.1.1.2 24
int g0/0/2
ip add 78.1.1.1 24
ospf 200 rou 97.1.1.1
area 0
net 47.1.1.2 0.0.0.0
net 67.1.1.2 0.0.0.0
bgp 567
router-id 7.7.7.7
confederation id 200
confederation peer-as 234
peer 47.1.1.1 as-number 234
peer 67.1.1.1 as-number 567
peer 78.1.1.2 as-number 300
peer 47.1.1.1 next-hop-local
peer 67.1.1.1 next-hop-local
___________________________________________________________
R8:
undo t m
sys
sys R8
user-interface con 0
idle-timeout 0 0
int g0/0/2
ip add 78.1.1.2 24
int l8
ip add 8.8.8.8 24
bgp 300
router-id 8.8.8.8
peer 78.1.1.1 as-number 200
network 8.8.8.0 255.255.255.0
分析:只需要在R6路由器上做一个路由反射器,R5为客户端,即所有路由器都有1.1.1.1和8.8.8.8的bgp路由
如下图:
Ping测试: