实验要求:
1.如图搭建网络拓扑,所有路由器各自创建一个环回接口,合理规划IP地址
2.R1-R2-R3-R4-R6之间使用OSPF协议,R4-R5-R6之间使用RIP协议
3.R1环回重发布方式引入OSPF网络
4.R4/R6上进行双点双向重发布
5.分析网络中出现路由环路的原因
6.路由优化,全网可达
实验配置
AR1
interface GigabitEthernet0/0/0 ip address 12.1.1.1 255.255.255.0
interface LoopBack0 ip address 1.1.1.1 255.255.255.0
ospf 1 import-route direct area 0.0.0.0 network 12.1.1.1 0.0.0.0
AR2 interface GigabitEthernet0/0/0 ip address 12.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1 ip address 23.1.1.1 255.255.255.0
interface LoopBack0 ip address 2.2.2.2 255.255.255.0
ospf 1 area 0.0.0.0 network 2.2.2.2 0.0.0.0 network 12.1.1.2 0.0.0.0 network 23.1.1.1 0.0.0.0
AR3 interface GigabitEthernet0/0/0 ip address 34.1.1.1 255.255.255.0
interface GigabitEthernet0/0/1 ip address 23.1.1.2 255.255.255.0
interface GigabitEthernet0/0/2 ip address 36.1.1.1 255.255.255.0
interface LoopBack0 ip address 3.3.3.3 255.255.255.0
ospf 1 area 0.0.0.0 network 3.3.3.3 0.0.0.0 network 23.1.1.2 0.0.0.0 network 34.1.1.1 0.0.0.0 network 36.1.1.1 0.0.0.0
AR4 interface GigabitEthernet0/0/0 ip address 34.1.1.2 255.255.255.0
interface GigabitEthernet0/0/1 ip address 45.1.1.1 255.255.255.0
interface LoopBack0 ip address 4.4.4.4 255.255.255.0
ip ip-prefix r-o index 10 permit 6.6.6.6 32 ip ip-prefix r-o index 20 permit 65.1.1.0 24 route-policy r-o permit node 10 if-match ip-prefix r-o apply cost 10
route-policy r-o permit node 20
ospf 1 import-route rip 100 route-policy r-o area 0.0.0.0 network 4.4.4.4 0.0.0.0 network 34.1.1.2 0.0.0.0
rip 100 undo summary version 2 network 45.0.0.0 import-route ospf 1
AR5 interface GigabitEthernet0/0/0 ip address 65.1.1.2 255.255.255.0 rip metricin 2001 5
interface GigabitEthernet0/0/1 ip address 45.1.1.2 255.255.255.0
interface LoopBack0 ip address 5.5.5.5 255.255.255.0
rip 1
rip 100 undo summary version 2 network 45.0.0.0 network 65.0.0.0 network 5.0.0.0
acl number 2000 rule 5 deny source 45.1.1.0 0 rule 10 permit acl number 2001 rule 5 permit source 36.1.1.0 0
AR6
interface GigabitEthernet0/0/0 ip address 65.1.1.1 255.255.255.0 rip metricout 2000 5
interface GigabitEthernet0/0/1
interface GigabitEthernet0/0/2 ip address 36.1.1.2 255.255.255.0
interface NULL0
interface LoopBack0 ip address 6.6.6.6 255.255.255.0
ospf 1 import-route rip 100 route-policy 1.1.1.1 area 0.0.0.0 network 6.6.6.6 0.0.0.0 network 36.1.1.2 0.0.0.0
rip 100 undo summary version 2 network 65.0.0.0 import-route ospf 1
route-policy 1.1.1.1 permit node 10 if-match ip-prefix 1.1.1.1 apply cost 5
route-policy 1.1.1.1 permit node 20
ip ip-prefix 1.1.1.1 index 10 permit 1.1.1.1 32
acl number 2000 rule 5 permit source 34.1.1.0 0
测试
R1-R2-R3-R4-R6之间使用OSPF协议 R4-R5-R6之间使用RIP协议 R1环回重发布方式引入OSPF网络 R4/R6上进行双点双向重发布 分析网络中出现路由环路的原因 路由回馈导致路由环路 R3 R4 R5 R6 R3通过R6学习R1环回1.1.1.1 R4通过R3学习R1环回1.1.1.1 R5通过R4学习R1环回1.1.1.1 R6通过R5学习R1环回1.1.1.1 此时已出现路由环路
路由优化 全网可达
|