发新话题
打印

VLAN限速方案

本主题由 windecember 于 2008-12-10 15:53 移动

VLAN限速方案

VLAN限速方案

1 前言
对于在目前的Ethernet接入网中广泛使用的VLAN per Customer的方案,Flex4+L3Module实现了接入VLAN的限速和控制功能,在本方案中要求Flex24作为二层的终结点,下面的各个VLAN中的接入终端将Flex24作为缺省网关,Flex24在三层模块上对于下面VLAN的上行流量进行控制。由于Flex24已经处于一个三层的位置,对于下边各个VLAN的下行流量的限速采用目的IP控制的方案。这种方案的要求是各个接入VLAN的IP地址的掩码一样。

2 网络连接方案

2.1 需求:
Flex24作为流量控制核心
上行端口VLAN的IP地址为10.1.0.254/8
接入VLAN有13个
分别用Tagged的方式从9端口进行接入
VLAN IP地址的掩码为8
VLAN IP的配置为11.1.0.254/8到23.1.0.254/8
2.2 图示连接

2.3 配置说明
2.3.1 配置相应的VLAN
!配置上行VLAN T1,端口24
create vlan t1
config vlan t1 ipaddress 10.1.0.254 255.0.0.0
config vlan t1 add port 24 untagged
!配置接入VLAN v11到v23,以及相应的IP地址
create vlan v11
config vlan v11 tag 11
config vlan v11 ipaddress 11.1.0.254 255.0.0.0
config vlan v11 add port 9 tagged
create vlan v12
config vlan v12 tag 12
config vlan v12 ipaddress 12.1.0.254 255.0.0.0
config vlan v12 add port 9 tagged
create vlan v13
config vlan v13 tag 13
config vlan v13 ipaddress 13.1.0.254 255.0.0.0
config vlan v13 add port 9 tagged
create vlan v14
config vlan v14 tag 14
config vlan v14 ipaddress 14.1.0.254 255.0.0.0
config vlan v14 add port 9 tagged
create vlan v15
config vlan v15 tag 15
config vlan v15 ipaddress 15.1.0.254 255.0.0.0
config vlan v15 add port 9 tagged
create vlan v16
config vlan v16 tag 16
config vlan v16 ipaddress 16.1.0.254 255.0.0.0
config vlan v16 add port 9 tagged
create vlan v17
config vlan v17 tag 17
config vlan v17 ipaddress 17.1.0.254 255.0.0.0
config vlan v17 add port 9 tagged
create vlan v18
config vlan v18 tag 18
config vlan v18 ipaddress 18.1.0.254 255.0.0.0
config vlan v18 add port 9 tagged
create vlan v19
config vlan v19 tag 19
config vlan v19 ipaddress 19.1.0.254 255.0.0.0
config vlan v19 add port 9 tagged
create vlan v20
config vlan v20 tag 20
config vlan v20 ipaddress 20.1.0.254 255.0.0.0
config vlan v20 add port 9 tagged
create vlan v21
config vlan v21 tag 21
config vlan v21 ipaddress 21.1.0.254 255.0.0.0
config vlan v21 add port 9 tagged
create vlan v22
config vlan v22 tag 22
config vlan v22 ipaddress 22.1.0.254 255.0.0.0
config vlan v22 add port 9 tagged
create vlan v23
config vlan v23 tag 23
config vlan v23 ipaddress 23.1.0.254 255.0.0.0
config vlan v23 add port 9 tagged


2.3.2 配置静态路由,将Flex变为上联的缺省网关
!Static Routes-------------------------------------------------
ip route 0.0.0.0/0 10.1.31.14

2.3.3 配置上行流量的特征绑定,将上行流量和VLAN进行绑定
config flowtype 0 bind vlan

2.3.4 配置从24口的下行流量和IP进行绑定,并制定绑定的掩码,这里的掩码和配置接口的掩码的意义不同,在这里指的是下行的流量可以通过 IP and MASK的方式进行区分。
config flowtype 1 bind dip
config flowtype 1 dipmask 8

2.3.5 配置VLAN绑定的客户接入文件,每一个流量限制为10*64Kbps,用来控制上行的流量
create customer-profile v23
config customer-profile v23 vid 23
config customer-profile v23 input-bandwidth 10
create customer-profile v22
config customer-profile v22 vid 22
config customer-profile v22 input-bandwidth 10
create customer-profile v21
config customer-profile v21 vid 21
config customer-profile v21 input-bandwidth 10
create customer-profile v20
config customer-profile v20 vid 20
config customer-profile v20 input-bandwidth 10
create customer-profile v19
config customer-profile v19 vid 19
config customer-profile v19 input-bandwidth 10
create customer-profile v18
config customer-profile v18 vid 18
config customer-profile v18 input-bandwidth 10
create customer-profile v17
config customer-profile v17 vid 17
config customer-profile v17 input-bandwidth 10
create customer-profile v16
config customer-profile v16 vid 16
config customer-profile v16 input-bandwidth 10
create customer-profile v15
config customer-profile v15 vid 15
config customer-profile v15 input-bandwidth 10
create customer-profile v14
config customer-profile v14 vid 14
config customer-profile v14 input-bandwidth 10
create customer-profile v13
config customer-profile v13 vid 13
config customer-profile v13 input-bandwidth 10
create customer-profile v12
config customer-profile v12 vid 12
config customer-profile v12 input-bandwidth 10
create customer-profile v11
config customer-profile v11 vid 11
config customer-profile v11 input-bandwidth 10

2.3.6 配置下行流量的用户配置文件,将IP+MASK和用户的下行流量进行绑定
create customer-profile t23
config customer-profile t23 dip 23.0.0.0/8
config customer-profile t23 input-bandwidth 10
create customer-profile t22
config customer-profile t22 dip 22.0.0.0/8
config customer-profile t22 input-bandwidth 10
create customer-profile t21
config customer-profile t21 dip 21.0.0.0/8
config customer-profile t21 input-bandwidth 10
create customer-profile t20
config customer-profile t20 dip 20.0.0.0/8
config customer-profile t20 input-bandwidth 10
create customer-profile t19
config customer-profile t19 dip 19.0.0.0/8
config customer-profile t19 input-bandwidth 10
create customer-profile t18
config customer-profile t18 dip 18.0.0.0/8
config customer-profile t18 input-bandwidth 10
create customer-profile t17
config customer-profile t17 dip 17.0.0.0/8
config customer-profile t17 input-bandwidth 10
create customer-profile t16
config customer-profile t16 dip 16.0.0.0/8
config customer-profile t16 input-bandwidth 10
create customer-profile t15
config customer-profile t15 dip 15.0.0.0/8
config customer-profile t15 input-bandwidth 10
create customer-profile t14
config customer-profile t14 dip 14.0.0.0/8
config customer-profile t14 input-bandwidth 10
create customer-profile t13
config customer-profile t13 dip 13.0.0.0/8
config customer-profile t13 input-bandwidth 10
create customer-profile t12
config customer-profile t12 dip 12.0.0.0/8
config customer-profile t12 input-bandwidth 10
create customer-profile t11
config customer-profile t11 dip 11.0.0.0/8
config customer-profile t11 input-bandwidth 10

2.3.7 将VLAN上行的用户接入配置文件和端口9进行绑定,并且将这种流量绑定到流类型0上(前面的配置已经指明流类型0和vid绑定),并且在端口9上进行配置文件激活。
config port 9 bind customer-profile v23 !绑定用户配置文件
config port 9 service customer-profile v23 flow-type 0 !指定和FlowType 0绑定
config port 9 service customer-profile v23 counter enable !使能流计数
config port 9 service customer-profile v23 status active !激活这个配置文件在本端口上
config port 9 bind customer-profile v22
config port 9 service customer-profile v22 flow-type 0
config port 9 service customer-profile v22 counter enable
config port 9 service customer-profile v22 status active
config port 9 bind customer-profile v21
config port 9 service customer-profile v21 flow-type 0
config port 9 service customer-profile v21 counter enable
config port 9 service customer-profile v21 status active
config port 9 bind customer-profile v20
config port 9 service customer-profile v20 flow-type 0
config port 9 service customer-profile v20 counter enable
config port 9 service customer-profile v20 status active
config port 9 bind customer-profile v19
config port 9 service customer-profile v19 flow-type 0
config port 9 service customer-profile v19 counter enable
config port 9 service customer-profile v19 status active
config port 9 bind customer-profile v18
config port 9 service customer-profile v18 flow-type 0
config port 9 service customer-profile v18 counter enable
config port 9 service customer-profile v18 status active
config port 9 bind customer-profile v17
config port 9 service customer-profile v17 flow-type 0
config port 9 service customer-profile v17 counter enable
config port 9 service customer-profile v17 status active
config port 9 bind customer-profile v16
config port 9 service customer-profile v16 flow-type 0
config port 9 service customer-profile v16 counter enable
config port 9 service customer-profile v16 status active
config port 9 bind customer-profile v15
config port 9 service customer-profile v15 flow-type 0
config port 9 service customer-profile v15 counter enable
config port 9 service customer-profile v15 status active
config port 9 bind customer-profile v14
config port 9 service customer-profile v14 flow-type 0
config port 9 service customer-profile v14 counter enable
config port 9 service customer-profile v14 status active
config port 9 bind customer-profile v13
config port 9 service customer-profile v13 flow-type 0
config port 9 service customer-profile v13 counter enable
config port 9 service customer-profile v13 status active
config port 9 bind customer-profile v12
config port 9 service customer-profile v12 flow-type 0
config port 9 service customer-profile v12 counter enable
config port 9 service customer-profile v12 status active
config port 9 bind customer-profile v11
config port 9 service customer-profile v11 flow-type 0
config port 9 service customer-profile v11 counter enable
config port 9 service customer-profile v11 status active

2.3.8 在端口24上将用户下行流量的配置文件进行绑定,具体的配置和上面类似。
config port 24 bind customer-profile t23
config port 24 service customer-profile t23 flow-type 1
config port 24 service customer-profile t23 counter enable
config port 24 service customer-profile t23 status active
config port 24 bind customer-profile t22
config port 24 service customer-profile t22 flow-type 1
config port 24 service customer-profile t22 counter enable
config port 24 service customer-profile t22 status active
config port 24 bind customer-profile t21
config port 24 service customer-profile t21 flow-type 1
config port 24 service customer-profile t21 counter enable
config port 24 service customer-profile t21 status active
config port 24 bind customer-profile t20
config port 24 service customer-profile t20 flow-type 1
config port 24 service customer-profile t20 counter enable
config port 24 service customer-profile t20 status active
config port 24 bind customer-profile t19
config port 24 service customer-profile t19 flow-type 1
config port 24 service customer-profile t19 counter enable
config port 24 service customer-profile t19 status active
config port 24 bind customer-profile t18
config port 24 service customer-profile t18 flow-type 1
config port 24 service customer-profile t18 counter enable
config port 24 service customer-profile t18 status active
config port 24 bind customer-profile t17
config port 24 service customer-profile t17 flow-type 1
config port 24 service customer-profile t17 counter enable
config port 24 service customer-profile t17 status active
config port 24 bind customer-profile t16
config port 24 service customer-profile t16 flow-type 1
config port 24 service customer-profile t16 counter enable
config port 24 service customer-profile t16 status active
config port 24 bind customer-profile t15
config port 24 service customer-profile t15 flow-type 1
config port 24 service customer-profile t15 counter enable
config port 24 service customer-profile t15 status active
config port 24 bind customer-profile t14
config port 24 service customer-profile t14 flow-type 1
config port 24 service customer-profile t14 counter enable
config port 24 service customer-profile t14 status active
config port 24 bind customer-profile t13
config port 24 service customer-profile t13 flow-type 1
config port 24 service customer-profile t13 counter enable
config port 24 service customer-profile t13 status active
config port 24 bind customer-profile t12
config port 24 service customer-profile t12 flow-type 1
config port 24 service customer-profile t12 counter enable
config port 24 service customer-profile t12 status active
config port 24 bind customer-profile t11
config port 24 service customer-profile t11 flow-type 1
config port 24 service customer-profile t11 counter enable
config port 24 service customer-profile t11 status active

TOP

发新话题