通过配置静态路由让PC1和PC2互通
AR1
bash
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 1.1.1.1 24
[Huawei]ip route-static 192.168.2.0 24 1.1.1.2
AR2
bash
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 1.1.1.2 24
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 192.168.2.254 24
[Huawei]ip route-static 192.168.1.0 24 1.1.1.1
PC1
bash
192.168.1.1
255.255.255.0
192.168.1.254
PC2
bash
192.168.2.1
255.255.255.0
192.168.2.254