QoS策略配置实例.

合集下载

H3C-5120交换机QoS配置

H3C-5120交换机QoS配置

H3C-5120交换机QoS配置1. 介绍QoS(Quality of Service)是为了保证网络传输中的数据流能满足特定的服务需求而采取的一系列技术措施。

本文档将介绍如何在H3C-5120交换机上进行QoS配置。

2. 配置步骤步骤1:登录交换机使用管理员账户登录到交换机的CLI界面。

步骤2:创建QoS策略使用以下命令创建一个新的QoS策略:<H3C-5120> system-view[H3C-5120] qos policy policy1[H3C-5120-policy-qos-policy-policy1] quit步骤3:配置流量分类使用以下命令创建流量分类,并将其应用于刚创建的QoS策略:[H3C-5120] traffic classifier classifier1[H3C-5120-classifier-classifier1] if-match ipv4 source-address10.0.0.0 0.255.255.255[H3C-5120-classifier-classifier1] quit[H3C-5120] qos policy policy1[H3C-5120-policy-qos-policy-policy1] classifier classifier1 behavior behavior1[H3C-5120-policy-qos-policy-policy1-classifier-classifier1-behavior-behavior1] quit步骤4:配置流量行为使用以下命令配置流量行为,并将其应用于刚创建的QoS策略:[H3C-5120] traffic behavior behavior1[H3C-5120-behavior-behavior1] remark dscp 24[H3C-5120-behavior-behavior1] quit步骤5:应用QoS策略使用以下命令将QoS策略应用于某个接口:[H3C-5120] interface gigabitethernet 1/0/1[H3C-5120-GigabitEthernet1/0/1] qos apply policy policy1 inbound[H3C-5120-GigabitEthernet1/0/1] quit步骤6:保存配置使用以下命令保存配置并退出:[H3C-5120] save[H3C-5120] quit3. 总结通过以上配置步骤,我们可以在H3C-5120交换机上成功配置QoS。

交换机QOS配置

交换机QOS配置

Page 3
配置基于类的流量监管示例(1/4)

• •
通过配置基于类的流量监管,对不同的业务设置不同的CAR参 数,提供不同的带宽服务
组网需求: Switch通过接口GE2/0/1与路由器互连,企业可经由Switch和 路由器访问网络,如表所示。企业的语音业务对应的VLAN ID 为120,视频业务对应的VLAN ID分别为110,数据业务对应的 VLAN ID为100。 • 在Switch上需要对不同业务的报文分别进行流量监管,以将 流量限制在一个合理的范围之内,并保证各业务的带宽需求。 • • 此外,由于来自用户侧的业务报文携带的DSCP优先级并不 可靠,在实际应用中,不同业务对于服务质量的需求是不同 的,所以在Switch中还需要重标记不同业务报文的DSCP优先级, 以利于下游路由器按照报文的不同优先级分别量监管示例(3/4)
• • 配置流分类 # 在Switch上创建流分类c1~c3,对来自企业的 不同业务流按照其VLAN ID进行分类。 配置流量监管行为 # 在Switch上创建流行为b1~b3,对不同业务流进 行流量监管以及重标记优先级。
Page6
配置基于类的流量监管示例(4/4)
Page4
配置基于类的流量监管示例(2/4)
• 具体配置需求如下:
配置思路 采用如下的思路配置基于复杂流分类的流量监管: 创建VLAN,并配置各接口,使企业能够通过Switch访问网络。 在Switch上配置基于VLAN ID进行流分类的匹配规则。 在Switch上配置流行为,对来自企业的报文进行流量监管并且重标记报文的DSCP优先级。 在Switch上配置流量监管策略,绑定已配置的流行为和流分类,并应用到企业与Switch连接的接口上。 数据准备 为完成此配置示例,需准备如下的数据: 匹配不同业务流的流分类名称。 对不同VLAN ID的报文进行重标记后的优先级值。 对不同VLAN ID的报文进行流量监管的参数:承诺信息速率、峰值信息速率。 需要应用流量监管策略的接口类型和编号。

QoS---配置实例

QoS---配置实例

QoS Lab (CQ,PQ,CBWFQ)QoS-CQ实验配置1.过滤流量,配置ACLR2(config)#access-list 101 permit udp any lt 200 any lt 200R2(config)#access-list 102 permit tcp any range 135 139 any range 135 139R2(config)#access-list 103 permit udp any range 16333 35252 any range 16333 352522.队列排序R2(config)#queue-list 1 protocol ip 1 list 101R2(config)#queue-list 1 protocol ip 2 list 102R2(config)#queue-list 1 protocol ip 3 list 1033.应用到接口R2(config)#int s0/0R2(config-if)#custom-list 14.检查验证R2#sh queueingQoS-PQ1.过滤流量,配置ACLR1(config)#access-list 101 permit udp any range 16333 35252 any range 16333 352522.队列排序R1(config)#priority-list 1 protocol ip low list 101R1(config)#priority-list 1 protocol ip normal tcp wwwR1(config)#priority-list 1 protocol ip medium tcp 23R1(config)#priority-list 1 protocol ip high udp rip3.应用到接口R1(config)#int s0/0R1(config-if)#priority-group 14.检查验证R2#sh queueingR2#sh ip int s0/0QoS---LLQ+WF+WRED1.定义流量R4(config)#ip access-list extended QQR4(config-ext-nacl)#permit ip any 61.172.240.0 0.0.0.255R4(config-ext-nacl)#permit ip udp any any eq 4000R4(config-ext-nacl)#permit ip udp any any eq 8000R4(config)#ip access-list extended SMTPR4(config-ext-nacl)#permit tcp any any eq smtpR4(config)#ip access-list extended FTPR4(config-ext-nacl)#permit tcp any any eq 20R4(config-ext-nacl)#permit tcp any any eq 21R4(config)#class-map QQR4(config-cmap)#match access-group name QQR4(config-cmap)#exitR4(config)#class-map SMTPR4(config-cmap)#match access-group SMTPR4(config-cmap)#exitR4(config)#class-map FTPR4(config-cmap)#match access-group FTPR4(config-cmap)#exit2.定义策略R4(config)#policy-map CBWFQR4(config-pmap)#class QQR4(config-pmap-c)#bandwidth percent 5R4(config-pmap)#class SMTPR4(config-pmap-c)#bandwidth percent 25R4(config-pmap)#class FTPR4(config-pmap-c)#bandwidth percent 20R4(config-pmap-c)#class class-default //配置默认分类R4(config-pmap-c)#fair-queue //配置WFQR4(config-pmap-c)#random-detect //配置WREDR4(config-pmap-c)#random-detect ecn //用于FR or A TM Network R4(config-pmap-c)#random-detect precedence 0 100 300 23.应用到接口上R4(config)#int s0R4(config-if)#service-policy output CBWFQ4.检查验证R4#sh policy-mapQoS---流量监管和流量整形R1(config)#int s1/1R1(config-if)#ip add 10.1.1.255.255.255.0R1(config)#ip route 20.1.1.0 255.255.255.0 10.1.1.1 s1/1R2(config)#int s1/0 ip add 10.1.1.1 255.255.255.0R2(config-if)#bandwidth 16R2(config-if)#clock rate 64000R2(config-if)#service-policy in-put in-putR2(config)#int s1/1 ip add 20.1.1.1 255.255.255.0R2(config-if)#bandwidth 16R2(config-if)#clock rate 64000R2(config-if)#service-policy out-put out-putR2(config)#access-list 100 permit ip 10.1.1.0 0.0.0.255 20.1.1.0 0.0.0.255R2(config)#class-map in-putR2(config-cmap)#match acess-group 100R2(config-cmap)#exitR2(config)#policy-map in-putR2(config-pmap)#class in-putR2(config-pmap)#police 16000 2000 3000 conform-action set-dscp-transmit 20 exceed-action set-dscp-transmit 10R2(config-pmap)#exitR2(config)#class-map out-putR2(config-cmap)#match ip dscp 10R2(config-cmap)#exitR2(config)#policy-map out-putR2(config-pmap)#class out-putR2(config-pmap)#police 8000 1500 3000 confrom-action transmit exceed-action drop R2(config-pmap)#exitR3(config)#int s1/0R3(config-if)#ip add 20.1.1.2 255.255.255.0R2(config-if)#no shutR3(config)#ip route 10.1.1.0 255.255.255.0 20.1.1.1验证R1#ping ipTarget IP address: 20.1.1.2 //目标ip地址:20.1.1.2Repeat count [5]: 10 //重复次数:10Datagram size [100]: 2000 //数据报大小Timeout in seconds [2]: //超时时间:2sExtended commands [n]: //扩展命令Sw eep range of sizes [n]: // 交换范围的大小Type escape sequence to abort. //关于被丢弃序列号的类型Sending 10, 2000-byte ICMP Echos to 20.1.1.2, timeout is2 seconds:!.!..!!.!!Success rate is 60 percent (6/10), round-trip min/avg/max = 204/457/596 msR2#show policy-map从s how policy-map我们就可以知道,我们先前设置的police 16000 2000 3000 conform-action set-dscp-transmit 20 exceed-action set-dscp-transmit 10police 8000 1500 3000 conf orm-action transmit exceed-action drop语名的意义 16000是CAR承诺接入速率其中bc是令牌桶 be是当信令在bc放满后放到be中R2#show policy-map int s1/0R2#show policy-map int s1/1。

神州数码防火墙 1800 20-QoS配置示例

神州数码防火墙 1800 20-QoS配置示例
规则名称 绑定外网接口 规定IP范围
2
限定每IP最大占用500k
1
开启下行弹性QoS 最大弹性带宽5000k
3
第三步---配置IP QoS策略(续)
限定192.168.1.0/24每IP下载带宽最大300K,上传整个网段最大占用 10M带宽
规则名称 绑定外网接口
指定IP范围
2
限定整个网段最大占用10M
IP QoS示例
用户环境描述: • 出口带宽50Mbps,外网为eth0/1 接口 • 内网连接两个网段: 172.16.1.0/24和192.168.1.0/24
Untrust Zone
出口带宽50M
eth0/1
用户需求描述: • 172.16.1.1-172.16.1.100需限制器 下载带宽为500K/IP,如出口带宽 空闲时可最高到5M/IP,上传不 做限制 • 192.168.1.0/24网段中每IP下载 300K,上传整个网段共享10M
HTTP和SMTP应用下行保障20M
规则名称 绑定外网接口
选择应用类型
2
保障上行带宽
1
3
显示已配置控制策略
添加后策略会在应用QoS列表中显示,如多条策略的应用重叠,请点击 策略右侧箭头移动策略位置,从上至下第一条匹配到的策略生效。
添加好的控制策略
THANKS!
IP QoS示例
用户环境描述: • 出口带宽50Mbps,外网为eth0/1 接口 • 内网连接两个网段: 172.16.1.0/24和192.168.1.0/24
Untrust Zone
P2P下载最大10M P2P上传最大5M
HTTP,SMTP上行保障10M HTTP,SMTP下行保障20M 出口带宽50M

QOS策略配置

QOS策略配置

QoS 策略的配置步骤如下:(1) 定义类,并在类视图中定义一组流分类规则;(2) 定义流行为,并在流行为视图中定义一组动作;(3) 定义策略,在策略视图下为使用的类中指定对应的流行为;(4) 在端口或端口组视图下应用策略。

(1)进入系统视图system-view -创建流行为并进入流行为视图traffic behavior behavior-name 必选配置统计动作accounting配置流量监管动作car cir committed-information-rate [ cbscommitted-burst-size [ ebsexcess-burst-size ] ] [ pirpeak-information-rate ] [ green action ][ red action ] [ yellow action ]配置流量过滤动作filter { deny | permit }配置流镜像动作mirror-to { cpu | interface interface-type interface-number }配置外层VLAN 标签nest top-most vlan-id vlan-id配置重定向动作redirect { cpu | interface interface-typeinterface-number | link-aggregationgroup agg-id | next-hop { ipv4-add[ ipv4-add ] | ipv6-add [ interface-typeinterface-number ] [ ipv6-add[ interface-type interface-number ] ] } }配置标记报文的用户网络VLAN ID remark customer-vlan-id vlan-id-value配置标记报文的DSCP 值remark dscp dscp-value配置标记报文的802.1p 优先级remark dot1p 8021p配置标记报文的丢弃优先级remark drop-precedencedrop-precedence-value配置标记报文的IP 优先级值remark ip-precedenceip-precedence-value配置标记报文的本地优先级remark local-precedencelocal-precedence配置标记报文的运营商网络VLAN ID remark service-vlan-id vlan-id-value2. 配置举例定义流行为test,配置流量监管动作,限制报文的速率为640kbps。

QoS配置指导

QoS配置指导

QoS配置指导1、QoS简介QoS(Quality of Service,服务质量)是各种存在服务供需关系的场合中普遍存在的概念,它评估服务方满足客户服务需求的能力。

评估通常不是精确的评分,而是注重分析在什么条件下服务是好的,在什么情况下还存在着不足,以便有针对性地做出改进。

在Internet 中,QoS 所评估的就是网络转发分组的服务能力。

由于网络提供的服务是多样的,因此对QoS 的评估可以基于不同方面。

通常所说的QoS,是对分组转发过程中为延迟、抖动、丢包率等核心需求提供支持的服务能力的评估。

在这里列出的都是针对目前最常见的应用场景所对应的配置,希望能够为大家提供指导。

2、QoS配置指导以下例子中的组网如下:ETH0/1 ------- 192.168.1.12 | |---------------| ROUTER |---------------内网|_____________| 外网2.1基于内网网段进行限速1场景要求:对内网为192.168.1.0的网段进行限速,访问外网的速率不能超过64k。

定义ACL规则:[H3C]acl number 2000[H3C -acl-basic-2000] rule 0 permit source 192.168.1.0 0.0.0.255在内网口应用策略:[H3C] interface Ethernet 0/1[H3C-Ethernet0/1] qos car inbound acl 2000 cir 64 cbs 4000 ebs 0 green pass red discardCBS 和EBS的配置方法:CIR:表示向C桶中投放令牌的速率,即C桶允许传输或转发报文的平均速率;CBS:表示C桶的容量,即C桶瞬间能够通过的承诺突发流量;EBS:表示E桶的容量,即E桶瞬间能够通过的超出突发流量。

CIR用来确定设备允许的流的平均速度,基于速率的设置就是指该值的设置;CBS表示每次突发所允许的最大的流量尺寸,这个值可以通过(流量波动时间超过CIR的部分)进行估算。

Cisco路由器QoS配置实例详解

Cisco路由器QoS配置实例详解

QoS---CQ(定制队列)学习CQ(定制队列)的配置;本实验首先用ACL定义一些流量。

然后再将这些流量进行先后排队,最后将排好队的流量策略应用到接口上1 过滤流量R2(config)#access-list 101 permit ospf any anyR2(config)#access-list 101 permit eigrp any anyR2(config)#access-list 102 permit ip any 192.168.0.1 0.0.0.0R2(config)#access-list 102 permit ip host 192.168.0.1 anyR2(config)#access-list 103 permit tcp any host 192.168.0.1 eq 23R2(config)#access-list 103 permit tcp any host 192.168.0.1 eq 21R2(config)#access-list 103 permit tcp any host 192.168.0.1 eq 20R2(config)#access-list 104 permit udp any lt 200 any lt 200R2(config)#access-list 104 permit tcp any range 135 139 any range 135 139R2(config)#access-list 105 permit udp any range 16333 35252 any range 16333 352522 队列排序R2(config)#queue-list 1 protocol ip 1 list 101 //将与List101匹配的流量排在第一位R2(config)#queue-list 1 protocol ip 2 list 102R2(config)#queue-list 1 protocol ip 3 list 103R2(config)#queue-list 1 protocol ip 4 list 104R2(config)#queue-list 1 protocol ip 5 list 1053 将CQ应用到接口R2(config)#int s0R2(config-if)#custom-queue-list 1 //将这个定制好的队列应用到接口上4 检验R2#sh queueing //查看队列Current fair queue configuration:Interface Discard Dynamic Reserved Link Prioritythreshold queues queues queues queuesBRI0 64 16 0 8 1BRI0:1 64 16 0 8 1BRI0:2 64 16 0 8 1Serial1 64 256 0 8 1Current DLCI priority queue configuration:Current priority queue configuration:Current custom queue configuration:List Queue Args1 1 protocol ip list 1011 2 protocol ip list 1021 3 protocol ip list 1031 4 protocol ip list 1041 5 protocol ip list 105QoS---PQ11 将udp协议的16333端口至35252端口都设为低优先级2 将rip设为高优先级R1(config)#priority-list 1 protocol ip low list 100 //建立优先级列表1,将与access-list 100匹配的流量设为低优先级R1(config)#access-list 100 permit udp any range 16333 35252 any range 16333 35252 //range命令是设定一个端口范围R1(config)#priority-list 1 protocol ip high udp ripR1(config)#int s0R1(config-if)#priority-group 1 //将优先级列表1应用到接口S0上2 验证R1#sh queueingCurrent fair queue configuration:Interface Discard Dynamic Reservedthreshold queue count queue countSerial1 64 256 0Current priority queue configuration:List Queue Args1 low protocol ip list-1001 high protocol ip udp port ripR1#sh ip int s0Serial0 is administratively down, line protocol is downInternet protocol processing disabledR1#sh int s0Serial0 is administratively down, line protocol is downHardware is HD64570MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, loopback not setKeepalive set (10 sec)Last input never, output 01:37:44, output hang neverLast clearing of "show interface" counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 159 Queueing strategy: priority-list 1Output queue (queue priority: size/max/drops):high: 0/20/0, medium: 0/40/0, normal: 0/60/159, low: 0/80/05 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec0 packets put, 52588119 bytes, 0 no bufferReceived 0 broadcasts, 0 runts, 0 giants, 0 throttles0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 packets, 52588444 bytes, 0 underruns0 output errors, 0 collisions, 2 interface resets0 output buffer failures, 0 output buffers swapped out6 carrier transitionsDCD=down DSR=down DTR=down RTS=down CTS=downQoS----PQ21 将主机192.168.0.1设为最高优先级2 将192.168.0.0/24网段下的其他主机设为中等优先级3 将所有http流量设为普通优先级4 将所有ftp流量设为低优先级配置如下:R1(config)#priority-list 2 protocol ip high list 2 //建立优先级列表2 ,将与access-list 2匹配的流量定为高优先级R1(config)#access-list 2 permit 192.168.0.1 0.0.0.0R1(config)#priority-list 2 protocol ip medium list 3R1(config)#access-list 3 deny 192.168.0.1 0.0.0.0R1(config)#access-list 3 permit 192.168.0.0 0.0.0.255R1(config)#priority-list 2 protocol ip normal tcp wwwR1(config)#priority-list 2 protocol ip low tcp ftpR1(config)#priority-list 2 protocol ip low tcp ftp-dataR1(config)#int s1R1(config-if)#priority-group 2 //在接口S1上应用该优先级列表R1#sh queueing //查看队列Current fair queue configuration:Current priority queue configuration:List Queue Args2 high protocol ip list 22 medium protocol ip list 32 normal protocol ip tcp port www2 low protocol ip tcp port ftp2 low protocol ip tcp port ftp-dataQoS---CBWFQ(基于类分配带宽)CBWFQ(基于类分配带宽)基本配置实验要求:给上一个实验所定义的3种流量,QQ,SMTP,FTP分配不同的带宽1 定义流量(直接调用上一个实验的配置)R4(config)#class-map QQR4(config-cmap)#match access-group name QQ//匹配一个名为QQ的命名ACLR4(config-cmap)#exiR4(config)#ip access-list extended QQR4(config-ext-nacl)#permit ip any 61.172.240.0 0.0.0.255R4(config-ext-nacl)#permit udp any any eq 4000R4(config-ext-nacl)#permit udp any any eq 8000R4(config-ext-nacl)#exiR4(config)#class-map smtpR4(config-cmap)#match access-group 100R4(config-cmap)#exiR4(config)#access-list 100 permit tcp any any eq smtpR4(config)#class-map ftpR4(config-cmap)#match access-group 101R4(config-cmap)#exiR4(config)#access-list 101 permit tcp any any eq 20R4(config)#access-list 101 permit tcp any any eq 212 定义策略R4(config)#policy-map CBWFQR4(config-pmap)#class QQR4(config-pmap-c)#bandwidth percent 5 //为类型为QQ的流量分配百分之五的带宽R4(config-pmap)#class smtpR4(config-pmap-c)#bandwidth percent 25R4(config-pmap)#class ftpR4(config-pmap-c)#bandwidth percent 20R4(config-pmap-c)#exi3 应用到接口上R4(config)#int s0R4(config-if)#service-policy output CBWFQ4 验证R4#sh policy-map//查看策略Policy Map wyClass QQpolice cir 10000 bc 1500conform-action dropexceed-action dropClass smtppolice cir 10000 bc 1500conform-action dropexceed-action dropClass ftppolice cir 10000 bc 1500conform-action dropexceed-action dropPolicy Map CBWFQClass QQBandwidth 5 (%) Max Threshold 64 (packets) Class smtpBandwidth 25 (%) Max Threshold 64 (packets) Class ftpBandwidth 20 (%) Max Threshold 64 (packets)。

QOS(PQ+CQ+WFQ+CBWFQ+LLQ)配置实例

QOS(PQ+CQ+WFQ+CBWFQ+LLQ)配置实例

QOS关于队列的相关配置(PQ+CQ+WFQ+CBWFQ+LLQ)所有试验共用的试验拓扑:PQ:优先级队列(priority queue)在优先级队列PQ中,有高,中,普通,低优先级4个队列。

数据包根据事先定义放在不同的队列中,路由器按照高,中,普通,低顺序服务,只有高优先级的队列为空后,才为其他队列服务,依次类推。

直接手敲的制作匆忙。

priority-list 1 protocol ip high tcp telnet //将telnet流量放在高优先级队列里priority-list 1 protocol ip high list 101 //将acc-list 101定义的流量放在高优先级里priority-list 1 protocal ip medium gt 1000 //将数据包大小大于1000字节的流量放在中等优先级队列里priority-list 1 interface Ethernet 1/0 normal //将从Ethernet口收到的流量放在普通的优先级队列里priority-list 1 default low //。

priority-list 1 queue-limit 20 30 40 50 //分别定义高、中、普通、低优先级队列长度,如果超出这些长度的数据包将被丢弃!Int s 0/0Prority-group 1Show int s 0/0、show queueing priority就能检测了。

CQ:自定义队列(custom queue)与PQ不同,在CQ中有16个队列数据包根据事先定义的放在不同的队列中,路由器将为第一队列服务一定数量的数据包、字节后就为第二个队列服务,我们定义的是深度——即为每个队列服务的那“一定数量的数据包、字节”然后转而为下一队列服务。

注意:CQ中队列0 比较特殊,只有0为空了才为其他队列服务。

一下是show run的内容access-list 101 permit ip host 10.1.1.0 anyqueue-list 1 protocol ip 1 tcp telnetqueue-list 1 protocol ip 2 list 101queue-list 1 protocol ip 3 gt 1000queue-list 1 interface Ethernet1/0 4queue-list 1 default 5queue-list 1 queue 1 limit 40 //定义深度队列一的深度为40queue-list 1 queue 2 limit 35queue-list 1 queue 3 limit 30queue-list 1 queue 4 limit 25!interface Serial0/0ip address 192.168.12.1 255.255.255.0ip ospf 1 area 0serial restart-delay 0custom-queue-list 1 //接口上应用show int s 0/0Show queueing customWFQ:(weigth fair queue)加权公平队列WFQ是低速链路(低于2.048Mbps)上的默认设置,它将数据包区分为不同的流。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Current configuration : 3568 bytes !!version 12.2service timestamps debug datetime service timestamps log datetime service password-encryption!hostname xxxxxx!enable secret 5 $1$uJPt$/Uh!clock timezone China 8ip subnet-zerono ip source-routeip cef!!ip name-server x.x.x.xip name-server x.x.x.x!no ip bootp server!class-map match-any premium_class description For premium match protocol fasttrackmatch protocol httpmatch protocol icmpmatch protocol napstermatch protocol netshowmatch protocol pcanywherematch protocol realaudiomatch protocol streamworkmatch protocol vdolivematch protocol cuseemematch protocol telnetmatch protocol secure-httpmatch access-group 110match ip precedence 5match ip precedence 4match ip precedence 3class-map match-any normal_calss description For normalmatch protocol ftpmatch protocol imapmatch protocol pop3match protocol secure-ftpmatch protocol secure-imapmatch protocol secure-pop3match protocol smtpmatch access-group 120match ip precedence 2match ip precedence 1!!policy-map qos_policy_mapclass premium_classbandwidth percent 50random-detectrandom-detect exponential-weighting-constant 4 police cir 2000000 bc 10000 be 10000 conform-action transmitexceed-action transmitclass normal_calssbandwidth percent 25random-detectrandom-detect exponential-weighting-constant 4 police cir 2000000 bc 2000 be 2000conform-action transmitexceed-action drop!!!!interface FastEthernet0/0ip address 192.168.0.1 255.255.255.0ip address 192.168.1.1 255.255.255.0 secondary ip access-group 130 inip verify unicast reverse-pathip nat insideip route-cache same-interfaceip route-cache policyip policy route-map qosduplex autospeed autono cdp enable!interface Serial0/0bandwidth 2048ip address x.x.x.x 255.255.255.252ip verify unicast reverse-pathno ip proxy-arpip nat outsiderate-limit input 2000000 20000 20000 conform-action transmit exceed-action drop ip route-cache policyservice-policy output qos_policy_mapno cdp enable!ip nat inside source list 10 interface Serial0/0 overloadip classlessip route 0.0.0.0 0.0.0.0 x.x.x.xip route 192.168.0.0 255.255.255.0 192.168.1.1ip route 192.168.1.0 255.255.255.0 192.168.0.1no ip http serverno ip pim bidir-enable!!access-list 10 remark NATaccess-list 10 permit 192.168.0.0 0.0.0.255access-list 10 permit 192.168.1.0 0.0.0.255access-list 110 remark normal access-list 110 permit ip 192.168.0.0 0.0.0.255 any access-list 120 remark premium access-list 120 permit ip 192.168.1.0 0.0.0.255 any access-list 130 remark anti BT and anti-virus access-list 130 deny tcp any any rang e 6881 6890 time-range work access-list 130 deny tcp any range 6881 6890 any time-range work access-list 130 deny tcp any any range 6969 6979 time-range work access-list 130 deny tcp any range 6969 6979 any time-range work access-list 130 deny tcp any any range 7000 7100 time-range work access-list 130 deny tcp any range 7000 7100 any time-range work access-list 130 deny tcp any any range 9995 9996 access-list 130 deny tcp any range 9995 9996 any access-list 130 deny tcp any any eq 5554 access-list 130 deny tcp any eq 5554 any access-list 130 permit ip any any no cdp run route-map qos permit 10 match ip address 110 set ip precedence priority !route-map qos permit 20 match ip address 120 set ip precedence critical ! banner motd ^CUnauthorized access will be Prosecuted!!!^C ! line con 0 exec-timeout 0 0 line aux 0 line vty 0 4 password 7 121A0C0411045D5D7C login ! time-range work periodicweekdays 8:30 to 18:00 ! ! end 该公司有两个内网段:192.168.0.0/24,192.168.1.0/24。

192.168.0.0/24 为低优先级内网段,192.168.1.0/24 为高优先级内网段。

在 class-map 中 premium_class 类包括了 192.168.1.0/24 高优先级内网段,采用 NBAR 匹配实时性较高的应用如: napster、 netshow、 pcanywhere、 realaudio、streamwork、 vdolive、 cuseeme、 telnet、Http 等。

normal_class 类包括了192.168.0.0/24 低优先级内网段,采用 NBAR 匹配实时性不强的应用如:ftp、pop3、smtp 等。

在 policy-map 中针对不同的 class,采取不同的策略。

如:CBWFQ、WRED 等。

因为我公司互联网带宽为 2M,故考虑 WRED 中的指数加权因子为 4,最小阀值为 5,最大阀值为 17,标记几率分母为 1。

在 route-map (PBR)中采用匹配不同的 ACL 110#,ACL 120#。

设置不同的 IP precedence 值。

在 F 0/0 以太口上增加 inbound policy--ACL 130#,在上班时间 8:30 到 18:00 禁止BT 下载。

限制震荡波病毒的端口。

在 S 0/0 串口上采用 Input CAR 策略。

对进入S 0/0 串口的流量进行整形。

相关文档
最新文档