[AR1]display ip interface brief
GigabitEthernet0/0/0 14.1.1.1/24 up up
GigabitEthernet0/0/1 10.0.12.1/24 up up
GigabitEthernet0/0/2 10.0.13.1/24 up up
[AR2]display ip interface brief
GigabitEthernet0/0/0 10.0.12.2/24 up up
GigabitEthernet0/0/1 192.168.2.254/24 up up
[AR3]display ip interface brief
GigabitEthernet0/0/0 10.0.13.3/24 up up
GigabitEthernet0/0/1 192.168.3.254/24 up up
[AR4]display ip interface brief
GigabitEthernet0/0/0 14.1.1.4/24 up up
GigabitEthernet0/0/1 192.168.4.254/24 up up
搭建B区域rip网络
[AR1]rip 1
[AR1-rip-1]undo summary
[AR1-rip-1]version 2
[AR1-rip-1]network 10.0.0.0
[AR2]rip 1
[AR2-rip-1]undo summary
[AR2-rip-1]version 2
[AR2-rip-1]network 10.0.0.0
[AR2-rip-1]network 192.168.2.0
[AR3]rip 1
[AR3-rip-1]undo summary
[AR3-rip-1]version 2
[AR3-rip-1]network 10.0.0.0
[AR3-rip-1]network 192.168.3.0
查看AR1的路由表
[AR1]display ip routing-table
192.168.2.0/24 RIP 100 1 D 10.0.12.2 GigabitEthernet
0/0/1
192.168.3.0/24 RIP 100 1 D 10.0.13.3 GigabitEthernet
0/0/2
此时B区的AR1已经成功接到192.168.2.0/24和192.168.3.0/24的路由条目
Optimize the RIP network in Zone B, and capture data packets on the GE0/0/1 interface of AR2, as shown in the figure:
It can be observed that at this time, the RIP routing information will be advertised on the interface on the side of the AR2 connected to the PC2 terminal, and these
RIP packets are useless to the terminal PC1. The reason is that network command advertises the network where PC1
posterior segment, GE0 / 0/1 Interface RIP will send and receive packets to AR2 regardless of whether the device use. In order to
make these useless PC1 not to receive RIP update packets, RIP may not be used in the process of network command AR2
makes the advertisement segment, while the use of the direct route to an alternative embodiment, the PC1 as an external network of routes
published to The company's RIP network.
Use the import-route command to configure route redistribution on AR2, and specify the imported source routing protocol as a direct
route. When configuring route import on a device, you need to ensure that the imported route entries already exist
in the routing table of the current device.
[AR2]rip 1
[AR2-rip-1]undo network 192.168.2.0
[AR2-rip-1]import-route direct
Again GE0 / 0/0 interface to capture AR2 found not send any RIP update packet has been completed at this time
to optimize, PC1 terminal is not received for unrelated RIP update packets.
After capturing packets on the GE0/0/1 interface of AR2, it is found that RIP update packets are still sent normally on this interface, and the imported
192.168.2.0/24 network segment is announced. PC2 also has the same problem. When receiving
RIP packets that are useless to users , it also adopts the method of introducing a direct route to solve it.
[AR3]rip 1
[AR3-rip-1]undo network 192.168.3.0
[AR3-rip-1]import-route direct
[AR1]display ip routing-table
192.168.2.0/24 RIP 100 1 D 10.0.12.2 GigabitEthernet
0/0/1
192.168.3.0/24 RIP 100 1 D 10.0.13.3 GigabitEthernet
0/0/2
Connect the network of area A and area
B. Configure a static route with the purpose of 192.168.4.0/24 network segment on the gateway device AR1 of area B, and
introduce the static route in the RIP process. After the introduction, all routers in the RIP network of area B will
The route is automatically learned through the RIP protocol .
[AR1]ip route-static 192.168.4.0 24 14.1.1.4
[AR1]rip 1
[AR1-rip-1]import-route static
[AR2]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 9 Routes : 9
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.0.12.0/24 Direct 0 0 D 10.0.12.2 GigabitEthernet
0/0/0
10.0.12.2/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.13.0/24 RIP 100 1 D 10.0.12.1 GigabitEthernet
0/0/0
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.2.0/24 Direct 0 0 D 192.168.2.254 GigabitEthernet
0/0/1
192.168.2.254/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
192.168.3.0/24 RIP 100 2 D 10.0.12.1 GigabitEthernet
0/0/0
192.168.4.0/24 RIP 100 1 D 10.0.12.1 GigabitEthernet
0/0/0
在AR4上配置一条默认路由,下一跳为AR1
[AR4]ip route-static 0.0.0.0 0.0.0.0 14.1.1.1
[AR4]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD 14.1.1.1 GigabitEthernet
0/0/0
14.1.1.0/24 Direct 0 0 D 14.1.1.4 GigabitEthernet
0/0/0
14.1.1.4/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
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.4.0/24 Direct 0 0 D 192.168.4.254 GigabitEthernet
0/0/1
192.168.4.254/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
Test the connectivity of PC1 and PC3