场景描述: 一台华为AR系列路由器(图中R1),一台H3C MSR系列路由器,
一台H3C S5500 核心交换机.
AR路由器接入WAN1和WAN2两条线路,H3C路由器接入WAN3线路无线网络专用.
内网使用172.16.x.x/24 ; wifi 使用172.16.100.0/23
大致拓扑如下:
要求:
1. Wifi流量到核心后,经过策略路由调度到Router2出口,且Wifi 能够和内部有线网络实现互通.
2. Wifi下载单IP限速3Mbps
3. Wifi专用线路出口拥塞后,在核心调度流量到Router2的WAN2出口
具体实现:
1. 核心策略路由:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#acl部分
acl number 3000
rule 0 permit ip
source
172.16.100.0 0.0.1.255 destination 172.16.0.0 0.0.255.255
acl number 3001
rule 0 permit ip
source
172.16.100.0 0.0.1.255
#Traffic分流
traffic classifier wifi01 operator and
if
-match acl 3000
traffic classifier wifi02 operator and
if
-match acl 3001
traffic behavior wifi01
filter permit
traffic behavior wifi02
redirect next-hop 172.16.253.2 fail-action forward
#定义Qos策略
qos policy wifi
classifier wifi01 behavior wifi01
classifier wifi02 behavior wifi02
#应用Qos策略
qos vlan-policy wifi vlan 100 inbound
|
2. Wifi限速
登录Router2:
1
2
3
4
|
qos carl 1 destination-ip-address subnet 172.16.100.0 23 per-address
#WAN3接入口
interface GigabitEthernet0
/0
qos car inbound carl 1 cir 3000 cbs 25000 ebs 0 green pass red
|
3. 主路由流量调度
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#核心修改策略路由
acl number 3000
rule 0 permit ip
source
172.16.100.0 0.0.1.255 destination 172.16.0.0 0.0.255.255
#acl中将Wifi网段适当调小,通过掩码控制
acl number 3002
description wifi-temp01
rule 0 permit ip
source
172.16.100.0 0.0.0.255
traffic classifier wifi01 operator and
if
-match acl 3000
traffic classifier wifi-temp operator and
if
-match acl 3002
traffic behavior wifi01
filter permit
traffic behavior wifi-temp
redirect next-hop 172.16.253.2 fail-action forward
#新的Qos策略
qos policy wifi-temp
classifier wifi01 behavior wifi01
classifier wifi-temp behavior wifi-temp
#应用新的Qos策略
qos vlan-policy wifi-temp vlan 100 inbound
#修改完核心策略路由,就可以将ACL中指定的wifi流量指定到Router1了, 但是Router1缺省出口路由为WAN1,而我们需要将流量导向到出口WAN2
#acl定义
acl number 2055
rule 0 permit
source
172.16.100.0 0.0.1.255
#定义流类和行为
traffic classifier 1 operator or
if
-match acl 2055
traffic behavior 1
redirect ip-nexthop x.x.x.x(WAN2出口下一跳地址)
#定义流策略
traffic policy 1
classifier 1 behavior 1
#应用流策略
#进入路由器内网口
interface GigabitEthernet 0
/0/2
traffic-policy 1 inbound
|
这样就可以根据各个出口拥塞情况随意的进行流量调度了.
本文转自marbury 51CTO博客,原文链接:http://blog.51cto.com/magic3/1585182,如需转载请自行联系原作者