一、配置RIPv1
拓扑图如下:
AR1的接口配置如下:
[Huawei]interface Serial 2/0/0
[Huawei-Serial2/0/0]ip address 192.168.1.1 24
[Huawei-Serial2/0/0]quit
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.0.1 24
AR2的接口配置如下:
[Huawei]interface Serial 2/0/0
[Huawei-Serial2/0/0]ip address 192.168.1.2 24
[Huawei-Serial2/0/0]quit
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.2.1 24
AR1的RIP配置如下:
[Huawei]rip
[Huawei-rip-1]network 192.168.0.0
[Huawei-rip-1]network 192.168.1.0
AR2的RIP配置如下:
[Huawei]rip
[Huawei-rip-1]network 192.168.1.0
[Huawei-rip-1]network 192.168.2.0
PC1配置如下:
PC2配置如下:
PC1 ping PC2 结果如下:
二、配置RIPv2
AR1的接口配置如下:
[Huawei]interface Serial 2/0/0
[Huawei-Serial2/0/0]ip address 192.168.1.1 24
[Huawei-Serial2/0/0]quit
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.0.1 24
[Huawei-GigabitEthernet0/0/0]quit
AR2的接口配置如下:
[Huawei]interface Serial 2/0/0
[Huawei-Serial2/0/0]ip address 192.168.1.2 24
[Huawei-Serial2/0/0]quit
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.0.0.1 24
[Huawei-GigabitEthernet0/0/0]quit
AR1的RIP配置如下:
[Huawei]rip
[Huawei-rip-1]version 2
[Huawei-rip-1]undo summary
[Huawei-rip-1]network 192.168.0.0
[Huawei-rip-1]network 192.168.1.0
AR2的RIP配置如下:
[Huawei]rip
[Huawei-rip-1]version 2
[Huawei-rip-1]undo summary
[Huawei-rip-1]network 192.168.1.0
[Huawei-rip-1]network 10.0.0.0
PC1配置如下:
PC2配置如下:
PC1 ping PC2 结果如下: