本次实验将结合RIP、静态路由、OSPF三种路由协议,用RIP来模拟分公司,静态理由充当运营商的角色,OSPF模拟总公司,下面让我们来看一下实验都有哪些要求
1.实验拓扑:
2.实验要求:
第一:R1、R2配置RIP
<R2>sys
[R2]sys R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 10.1.1.2 30
[R2-GigabitEthernet0/0/0]int loop 0 //配置测试接口
[R2-LoopBack0]ip add 3.3.3.3 32
[R2-LoopBack0]rip 1 //发布RIP路由
[R2-rip-1]ver 2
[R2-rip-1]network 10.0.0.0
[R2-rip-1]network 3.0.0.0
<R1>sys //添加接口地址
[R1]sys R1
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.1.1.1 30
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.255.2 30
[R1-GigabitEthernet0/0/1]rip 1 发布RIP路由
[R2-rip-1]ver 2
[R2-rip-1]network 10.0.0.0
第二:R4、R5、R6、R7配置OSPF
我在发布路由的时候做的是路由聚合!!!
<R4>sys //配置接口地址
[R4]sys R4
[R4]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 131.131.255.13 30
[R4-GigabitEthernet0/0/1]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 155.155.1.2 30
[R4-GigabitEthernet0/0/0]int s4/0/1
[R4-Serial4/0/1]ip add 131.131.255.6 30
[R4-Serial4/0/1]ospf 1 router-id 4.4.4.4 //发布OSPF路由信息
[R4-ospf-1]area 0
[R4-ospf-1-area-0.0.0.0]network 131.131.255.12 0.0.0.3
[R4-ospf-1-area-0.0.0.0]network 131.131.255.4 0.0.0.3
<R5>sys
[R5]sys R5
[R5]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 131.131.255.14 30
[R5-GigabitEthernet0/0/0]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 131.131.255.10 30
[R5-GigabitEthernet0/0/1]ospf 1 router-id 5.5.5.5
[R5-ospf-1]area 0
[R5-ospf-1-area-0.0.0.0]network 131.131.255.12 0.0.0.3
[R5-ospf-1-area-0.0.0.0]network 131.131.255.8 0.0.0.3
<R6>sys
[R6]sys R6
[R6]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 131.131.255.9 30
[R6-GigabitEthernet0/0/0]int g0/0/1
[R6-GigabitEthernet0/0/1]ip add 131.131.255.1 30
[R6-GigabitEthernet0/0/1]int s4/0/1
[R6-Serial4/0/1]ip add 131.131.255.5 30
[R6-Serial4/0/1]ospf 1 router-id 6.6.6.6
[R6-ospf-1]area 0
[R6-ospf-1-area-0.0.0.0]network 131.131.255.8 0.0.0.3
[R6-ospf-1-area-0.0.0.0]network 131.131.255.0 0.0.0.3
[R6-ospf-1-area-0.0.0.0]network 131.131.255.4 0.0.0.3
<R7>sys
[R7]sys R7
[R7]int g0/0/0
[R7-GigabitEthernet0/0/0]ip add 131.131.255.2 30
[R7-GigabitEthernet0/0/0]int loop 0 //配置测试接口
[R7-LoopBack0]ip add 5.5.5.5 32
[R7-LoopBack0]ospf 1 router-id 7.7.7.7
[R7-ospf-1]area 0
[R7-ospf-1-area-0.0.0.0]network 131.131.255.0 0.0.0.3
[R7-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
第三:R1、R2、R4只能配置一条静态路由
[R1]ip route-static 0.0.0.0 0 192.168.255.1
[R2]ip route-static 0.0.0.0 0 10.1.1.1
[R4]ip route-static 0.0.0.0 0 155.155.1.1
第四:R5、R6、R7不能配置静态路由
[R4-ospf-1]default-route-advertise //将缺省路由引入到OSPF的区域内
第五:R3只能配置静态路由
[R3]ip route-static 3.3.3.3 255.255.255.255 192.168.255.2 //RIP区域
[R3]ip route-static 5.5.5.5 255.255.255.255 155.155.1.2
[R3]ip route-static 10.1.1.0 255.255.255.0 192.168.255.2
[R3]ip route-static 131.131.255.0 255.255.255.252 155.155.1.2 //OSPF区域
[R3]ip route-static 131.131.255.4 255.255.255.252 155.155.1.2
[R3]ip route-static 131.131.255.8 255.255.255.252 155.155.1.2
[R3]ip route-static 131.131.255.12 255.255.255.252 155.155.1.2
3.测试
因为上面的链路开销值小,所以走上行链路,当把上行链路断掉之后,数据走下面串行链路
实验拓扑:自己可以照着参考一下,我写的哪里有不对是话欢迎到评论区指出
链接:https://pan.baidu.com/s/1Ga1p9cUAZEJrYiOO5kpdXA
提取码:zw8m