QoS Experimental Configuration - Class-Based Deployment

Table of contents

Prioritize routes

Configuring Ports to Trust DSCP Priority

Configure Traffic Policing

Configure Congestion Management

Configure Congestion Avoidance

Configure Traffic Shaping

Apply the queue profile on the outbound interface

Verify the configuration


QoS is managed in a class-based manner (implemented by scheduling 0~7 queues, generally 6 and 7 protocols are reserved for routing protocols, so we only use 0~5 queues)

Prioritize routes

192.168.10.0/24 network segment DSCP priority is EF

192.168.20.0/24 network segment DSCP priority is CS4

The DSCP priority of the network segment 192.168.30.0/24 is AF31

The DSCP priority of network segment 192.168.40.0/24 is AF32

The DSCP priority of other network segments is default

Configure acl to match routes

acl number 3000 

 rule 5 permit ip source 192.168.10.0 0.0.0.255

acl number 3001 

 rule 5 permit ip source 192.168.20.0 0.0.0.255

acl number 3002 

 rule 5 permit ip source 192.168.30.0 0.0.0.255

acl number 3003 

 rule 5 permit ip source 192.168.40.0 0.0.0.255

acl number 3004 

 rule 5 permit ip source 192.168.50.0 0.0.0.255

 rule 10 permit ip source 192.168.60.0 0.0.0.255

Define the traffic policy and remark the priority of the corresponding route

traffic classifier EF operator or

 if-match acl 3000

traffic classifier AF31 operator or

 if-match acl 3002

traffic classifier CS4 operator or

 if-match acl 3001

traffic classifier other operator or

 if-match acl 3004

traffic classifier AF32 operator or

 if-match acl 3003

traffic behavior EF

 remark dscp ef

traffic behavior AF31

 remark dscp af31

traffic behavior CS4

 remark dscp cs4

traffic behavior other

 remark dscp default

traffic behavior AF32

 remark dscp af32

traffic policy QoS

 classifier EF behavior EF

 classifier CS4 behavior CS4

 classifier AF31 behavior AF31

 classifier AF32 behavior AF32

 classifier other behavior other

Apply traffic policy on the interface, and mark the priority when sending out

interface GigabitEthernet0/0/0

 ip address 100.0.12.1 255.255.255.0

 traffic-policy QoS outbound

You can see the configured DSCP priority from the sent data packets

Configuring Ports to Trust DSCP Priority

The device searches the priority mapping table according to the DSCP priority carried by the message, and determines the queue into which the message enters (that is, there is a mapping relationship between DSCP and the queue)

For example: queue 5 corresponding to DSCP EF

DSCP CS4               corresponds to queue 4

DSCP AF31 and AF32 correspond to queue 3

interface GigabitEthernet0/0/0

 ip address 100.0.12.2 255.255.255.0

 trust dscp

Configure Traffic Policing

192.168.50.0 network segment is configured with traffic policing in the direction of the incoming interface, and the promised information rate is 8kbit/s

interface GigabitEthernet0/0/1

 qos car inbound source-ip-address range 192.168.50.0 to 192.168.50.255 cir 8

Configure Congestion Management

Configure a queue template named dscp

qos queue-profile dscp

  queue 3 weight 30                The weight of queue 3 is 30

  queue 4 weight 50                The weight of queue 4 is 50

  schedule wfq 0 to 4 pq 5       Queues 0~4 are scheduled using wfq , and queue 5 is scheduled using pq

  queue 3 drop-profile dscp

Configure Congestion Avoidance

Configure the wred discard template, named dscp

drop-profile dscp
wred dscp                配置wred丢弃模板基于dscp优先级来丢弃
  dscp af31 low-limit 50 high-limit 80 discard-percentage 40  为DSCP优先级为AF31的流量做丢弃策略(丢弃门限为50~80,丢弃概率为40%)
  dscp af32 low-limit 40 high-limit 60 discard-percentage 50  为DSCP优先级为AF32的流量做丢弃策略(丢弃门限为40~60,丢弃概率为50%)

Reference the drop template in the queue template

qos queue-profile dscp
 queue 3 drop-profile dscp  af31和af32对应的队列都是队列3,所以在队列3上绑定丢弃模板

Configure Traffic Shaping

Configure traffic shaping under the queue profile

qos queue-profile dscp

  queue 0 to 2 gts cir 8 cbs 1500      Configure traffic shaping for queue 0~2 , the committed information rate is 8kbit/s , and the instantaneous traffic is 1500kbit/s

Apply the queue profile on the outbound interface

interface GigabitEthernet0/0/1

 qos queue-profile dscp

Verify the configuration

Check the queue template information - including the scheduling mode and weight corresponding to the queue, as well as the configured traffic shaping information

 

View the discarding discarding profile - including the discarding policy corresponding to each DSCP priority /IP

 

View configured traffic policing information

おすすめ

転載: blog.csdn.net/m0_49864110/article/details/130547830