标签:sha images b2b alt ddr col out ip route -o
第一步:分别先配置客户端和路由器的ipR2路由器的配置
<Huawei>system-view
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.2 255.255.255.0
[Huawei-GigabitEthernet0/0/1]undo shutdown
[Huawei-GigabitEthernet0/0/2]ip address 192.168.3.2 255.255.255.0
[Huawei-GigabitEthernet0/0/2]undo shutdown
[Huawei-GigabitEthernet0/0/2]quit
R3路由器的配置
<Huawei>system-view
[Huawei-GigabitEthernet0/0/0]ip address 192.168.4.254 255.255.255.0
[Huawei-GigabitEthernet0/0/0]undo shutdown
[Huawei-GigabitEthernet0/0/2]ip address 192.168.3.1 255.255.255.0
[Huawei-GigabitEthernet0/0/2]undo shutdown
[Huawei-GigabitEthernet0/0/2]quit
第二步:添加静态路由条目
R1 添加静态路由条目
[Huawei]ip route-static 192.168.3.0 255.255.255.0 192.168.2.2
[Huawei]ip route-static 192.168.4.0 255.255.255.0 192.168.2.2
R2 添加静态路由条目
[Huawei]ip route-static 192.168.1.0 255.255.255.0 192.168.2.1
[Huawei]ip route-static 192.168.4.0 255.255.255.0 192.168.3.1
R3 添加静态路由条目
[Huawei]ip route-static 192.168.1.0 255.255.255.0 192.168.3.2
[Huawei]ip route-static 192.168.2.0 255.255.255.0 192.168.3.2
备注:
对R1,R3 也可以添加默认路由(缺省路由)条目
对R1 :[Huawei]ip route-static 0.0.0.0 0.0.0.0 192.168.2.2
对R3 :[Huawei]ip route-static 0.0.0.0 0.0.0.0 192.168.3.2
标签:sha images b2b alt ddr col out ip route -o
原文地址:https://blog.51cto.com/14190698/2360694