拓扑图如下所示,包括4台华为路由器和两台PC客户端,一部分使用RIPV2协议,一部分是用OSPF实验,目的都是为了进行路由重发布。
要求是: 1. 在各个路由器上配置网络ip AR0 [Huawei-Serial0/0/0]int e0/0/0 [Huawei-Ethernet0/0/0]ip address 192.168.1.1 255.255.255.0 [Huawei-Serial0/0/0]int e0/0/0 [Huawei-Ethernet0/0/0]ip address 192.168.1.1 255.255.255.0 AR1 <Huawei>system Enter system view, return user view with Ctrl+Z. [Huawei]int s0/0/0 [Huawei-Serial0/0/0]ip address 192.168.2.2 255.255.255.0 <Huawei>system Enter system view, return user view with Ctrl+Z. [Huawei]int s0/0/0 [Huawei-Serial0/0/0]ip address 192.168.2.2 255.255.255.0 AR2 [Huawei]int s0/0/1 [Huawei-Serial0/0/1]ip address 192.168.3.2 255.255.255.0 [Huawei-Serial0/0/1]int s0/0/2 [Huawei-Serial0/0/2]ip address 192.168.4.1 255.255.255.0 AR3 [Huawei]int s0/0/2 [Huawei-Serial0/0/2]ip address 192.168.4.2 255.255.255.0 [Huawei-Serial0/0/2]int e0/0/0 [Huawei-Ethernet0/0/0]ip address 192.168.5.1 255.255.255.0 2.在客户机CLIENT配置IP CLIENT0 IP : 192.168.1.2 掩码:255.255.255.0 网关:192.168.1.1 CLIENT1 IP :192.168.5.2 掩码:255.255.255.0 网关:192.168.5.1 3.在左区域路由器上配置ospf AR0 [Huawei]int e0/0/0 [Huawei-Ethernet0/0/0]ospf enable area 0 [Huawei-Ethernet0/0/0]quit [Huawei]int s0/0/0 [Huawei-Serial0/0/0]ospf enable area 0 [Huawei-Serial0/0/0]quit AR1 www.luyouqiwang.com/14922/ [Huawei]ospf [Huawei-ospf-1]area 0 [Huawei-ospf-1-area-0.0.0.0]network 192.168.2.0 0.0.0.255 [Huawei-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255 AR2 [Huawei]ospf [Huawei-ospf-1]area 0 [Huawei-ospf-1-area-0.0.0.0]network 192.168.3.0 0.0.0.255 4.在右侧区域路由器配置ripv2 AR2 [Huawei] [Huawei]int s0/0/2 [Huawei-Serial0/0/2]rip version 2 [Huawei]rip [Huawei-rip-1]network 192.168.4.0 AR3 [Huawei] [Huawei]int s0/0/2 [Huawei-Serial0/0/2]rip version 2 [Huawei-Serial0/0/2]int e0/0/0 [Huawei-Ethernet0/0/0]rip version 2 [Huawei-Ethernet0/0/0]quit [Huawei]rip [Huawei-rip-1]network 192.168.4.0 [Huawei-rip-1]network 192.168.5.0 5.在AR1上查看路由 [Huawei]dis ip rout Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 9 Routes : 9 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 OSPF 10 1563 D 192.168.2.1 Serial0/0/0 192.168.2.0/24 Direct 0 0 D 192.168.2.2 Serial0/0/0 192.168.2.1/32 Direct 0 0 D 192.168.2.1 Serial0/0/0 192.168.2.2/32 Direct 0 0 D 127.0.0.1 Serial0/0/0 192.168.3.0/24 Direct 0 0 D 192.168.3.1 Serial0/0/1 192.168.3.1/32 Direct 0 0 D 127.0.0.1 Serial0/0/1 192.168.3.2/32 Direct 0 0 D 192.168.3.2 Serial0/0/1 可以看到学习到了1.0网段,但并没有学习到5.0与4.0的网段,我们可以在1.0 网段的主机ping 一下5.0网段的主机,看下结果 PC>ping 192.168.5.2 Ping 192.168.5.2: 32 data bytes, Press Ctrl_C to break Request timeout! Request timeout! Request timeout! Request timeout! Request timeout! 6.要想在不同协议下相互学习到路由,需要进行路由重发布 现在我们要在路由器AR2上配置路由重发布 [Huawei]ospf [Huawei-ospf-1]import-route rip [Huawei]rip [Huawei-rip-2]import-route ospf 现在可以在AR2上查看一下路由信息 [Huawei]dis ip rout Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 11 Routes : 11 Destination/Mask Proto Pre Cost Flags NextHop Interface 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 192.168.1.0/24 OSPF 10 1563 D 192.168.2.1 Serial0/0/0 192.168.2.0/24 Direct 0 0 D 192.168.2.2 Serial0/0/0 192.168.2.1/32 Direct 0 0 D 192.168.2.1 Serial0/0/0 192.168.2.2/32 Direct 0 0 D 127.0.0.1 Serial0/0/0 192.168.3.0/24 Direct 0 0 D 192.168.3.1 Serial0/0/1 192.168.3.1/32 Direct 0 0 D 127.0.0.1 Serial0/0/1 192.168.3.2/32 Direct 0 0 D 192.168.3.2 Serial0/0/1 192.168.4.0/24 O_ASE 150 1 D 192.168.3.2 Serial0/0/1 192.168.5.0/24 O_ASE 150 1 D 192.168.3.2 Serial0/0/1 可以看到已经都学习到4.0与5.0网段,现在可以使用1.0网段的主机ping 5.0网段的主机,测试连通性。 PC>ping 192.168.5.2 Ping 192.168.5.2: 32 data bytes, Press Ctrl_C to break From 192.168.5.2: bytes=32 seq=1 ttl=124 time=78 ms From 192.168.5.2: bytes=32 seq=2 ttl=124 time=47 ms From 192.168.5.2: bytes=32 seq=3 ttl=124 time=78 ms From 192.168.5.2: bytes=32 seq=4 ttl=124 time=79 ms From 192.168.5.2: bytes=32 seq=5 ttl=124 time=62 ms |
不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流
GMT+8, 2025-11-7 13:31 , Processed in 0.031859 second(s), 15 queries .
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.