摘要:wan1:218.85.224.100 wan2:219.85.224.200 内网 : 192.168.201.x 和192.168.202.x走wan1 192.168.203.x走wan2 其他网段随机wan1和w……

wan1:218.85.224.100

route-map 配置双 WAN 策略路由(思科/华为)
图片素材来自免费商用图库(pixabay,摄影师 geralt),非本站项目实拍。

wan2:219.85.224.200

内网 : 192.168.201.x 和192.168.202.x走wan1

192.168.203.x走wan2

其他网段随机wan1和wan2

一、 思科路由器:

interface GigabitEthernet0/1

ip address 219.85.224.200 255.255.255.252

ip nat outside

ip policy route-map ipsdx1

interface GigabitEthernet0/2

ip address 218.85.224.100 255.255.255.252

ip nat outside

ip policy route-map ipsdx2

ip nat pool ipsdx1 219.85.224.200 219.85.224.200 netmask 255.255.255.252

ip nat pool ipsdx2 218.85.224.100 218.85.224.100 netmask 255.255.255.252

ip nat inside source list 101 interface GigabitEthernet0/1 overload

ip nat inside source list 102 interface GigabitEthernet0/2 overload

ip nat inside source list 103 interface GigabitEthernet0/2 overload

access-list 102 permit ip 192.168.201.0 0.0.0.255 any

access-list 103 permit ip 192.168.202.0 0.0.0.255 any

route-map aaa permit 5

match ip address 102 103

三、配置要点

  • match → 源/目的/协议定条件。
  • set → 指定下一跳出口。
  • 方向 → 应用到正确入/出接口。

route-map 做双 WAN 策略路由最灵活:match 圈定流量、set 指下一跳,可按业务把流量导到合适出口。关键是策略应用到正确的接口方向。