华为AR2204多VLAN走不同wan口

机房网设接多wan,现要求不同vlan走不同wan,设备配置如下

 1 多vlan走不同wan口
 2 操作步骤
 3 #
 4  sysname Router
 5 #
 6 ip local policy-based-route pbr1    //在Router上应用策略
 7 #
 8 acl number 3002    //定义访问控制列表ACL3005,用于匹配源IP地址为192.168.2.0的报文
 9  rule 2 permit ip source 192.168.2.0 0.0.0.255
10 #
11 acl number 3004    //定义访问控制列表ACL3005,用于匹配源IP地址为192.168.4.0的报文
12  rule 4 permit ip source 192.168.4.0 0.0.0.255
13 #
14 acl number 3005    //定义访问控制列表ACL3005,用于匹配源IP地址为192.168.5.0的报文
15  rule 5 permit ip source 192.168.5.0 0.0.0.255
16 #
17  //配置接口的IP地址 --------------略
18  
19 #
20 ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet2/0/2  //配置静态路由
21 ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet2/0/1
22 ip route-static 0.0.0.0 0.0.0.0 GigabitEthernet2/0/0     
23 
24 #
25 policy-based-route pbr1 permit node 2    // 创建本地策略路由pbr1的2号节点,将匹配ACL3005的报文下一跳重定向到192.168.7.25
26  if-match acl 3002
27  apply ip-address next-hop 192.168.7.25
28 policy-based-route pbr1 permit node 4    //创建本地策略路由pbr1的4号节点,将匹配ACL3004的报文下一跳重定向到192.168.8.25
29  if-match acl 3004
30  apply ip-address next-hop 192.168.8.25
31 policy-based-route pbr1 permit node 5   //创建本地策略路由pbr1的5号节点,将匹配ACL3006的报文下一跳重定向到192.168.9.25
32  if-match acl 3005
33  apply ip-address next-hop 192.168.9.25
34 #
35 ip policy-based-route    pbr1      应用到内网接口 
36 return
原文地址:https://www.cnblogs.com/changbo/p/15169221.html