PC1能够ping通PC2
#R1
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys R1
[R1]int gi0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.1.1.1 24
[R1-GigabitEthernet0/0/0]int gi0/0/1
[R1-GigabitEthernet0/0/1]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/1]q
#缺省路由
[R1]ip route-static 0.0.0.0 0 12.1.1.2
#R2
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys R2
[R2]int gi0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/0]int gi0/0/1
[R2-GigabitEthernet0/0/1]ip add 23.1.1.2 24
[R2-GigabitEthernet0/0/1]q
[R2]ip route-static 192.168.1.0 24 12.1.1.1
[R2]ip route-static 192.168.2.0 24 23.1.1.3
#R3
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]un in en
Info: Information center is disabled.
[Huawei]sys R3
[R3]int gi0/0/0
[R3-GigabitEthernet0/0/0]ip add 23.1.1.3 24
[R3-GigabitEthernet0/0/0]int gi0/0/1
[R3-GigabitEthernet0/0/1]ip ad 192.168.2.1 24
[R3-GigabitEthernet0/0/1]q
[R3]ip route-static 192.168.1.0 24 23.1.1.2