Huawei设备(静态路由)

静态路由配置


Huawei设备(静态路由)_第1张图片
路由拓扑

R1配置

[R1]interface Ethernet 0/0/0

[R1-Ethernet0/0/0]  ip address 192.168.0.254 255.255.255.0

[R1-Ethernet0/0/0]  q

[R1]  interface Ethernet 0/0/1

[R1-Ethernet0/0/1]  ip address 192.168.1.1 255.255.255.0

[R1-Ethernet0/0/1]  q

[R1] ip route-static 192.168.2.0 255.255.255.0 192.168.1.2


R2配置

[R2] interface Ethernet 0/0/0

[R2-Ethernet0/0/0]  ip address 192.168.2.200 255.255.255.0

[R2-Ethernet0/0/0]  q

[R2]  interface Ethernet 0/0/1

[R2-Ethernet0/0/1]  ip address 192.168.0.2 255.255.255.0

[R2-Ethernet0/0/1]  q

[R2] ip route-static 192.168.0.0  255.255.255.0 192.168.1.1


测试


Huawei设备(静态路由)_第2张图片
R1


Huawei设备(静态路由)_第3张图片
R2


Huawei设备(静态路由)_第4张图片
Pc(192.168.0.1)--->公网(192.168.2.116)

你可能感兴趣的:(Huawei设备(静态路由))