实验题目如下:
实验拓扑如下:
实验要求如下:
【1】两个协议间进行多点双向重发布
【2】R7的环回没有宣告在OSPF协议中,而是后期重发布进入的
【3】解决环路,所有路径选择最优,且存在备份
实验思路如下:
(1)合理的IP规划
(2)合理的IP配置
(3)配置OSPF协议
(4)R7上需要配置OSPF直连路由的重发布,R3和R2上需要路由重发布
(5)解决关于R7环回地址的环路问题
实验步骤如下:
1、合理的IP配置
指令如下:
R1:
[R1-LoopBack0]ip add 172.16.0.1 26
[R1-LoopBack0]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]ip add 13.1.1.1 24
R2:
[R2-LoopBack0]ip add 172.16.0.65 26
[R2-LoopBack0]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/0]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 24.1.1.1 24
R3:
[R3-LoopBack0]ip add 172.16.128.1 27
[R3-LoopBack0]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 13.1.1.2 24
[R3-GigabitEthernet0/0/0]int g0/0/1
[R3-GigabitEthernet0/0/1]ip add 34.1.1.1 24
R4:
[R4-LoopBack0]ip add 172.16.128.33 27
[R4-LoopBack0]int g0/0/2
[R4-GigabitEthernet0/0/2]ip add 45.1.1.1 24
[R4-GigabitEthernet0/0/2]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 34.1.1.2 24
[R4-GigabitEthernet0/0/1]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 24.1.1.2 24
R5:
[R5-LoopBack0]ip add 172.16.128.65 27
[R5-LoopBack0]int g0/0/1
[R5-GigabitEthernet0/0/1]ip add 56.1.1.1 24
[R5-GigabitEthernet0/0/1]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 45.1.1.2 24
R6:
[R6-LoopBack0]ip add 172.16.128.97 27
[R6-LoopBack0]int g0/0/1
[R6-GigabitEthernet0/0/1]ip add 67.1.1.1 24
[R6-GigabitEthernet0/0/1]int g0/0/0
[R6-GigabitEthernet0/0/0]ip add 56.1.1.2 24
R7:
[R7-LoopBack0]ip add 7.7.7.7 24
[R7-LoopBack0]int g0/0/0
[R7-GigabitEthernet0/0/0]ip add 67.1.1.2 24
2、配置OSPF
指令如下:
R2:
[R2-ospf-1-area-0.0.0.0]network 24.1.1.0 0.0.0.255
R3:
[R3-ospf-1-area-0.0.0.0]network 172.16.128.0 0.0.0.31
[R3-ospf-1-area-0.0.0.0]network 34.1.1.0 0.0.0.255
R4:
[R4-ospf-1-area-0.0.0.0]network 172.16.128.32 0.0.0.31
[R4-ospf-1-area-0.0.0.0]network 24.1.1.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]network 34.1.1.0 0.0.0.255
[R4-ospf-1-area-0.0.0.0]network 45.1.1.0 0.0.0.255
R5:
[R5-ospf-1-area-0.0.0.0]network 45.1.1.0 0.0.0.255
[R5-ospf-1-area-0.0.0.0]network 172.16.128.64 0.0.0.31
[R5-ospf-1-area-0.0.0.0]network 56.1.1.0 0.0.0.255
R6:
[R6-ospf-1-area-0.0.0.0]network 56.1.1.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]network 67.1.1.0 0.0.0.255
[R6-ospf-1-area-0.0.0.0]network 172.16.128.96 0.0.0.31
R7:
[R7-ospf-1-area-0.0.0.0]network 67.1.1.0 0.0.0.255
3、RIP配置
指令如下:
R1:
[R1-rip-1]network 172.16.0.0
[R1-rip-1]network 12.0.0.0
[R1-rip-1]network 13.0.0.0
R2:
[R2-rip-1]network 172.16.0.0
[R2-rip-1]network 12.0.0.0
R3:
[R3]rip 1
[R3-rip-1]ver 2
[R3-rip-1]network 13.0.0.0
4、路由重发布
指令如下:
R2:
[R2]ospf 1
[R2-ospf-1]import-route rip
[R2-ospf-1]q
[R2]rip
[R2-rip-1]import-route ospf 1
R3:
[R3]ospf 1
[R3-ospf-1]import-route rip
[R3-ospf-1]q
[R3]rip 1
[R3-rip-1]import-route ospf 1
5、R7的OSPF重发布
指令如下:
[R7-ospf-1]import-route direct
6、解决R1种关于R7环回地址的环回问题
指令如下:
//R1:
[R1]ip ip-prefix a7 permit 7.7.7.0 24
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]rip metricout ip-prefix a7 3
[R1-GigabitEthernet0/0/0]int g0/0/1
[R1-GigabitEthernet0/0/1]rip metricout ip-prefix a7 3[R1]ip ip-prefix a2 permit 172.16.0.64 26
[R1]int g0/0/1
[R1-GigabitEthernet0/0/1]rip metricin ip-prefix a2 5//R2:
[R2]ip ip-prefix a34 permit 34.1.1.0 24
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]rip metricout ip-prefix a34 5[R2]ip ip-prefix a permit 172.16.0.0 26
[R2]route-policy huawei permit node 10
[R2-route-policy]if-match ip-prefix a//R3:
[R3]ip ip-prefix a24 permit 24.1.1.0 24
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]rip metricout ip-prefix a24 5[R3]ip ip-prefix a permit 172.16.0.0 26
[R3]route-policy huawei permit node 10
[R3-route-policy]if-match ip-prefix a
7、测试如下: