网络流量重定向

Published on with 0 views and 0 comments

现如今好多企业都是双 WAN 或者多 WAN,没有负载均衡的情况下,可以使用技术层面解决此问题。
实现方法:可以把流量分为奇偶进行抓取,通过策略路由进行分流。
例如:

acl number 3001*  
rule 0 permit ip source 192.168.1.0 0.0.0.254               //**内部**pc**机偶数地址*  
acl number 3002*  
rule 0 permit ip source 192.168.1.1 0.0.0.254            //**内部**pc**机奇数地址*

而今天我在这用的是有线和无线流量开,实现负载。
1.需要定义的流量:

acl number 3003
 description TO_WLAN_liuliang
 rule 5 permit ip source 10.200.0.0 0.0.15.255

2.抓取无线内网互访流量:

acl number 3002
 description TO_WLAN-neiwang_hufang
 rule 5 permit ip source 10.200.0.0 0.0.15.255 destination 172.16.0.0 0.0.255.255
 rule 10 permit ip source 10.200.0.0 0.0.15.255 destination 192.168.50.0 0.0.1.255
 rule 15 permit ip source 10.200.0.0 0.0.15.255 destination 10.200.32.0 0.0.15.255
 rule 20 permit ip source 10.200.0.0 0.0.15.255 destination 10.200.31.0 0.0.0.255
 rule 25 permit ip source 10.200.0.0 0.0.15.255 destination 10.200.200.0 0.0.0.3
 rule 30 permit ip source 10.200.0.0 0.0.15.255 destination 10.200.250.0 0.0.0.255
 rule 35 permit ip source 10.200.0.0 0.0.15.255 destination 192.168.80.0 0.0.0.255
  1. 创建流分类:
#
traffic classifier hufang operator or precedence 4  //注意优先级设定
 if-match acl 3002
traffic classifier wlan operator or precedence 5
 if-match acl 3003
#

4.创建流行为:

traffic behavior hufang
 permit
traffic behavior wlan
 permit
 redirect ip-nexthop 192.168.101.1
  1. 创建流策略:
traffic policy wlan match-order config
 classifier hufang behavior hufang
 classifier wlan behavior wlan

6.调用策略:

interface GigabitEthernet1/0/31
 traffic-policy wlan inbound

7.设备的默认路由设置

ip route-static 0.0.0.0 0.0.0.0 192.168.101.1 preference 65 description TO_WLAN
ip route-static 0.0.0.0 0.0.0.0 10.200.200.1

标题:网络流量重定向
作者:cuijianzhe
地址:https://solo.cjzshilong.cn/articles/2019/08/17/1566025415398.html