环境:

华为S5600交换机; 网关10.0.0.1; 网关10.0.1.1; vlan 5(10.0.5.254); vlan 6(10.0.6.254);

目的:

vlan 5通过10.0.0.1上网 vlan 6通过10.0.1.1上网

配置方法:

vlan配置略 添加两条默认路由: ip route-static 0.0.0.0 0.0.0.0 10.0.0.1

ip route-static 0.0.0.0 0.0.0.0 10.0.1.1

配置路由策略 route-policy policy permit node 1

if-match interface Vlan-interface 5

apply ip next-hop 10.0.0.1

route-policy policy permit node 2

if-match interface Vlan-interface 6

apply ip next-hop 10.0.1.1

以上配置是我根据文档总结的,并亲自验证。