ISP QoS Lab

Source: Internet
Author: User
Tags cos cos flushes map class set set

ISP QoS Lab

650) this.width=650; "title=" image "style=" border-top:0px;border-right:0px;background-image:none;border-bottom:0 px;padding-top:0px;padding-left:0px;margin:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" image "src=" Http://s3.51cto.com/wyfs02/M02/75/04/wKiom1YwhyXhwcNrAACJDrPvjuI369.jpg "height=" 235 "/>

1-pq

The priority queue (Pq,priority queue) has a high, medium, normal, low priority four queues. Data package

According to the prior definition placed in different queues, routers in high, medium, Normal, low order service, only high priority

Queue is empty before the queue service is medium priority, and so on. This ensures that high-priority packets must be prioritized

Service, however, if the high-priority queue is not long-term, then the low-priority queue will never be serviced. We can for every

Queue is set to a length, the packet is discarded when the queue is full

650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image002 "src=" http://s3.51cto.com/wyfs02/M00/75/04/wKiom1YwhyWgPrBgAACJBv2Tmk0515.jpg "height=" 243 "/>

R1 (config) #priority-list 1 protocol IP? \ \ can define four priority levels

High

Medium

Normal

Low

R1 (config) #priority-list 1 Protocol IP high TCP 23 \ \ We put telenet traffic at the highest priority

R1 (config) #priority-list 1 interface f0/0 medium \ \ Put the traffic received on an interface in a medium priority

R1 (config) #priority-list 1 Default Low

R1 (config) #int f1/0

R1 (config-if) #pri

R1 (config-if) #priority-group?

<1-16> Priority Group

R1 (config-if) #priority-group 1

R1#sh int f1/0

Fastethernet1/0 is up, line protocol are up

Hardware is amdfe, address is cc00.2618.0010 (BIA cc00.2618.0010)

Internet address is 192.168.12.1/24

MTU bytes, BW 100000 Kbit, DLY usec,

Reliability 255/255, Txload 1/255, Rxload 1/255

Encapsulation ARPA, loopback not set

Keepalive Set (SEC)

Full-duplex, 100mb/s, 100basetx/fx

ARP Type:arpa, ARP Timeout 04:00:00

Last input 00:00:04, output 00:00:01, output hang never

Last clearing of "show interface" counters never

Input queue:0/75/0/0 (size/max/drops/flushes); Total Output drops:0

Queueing Strategy:priority-list 1

Output Queue (Queue Priority:size/max/drops):

high:0/20/0, medium:0/40/0, normal:0/60/0, low:0/80/0

R1#show Queueing Priority

Current DLCI Priority Queue configuration:

Current Priority Queue configuration:

List Queue Args

1 Low Default

1 High Protocol IP TCP port telnet

1 Medium Interface fastethernet0/0

2-cq

The custom queue (Cq,custom queue) is different from PQ and has 16 queues in CQ. Packets Based on things

The first definition is placed in a different queue, and the router will serve the first queue with packets of a certain amount or number of bytes

, the service is converted to a second queue. We can define the depth in different queues to ensure that a queue is

The number of packets in the service is large, but does not make a queue never be serviced. The queue 0 in CQ is more special,

Only queue 0 is empty to serve other queues.

R1 (config) #queue-list 1 Protocol IP 1 TCP telnet \ \ Put telenet traffic in queue 1

R1 (config) #queue-list 1 default 6 \ \ Other traffic defaults to queue 6

R1 (config) #int f1/0

R1 (config-if) #custom-queue-list 1

R1#sh int f1/0

Fastethernet1/0 is up, line protocol are up

Hardware is amdfe, address is cc00.2618.0010 (BIA cc00.2618.0010)

Internet address is 192.168.12.1/24

MTU bytes, BW 100000 Kbit, DLY usec,

Reliability 255/255, Txload 1/255, Rxload 1/255

Encapsulation ARPA, loopback not set

Keepalive Set (SEC)

Full-duplex, 100mb/s, 100basetx/fx

ARP Type:arpa, ARP Timeout 04:00:00

Last input 00:00:00, output 00:00:01, output hang never

Last clearing of "show interface" counters never

Input queue:0/75/0/0 (size/max/drops/flushes); Total Output drops:0

Queueing Strategy:custom-list 1

Output Queues: (Queue #: Size/max/drops)

0:0/20/0 1:0/20/0 2:0/20/0 3:0/20/0 4:0/20/0

5:0/20/0 6:0/20/0 7:0/20/0 8:0/20/0 9:0/20/0

10:0/20/0 11:0/20/0 12:0/20/0 13:0/20/0 14:0/20/0

15:0/20/0 16:0/20/0

5 minute input rate 0 bits/sec, 0 packets/sec

5 minute output rate 0 bits/sec, 0 packets/sec

3-wfq

The weighted fair queue (Wfq,weight Fair queue) is the default setting on low-speed links (2.048M or less).

WFQ divides the packet into different streams, such as IP addresses and port numbers in IP to differentiate between different TCP streams or

The UDP stream of the user. The WFQ assigns different bandwidths to different streams based on their weights, which are the priority fields in the IP packets.

For example, there are 3 streams, two flows have a priority of 0, the third is 5, and the total weight is (1+1+6) = 8, then the first two streams each

Get 1/8 of the bandwidth, and a third stream gets 6/8.

R1 (config) #int f1/0

R1 (config-if) #fair-queue 512 1024 10 \ \ Above is enabled on the interface WFQ, in fact, at E1 speed (2.048M) or lower rate of the link, WFQ is enabled by default. 512 is the discard value, when the queue reaches 512 packets, the data is discarded, 1024 is the maximum number of sessions, and 10 is the RSVP can reserve queue.

Show int f1/0

Input queue:0/75/0/0 (size/max/drops/flushes); Total Output drops:0

Queueing strategy:weighted Fair

Output queue:0/1000//0 (Size/max total/threshold/drops)

Conversations 0/1/1024x768 (Active/max active/max total)

Reserved Conversations 0/0 (Allocated/max allocated)

Available Bandwidth 75000 kilobits/sec

4-cbwfq

Class-based weighted fair queue (Cbwfq,class Based Weight Fair queue) allows users to customize classes

and control the bandwidth of these categories. This is useful in practice, for example, we can control our network access

The bandwidth of web traffic at the time of the Internet. Can be based on the protocol type, ACL, IP priority, or input interface of the packet

The type of traffic is defined in advance, the maximum bandwidth is configured for different classes of traffic, and the percentage of interface bandwidth is occupied.

CBWFQ can be used with Nbar, WRED and so on.

STEP1: Define class Map

R1 (config) #class-map match-any Map1

R1 (CONFIG-CMAP) #match protocol http

R1 (CONFIG-CMAP) #match protocol FTP

R1 (Config-cmap) #exit

R1 (config) #class-map match-all map2

R1 (CONFIG-CMAP) #match protocol Telnet

STEP2: Defining Policy-map

R1 (config) #policy-map my-policy

R1 (config-pmap) #class Map1

R1 (config-pmap-c) #bandwidth 60

R1 (config-pmap-c) #class MAP2

R1 (config-pmap-c) #bandwidth 10

R1 (config-pmap-c) #exit

STEP3: Call to Interface

R1 (config) #int f1/0

R1 (config-if) #service-policy output My-polic

"Technical Essentials" the CLASS-MAP command format is: "Class-map [Match-all | match-any] name":

Match-all: Indicates that the following conditions must all be satisfied before they can be executed, this is the default value;

Match-any: Indicates that a match can be performed on any one condition.

In Class-map mode, you can set various matching conditions, such as:

Match a protocol type: Match protocol protocol-name. The protocol types include EGP,ICMP,EIGRP,

Dns,http,telnet and so on hundreds of specific agreements.

Match access list: Match Access-group {number | name Acl_name}. can match the base

The list of numbers and the name-based access list.

Match cos (class of Servie): Match cos Cos-value. Matches the COS value in the IP packet.

Match IP priority (IP precedence): Match IP precedence precedence-value. The

The IP priority value in the IP packet.

Match DSCP value (differentiated Services Code point): Match IP DSCP dscp_value.

Matches the DSCP value in the IP packet.

Match into interface: Match Input-interface type number. Matches the ingress interface of the IP packet.

R1#show Class-map

Class Map match-any Class-default (ID 0)

Match any

Class Map match-any map1 (ID 1)

Match Protocol HTTP

Match Protocol FTP

Class Map match-all map2 (ID 2)

Match Protocol Telnet

R1#show Policy-map

Policy Map My-policy

Class Map1

Bandwidth (Kbps) Max Threshold (packets)

Class MAP2

Bandwidth (Kbps) Max Threshold (packets)

5-llq

The configuration and CBWFQ of low-latency queues (llq,low Latency queue) are similar. Some packets, such as

VOIP packets, which are very sensitive to the latency of the data. LLQ allows users to customize data categories and prioritize these categories

Data transfer, which does not transmit other categories of data before it is transmitted.

LLQ=CBWFQ + PQ

The default queue defaults to WFQ

R1 (config) #class-map match-any map3

R1 (config-cmap) #match IP Precedence Critical

R1 (Config-cmap) #exit

R1 (config) #policy

R1 (config) #policy-map my-policy

R1 (config-pmap) #class map3

R1 (config-pmap-c) #priority?

<8-2000000> Kilo Bits per second

Percent% of total bandwidth

R1 (config-pmap-c) #priority 15

The configuration of the \\LLQ is similar to the CQWFQ configuration, but with the priority command, we limit its bandwidth to

15k, packets exceeding this bandwidth will be discarded. This way the CLASS-MAP3 traffic will be sent first, before it is sent

Traffic such as Class-map1 and CLASS-MAP2.

R1#sh Policy-map Interface f1/0

fastethernet1/0

CLASS-MAP:MAP3 (Match-any)

0 packets, 0 bytes

5 minute offered Rate 0 bps, drop rate 0 bps

Match:ip Precedence 5

0 packets, 0 bytes

5 minute rate 0 bps

Queueing

Strict Priority

Output queue:conversation 264

Bandwidth (Kbps) Burst 375 (Bytes)

(pkts matched/bytes matched) 0/0

(Total drops/bytes drops) 0/0

Class-map:class-default (Match-any)

763 packets, 63162 bytes

5 minute offered Rate 0 bps, drop rate 0 bps

Match:any

R1 (config) #policy-map my-policy

R1 (config-pmap) #class Class-default

R1 (config-pmap-c) #?

QoS Policy-map class configuration commands:

Bandwidth Bandwidth

Compression Activate Compression

Drop Drop all Packets

Exit exit from QoS class action configuration mode

Fair-queue Enable flow-based Fair Queuing in this Class

Netflow-sampler NetFlow Action

No Negate or set default values of a command

Police police

Priority Strict scheduling priority for this Class

Queue-limit Queue Max Threshold for Tail Drop

Random-detect Enable Random Early Detection as Drop policy

Service-policy Configure Flow Next

Set Set QoS values

Shape Traffic Shaping

R1 (config-pmap-c) #no fair-queue \ \ Change the default queue mechanism

6-wred

Weighted random early detection (wred,weight random Early Detect) is the Cisco implementation of red. When

When multiple TCP connections are transmitting data, all connections transmit data in the maximum capacity, quickly causing the queue to be full, the queue full

The entire data is lost, and all the senders immediately transmit the data at the same time with minimal power, and the bandwidth begins to idle. Pick up

All the senders began to slowly increase the speed, and then at the same time to reach the maximum rate, and the blockage, so repeated. Such

Network Time-space congestion, bandwidth utilization is not high. RED randomly discards TCP packets to ensure the overall use of the link

Rate. WRED is an improvement to red, where packets are divided into queues based on IP precedence, with minimum thresholds per queue, most

Large thresholds, when the average length is less than the minimum threshold, the packet is not discarded, and as the average queue length increases, the drop

When the average length is greater than the maximum threshold, packets are dropped at a set scale.

R1 (config) #int f1/0

R1 (config-if) #random-detect

The above is enabled on the interface wred

R1 (config-if) #random-detect Precedence 0 18 42 12

The above is configured with an IP priority of 0 queue, the lowest threshold is 18, the average queue length is less than 18 o'clock, the packet will not

is discarded when the average queue length is greater than 18 o'clock, the packet is dropped, and the average queue length is larger, the dropped packets

The higher the maximum threshold is 42, the average queue length is less than 42 o'clock, and the packet is discarded at a scale of 1/12.

r1#Show Queueing Random-detect

Current Random-detect configuration:

fastethernet1/0

Queueing Strategy:random Early detection (WRED)

Random-detect not active on the dialer

Exp-weight-constant:9 (1/512)

Mean Queue depth:0

Class Random drop Tail drop Minimum Maximum Mark

Pkts/bytes pkts/bytes thresh thresh prob

0 0/0 0/0 18 42 1/12

1 0/0 0/0 22 40 1/10

2 0/0 0/0 24 40 1/10

3 0/0 0/0 26 40 1/10

4 0/0 0/0 28 40 1/10

5 0/0 0/0 31 40 1/10

6 0/0 0/0 33 40 1/10

7 0/0 0/0 35 40 1/10

RSVP 0/0 0/0 37 40 1/10

\ \ Above shows the configuration of wred, the default is the lowest difference between the different IP priority queues, we changed the

A queue with an IP priority of 0.

7-car

Committed access rates (car,commited access rate) is a method of classifying and tagging traffic policies,

It limits the rate of IP traffic based on IP priority, DSCP value, MAC address, or access control list. Tags can be

Change the IP priority or DSCP.

CAR uses the mechanism of the token bucket to check if there are enough tokens in the token bucket. If an interface has tokens available,

Tokens can be removed from the token bucket, packets are forwarded, and when the time interval passes, the tokens are added back to the token.

The bucket. If the interface does not have a token available, car can define the behavior that is taken against the packet. CAR uses 3 kinds of speed

Rate definition to define the rate of traffic:

Normal rate: The average rate at which tokens are added to a token bucket is the average of the packets

Transfer rate.

1-normal burst (normal burst): normal traffic rate is allowed in the time interval during a regular burst.

2-excess burst (excessive burst): More than normal burst of traffic. When an excessive burst is configured, the token is borrowed and

Add it to a token bucket to allow some level of traffic burst. When the Lent token has been used on this interface

Any excess traffic received will be discarded. Traffic bursts occur only in a short period of time until the token bucket is not

The token exists before the transfer is stopped.

It is generally recommended that the normal traffic rate be configured equal to the average traffic rate over time. The normal burst rate should be

When it is equal to 1.5 times times the normal rate. The excess rate is twice times the normal burst rate.

R1 (config-if) #rate-limit output Access-group 101 64000 12000 16000 Conform-action

Set-prec-transmit 3 exceed-action set-prec-transmit 0

Above on the interface to enable car, for the traffic that conforms to ACL 101, the average rate is 64,000 bits per second, normal burst

The amount is 12000 bytes per second, and the excess burst is 12000 bytes per second.

Rate-limit {output | input} {CIR BC be} conform-action {action} exceed-action

{Action}

The CIR unit is bit/s, while the BC and be units are byte/s.

The conform-action condition is when the data to be sent is less than the normal burst (BC)

Exceed-action refers to the time when the data to be sent is larger than the normal burst, less than the maximum burst (BE).

The options for action are as follows:

Continue: Continue execution of next car statement

Drop: Drop Packet

Tranmsit: Forwarding Packets

set-prec-continue {Precedence}: Set IP priority and continue execution of next car statement

Set-prec-transmit {Precedence}: Set IP priority and forward packets

set-dscp-continue {DSCP}: Set DSCP value and continue execution of next car statement

Set-dscp-transmit {DSCP}: Set DSCP value and forward packets

R1#show Interfaces Rate-limit

9-nbar

Network-based application identification (Nbar,network Based application recognition) is actually a

The classification engine, which looks at the packets and analyzes the information contained in the packet. NBAR makes the router not only to do forwarding

Data, and the data packets are checked, which can greatly increase the load. NBAR can check the content of the application layer,

For example, you can check if the URL has the word ". Java". The NBAR can be used in conjunction with many QoS.

R1 (config) #class-map Exchange

R1 (CONFIG-CMAP) #match Protocol Exchange

R1 (Config-cmap) #exit

R1 (config) #policy-map deny-exchange

R1 (CONFIG-PMAP) #class Exchange

R1 (config-pmap-c) #?

QoS Policy-map class configuration commands:

Bandwidth Bandwidth

Compression Activate Compression

Drop Drop all Packets

Exit exit from QoS class action configuration mode

Netflow-sampler NetFlow Action

No Negate or set default values of a command

Police police

Priority Strict scheduling priority for this Class

Queue-limit Queue Max Threshold for Tail Drop

Random-detect Enable Random Early Detection as Drop policy

Service-policy Configure Flow Next

Set Set QoS values

Shape Traffic Shaping

R1 (config-pmap-c) #drop

R1 (config) #int f1/0

R1 (config-if) #service-policy output Deny-exchange

The configuration and CBWFQ of NABR are no different, because Nbar is actually just a classification technique.

In the old iOS, the "Match protocol BitTorrent" command cannot be used in Class-map mode, such as downloading files such as BITTORRENT.PDLM from the Cisco Web site, uploading to flash on the router, and using the command "IP Nbar pdlm FLASH:BITTORRENT.PDLM ", you can use the Matchprotocol BitTorrent command in Class-map mode.

"Hint" NBAR requires the router to enable CEF, which is on by default, and if it is not, you can use "IP CEF"

Command.

10-Summary of commands

Priority-list 1 Protocol IP High TCP telnet creates a priority queue with a label of 1. Put Telnet traffic in the high priority queue

Priority-list 1 queue-limit 20 30 40 50 Define priority queue length in high, medium, normal, low queues

Priority-group 1 The defined Priority Queue application interface

Show Queueing priority View queue status

Debug Priority Queue

Queue-list 1 Protocol IP 1 TCP telnet creates a custom queue with a label of 1. Put Telnet traffic in queue 1

Queue-list 1 Queue 1 limit 40 defines the depth of queue 1 as 40,

Custom-queue-list 1 Define a custom queue application interface

Fair-queue 512 1024 10 enable WFQ,512 on the interface is the drop value, 1024 is the maximum number of sessions, and 10 is the RSVP-ready queue

Class-map match-any class-map1 definition class-map, named Class-map1

Match protocol HTTP matches HTTP protocol

This article from the "Erick" blog, declined to reprint!

ISP QoS Lab

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.