1 实验拓扑
2 配置路由器
#R1
Huawei>sys
[Huawei]sysname R1
[R1]interface GigabitEthernet 0/0/0
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 255.255.255.0
[R1-GigabitEthernet0/0/0]qu
[R1]rip
[R1-rip-1]network 192.168.1.0
[R1-rip-1]version 2
[R1-rip-1]quit
#R2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]int GigabitEthernet 0/0/0
[R2-GigabitEthernet0/0/0]ip address 192.168.1.2 255.255.255.0
[R2-GigabitEthernet0/0/0]qu
[R2]int GigabitEthernet 0/0/1
[R2-GigabitEthernet0/0/1]ip add 10.1.1.1 255.255.255.0
[R2-GigabitEthernet0/0/1]qu
[R2]rip
[R2-rip-1]network 192.168.1.0
[R2-rip-1]network 10.0.0.0
[R2-rip-1]version 2
[R2-rip-1]quit
#R3
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3
[R3]int GigabitEthernet 0/0/0
[R3-GigabitEthernet0/0/0]ip address 10.1.1.2 255.255.255.0
[R3-GigabitEthernet0/0/0]qu
[R3]rip
[R3-rip-1]network 10.0.0.0
[R3-rip-1]version 2
[R3-rip-1]qu
3 查看rip 路由器
R1>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 8 Routes : 8
Destination/Mask Proto Pre Cost Flags NextHop Interface
10.1.1.0/24 RIP 100 1 D 192.168.1.2 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
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
192.168.1.0/24 Direct 0 0 D 192.168.1.1 GigabitEthernet
0/0/0
192.168.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
192.168.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
#
<R1>dis rip 1 route
Route Flags : R - RIP
A - Aging, G - Garbage-collect
----------------------------------------------------------------------------
Peer 192.168.1.2 on GigabitEthernet0/0/0
Destination/Mask Nexthop Cost Tag Flags Sec
10.1.1.0/24 192.168.1.2 1 0 RA 6
<R1>