《2022年2022年华为ospf多区域配置》由会员分享,可在线阅读,更多相关《2022年2022年华为ospf多区域配置(7页珍藏版)》请在金锄头文库上搜索。
1、OSPF 多区域配置1.规划网络拓扑图如下:文字说明:a.R1与 R2作为末梢区域area 1 b.R2与 R3作为主区域area 0 c.R3与 R4作为末梢区域area 2 d.R1上连接交换机LSW3 , LSW3上拥有 vlan 8,g0/0/1 与 g/0/2 属于 vlan 8 e.R1还直连一个主机,网段为192.168.7.0 网段。2.配置:R1: sys Enter system view, return user view with Ctrl+Z. Huaweiun in en Info: Information center is disabled. Huaweisys
2、name R1 R1int e0/0/0 R1-Ethernet0/0/0ip add 12.1.1.1 30 R1-Ethernet0/0/0q R1int e0/0/1 R1-Ethernet0/0/1ip add 192.168.8.1 24 R1-Ethernet0/0/1q R1int g0/0/0 R1-GigabitEthernet0/0/0ip add 192.168.7.1 24 R1-GigabitEthernet0/0/0q R1int loop R1intLoopBack 0 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - -
3、- - - - - 名师精心整理 - - - - - - - 第 1 页,共 7 页 - - - - - - - - - R1-LoopBack0ip add 1.1.1.1 24 R1-LoopBack0q R1int loopback 1 R1-LoopBack1ip add 192.168.1.1 24 R1-LoopBack1q R1ospf 10 R1-ospf-10area 1 R1-ospf-10-area-0.0.0.1network 12.1.1.0 0.0.0.3 R1-ospf-10-area-0.0.0.1network 1.1.1.0 0.0.0.255 R1-osp
4、f-10-area-0.0.0.1network 192.168.1.0 0.0.0.255 R1-ospf-10-area-0.0.0.1network 192.168.8.0 0.0.0.255 / 为了能让192.168.8.0 网段能够到达2.2.2.2 R1-ospf-10-area-0.0.0.1network 192.168.7.0 0.0.0.255 / 为了能让192.168.7.0 网段能够到达2.2.2.2 R1-ospf-10-area-0.0.0.1q R1-ospf-10q R1ip route-static 192.168.0.0 255.255.255.0 12
5、.1.1.2 R1ip route-static 192.168.0.0 255.255.255.0 192.168.8.254 R1 R2: R2int e0/0/0 R2-Ethernet0/0/0ip add 12.1.1.2 30 R2-Ethernet0/0/0int e0/0/1 R2-Ethernet0/0/1ip add 23.1.1.1 30 R2-Ethernet0/0/1q R2int loopback 0 R2-LoopBack0ip add 2.2.2.2 24 R2-LoopBack0q R2int loopback 1 R2-LoopBack1ip add 192
6、.168.2.1 24 R2-LoopBack1q R2ospf 10 R2-ospf-10area 1 R2-ospf-10-area-0.0.0.1network 12.1.1.0 0.0.0.3 R2-ospf-10-area-0.0.0.1q R2-ospf-10area 0 R2-ospf-10-area-0.0.0.0network 23.1.1.0 0.0.0.3 R2-ospf-10-area-0.0.0.0network 2.2.2.0 0.0.0.255 R2-ospf-10-area-0.0.0.0network 192.168.2.0 0.0.0.255 名师资料总结
7、- - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 7 页 - - - - - - - - - R2-ospf-10-area-0.0.0.0q R2-ospf-10q R2 R3: Huaweisysname R3 R3int e0/0/0 R3-Ethernet0/0/0ip add 34.1.1.1 30 R3-Ethernet0/0/0int e0/0/1 R3-Ethernet0/0/1ip add 23.1.1.2 30 R3-Ethernet0/0/1q R3int loop
8、back 0 R3-LoopBack0ip add 3.3.3.3 24 R3-LoopBack0q R3int loopback 1 R3-LoopBack1ip add 192.168.3.1 24 R3-LoopBack1q R3ospf 10 R3-ospf-10area 2 R3-ospf-10-area-0.0.0.2network 34.1.1.0 0.0.0.3 R3-ospf-10-area-0.0.0.2q R3-ospf-10area 0 R3-ospf-10-area-0.0.0.0network 3.3.3.0 0.0.0.255 R3-ospf-10-area-0.
9、0.0.0network 23.1.1.0 0.0.0.3 R3-ospf-10-area-0.0.0.0network 192.168.3.0 0.0.0.255 R3-ospf-10-area-0.0.0.0q R3-ospf-10q R3 R4:Huaweisysname R4 R4int e0/0/0 R4-Ethernet0/0/0ip add 34.1.1.2 30 R4-Ethernet0/0/0q R4int loopback 0 R4-LoopBack0ip add 4.4.4.4 24 R4-LoopBack0q R4int loopback 1 R4-LoopBack1i
10、p add 192.168.4.1 24 R4-LoopBack1q R4ospf 10 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 7 页 - - - - - - - - - R4-ospf-10area 2 R4-ospf-10-area-0.0.0.2network 4.4.4.0 0.0.0.255 R4-ospf-10-area-0.0.0.2network 34.1.1.0 0.0.0.3 R4-ospf-10-area-0.0.0.2network 19
11、2.168.4.0 0.0.0.255 R4-ospf-10-area-0.0.0.2q R4-ospf-10q R4 从 PC端 ping 各个路由器的route id PCping 1.1.1.1 Ping 1.1.1.1: 32 data bytes, Press Ctrl_C to break From 1.1.1.1: bytes=32 seq=1 ttl=255 time=31 ms From 1.1.1.1: bytes=32 seq=2 ttl=255 time=15 ms From 1.1.1.1: bytes=32 seq=3 ttl=255 time=16 ms From
12、 1.1.1.1: bytes=32 seq=4 ttl=255 time=31 ms From 1.1.1.1: bytes=32 seq=5 ttl=255 time=16 ms - 1.1.1.1 ping statistics - 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 15/21/31 ms PCping 3.3.3.3 Ping 3.3.3.3: 32 data bytes, Press Ctrl_C to break From 3.3.3.3:
13、bytes=32 seq=1 ttl=253 time=94 ms From 3.3.3.3: bytes=32 seq=2 ttl=253 time=109 ms From 3.3.3.3: bytes=32 seq=3 ttl=253 time=94 ms From 3.3.3.3: bytes=32 seq=4 ttl=253 time=94 ms From 3.3.3.3: bytes=32 seq=5 ttl=253 time=94 ms - 3.3.3.3 ping statistics - 5 packet(s) transmitted 5 packet(s) received
14、0.00% packet loss round-trip min/avg/max = 94/97/109 ms PCping 4.4.4.4 Ping 4.4.4.4: 32 data bytes, Press Ctrl_C to break From 4.4.4.4: bytes=32 seq=1 ttl=252 time=156 ms 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 4 页,共 7 页 - - - - - - - - - From 4.4.4.4: bytes=3
15、2 seq=2 ttl=252 time=125 ms From 4.4.4.4: bytes=32 seq=3 ttl=252 time=109 ms From 4.4.4.4: bytes=32 seq=4 ttl=252 time=110 ms From 4.4.4.4: bytes=32 seq=5 ttl=252 time=141 ms - 4.4.4.4 ping statistics - 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 109/128/1
16、56 ms PC 查看 R2 的路由表:3.配置 R1与 R2 链路认证,使用明文认证R1:R1int e0/0/0 R1-Ethernet0/0/0ospfaut R1-Ethernet0/0/0ospf authentication-mode sim R1-Ethernet0/0/0ospf authentication-mode simple plain YP R1-Ethernet0/0/0q 查看邻居路由:两个路由器链路密码不同断开认证邻居关系R1disospf peer brief OSPF Process 10 with Router ID 12.1.1.1 Peer Stati
17、stic Information - 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 5 页,共 7 页 - - - - - - - - - Area Id Interface Neighbor id State 0.0.0.1 Ethernet0/0/0 12.1.1.2 Full - R2:R2int e0/0/0 R2-Ethernet0/0/0ospf au R2-Ethernet0/0/0ospf authentication-mode simple plain YP R2
18、-Ethernet0/0/0q 查看邻居路由:两个路由器链路密码相同重新连接认证邻居关系R2disospf peer brief OSPF Process 10 with Router ID 12.1.1.2 Peer Statistic Information - Area Id Interface Neighbor id State 0.0.0.0 Ethernet0/0/1 34.1.1.1 Full 0.0.0.1 Ethernet0/0/0 12.1.1.1 Full - 4.配置 R3与 R4的区域认证,使用密文认证。R3:R3ospf 10 R3-ospf-10area 2 R3
19、-ospf-10-area-0.0.0.2au R3-ospf-10-area-0.0.0.2authentication-mode md5 1 cipher YP R3-ospf-10-area-0.0.0.2q 查看邻居路由:两个路由器链路密码不同断开认证邻居关系R3-ospf-10disospf peer brief OSPF Process 10 with Router ID 34.1.1.1 Peer Statistic Information - Area Id Interface Neighbor id State 0.0.0.0 Ethernet0/0/1 12.1.1.2 F
20、ull - R4: R4ospf 10 R4-ospf-10area 2 R4-ospf-10-area-0.0.0.2au R4-ospf-10-area-0.0.0.2authentication-mode md5 1 cipher YP R4-ospf-10-area-0.0.0.2q 查看邻居路由:两个路由器链路密码相同重新连接认证邻居关系R4-ospf-10disospf peer brief OSPF Process 10 with Router ID 34.1.1.2 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 6 页,共 7 页 - - - - - - - - - Peer Statistic Information - Area Id Interface Neighbor id State 0.0.0.2 Ethernet0/0/0 34.1.1.1 Full - 其实只要是两个不同的区域都能作区域认证和链路认证。名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 7 页,共 7 页 - - - - - - - - -