Download presentation
Presentation is loading. Please wait.
Published byJoanna Davidson Modified over 8 years ago
1
© 2001, Cisco Systems, Inc. Modular QoS CLI Service Policy
2
© 2001, Cisco Systems, Inc. QOS v1.0—9-2 Objectives Upon completing this module, you will be able to: Describe the policy part of the Modular QoS CLI Configure packet marking with the modular CLI Configure policing and shaping with the modular CLI Configure class-based WFQ with the modular CLI Configure congestion avoidance mechanisms (WRED) with the modular CLI Configure low-latency queuing Monitor and troubleshoot policy maps
3
Service Policy © 2001, Cisco Systems, Inc. QOS v1.0—9-3
4
© 2001, Cisco Systems, Inc. QOS v1.0—9-4 Objectives Upon completing this lesson, you will be able to: Describe and configure policy maps List all the QoS mechanisms currently available in the MQC Monitor and troubleshoot policy maps
5
© 2001, Cisco Systems, Inc. QOS v1.0—9-5 Service Policy One aspect of MQC modularity is configuration. The MQC is split into two configuration modules: –Configuration of classification –Configuration of service policies Classification is configured by using class maps. Service policy is configured by using policy maps.
6
© 2001, Cisco Systems, Inc. QOS v1.0—9-6 Modular QoS CLI Classification Service Policy Class 1? Class 2? Class N? CBWFQ CBLLQ Class-Based Policing Service policy implements per-hop behaviors (PHBs) for all traffic classes. Supported mechanisms: CBWFQ CBLLQ Class-Based Policing Class-Based Shaping Class-Based Marking Up to 256 classes can be used within one service policy.
7
© 2001, Cisco Systems, Inc. QOS v1.0—9-7 PHB Mechanisms The MQC supports these QoS mechanisms: –Class-based weighted fair queuing (CBWFQ) to guarantee bandwidth –Class-based low-latency queuing (CBLLQ) to guarantee bandwidth and low latency –Class-based policing to limit traffic rate by dropping excess traffic –Class-based shaping to limit traffic rate by delaying excess traffic –Class-based marking to mark packets
8
© 2001, Cisco Systems, Inc. QOS v1.0—9-8 Configuring Policy Maps policy-map name Router(config)# Enter policy-map configuration mode. Policy maps are identified by a case-sensitive name. class class-map Router(config-pmap)# Enter the per-class policy configuration mode by using the name of a previously configured class map. Use the name “class-default” to configure the policy for the default class. class class-map condition Router(config-pmap)# Optionally, you can define a new class map by entering the condition after the name of the new class map. The class map will use the match-any strategy.
9
© 2001, Cisco Systems, Inc. QOS v1.0—9-9 Configuring Policy Maps (cont.) description Router(config-pmap)# It is recommended to use descriptions in large and complex configurations. The description has no operational meaning. rename policy-map Router(config-pmap)# Complex policy maps can be renamed by using the rename policy-map command. All references to the policy map are also renamed. Router(config-pmap-c)# Per-class service policies are configured within the per-class policy map configuration mode.
10
© 2001, Cisco Systems, Inc. QOS v1.0—9-10 Configuring Policy Maps (cont.) service-policy {input | output} policy-map Router(config-if)# Attaches the specified service policy map to the input or output interface The interface should be in the default queuing mode prior to using this command if it is used on output class-map HTTP match protocol http ! policy-map PM class HTTP bandwidth 2000 class class-default bandwidth 6000 ! class-map HTTP match protocol http ! policy-map PM class HTTP bandwidth 2000 class class-default bandwidth 6000 ! interface Serial0/0 service-policy output PM ! interface Serial0/0 service-policy output PM !
11
© 2001, Cisco Systems, Inc. QOS v1.0—9-11 Attaching Policy Maps to ATM PVCs interface atm 5/0/0.1 point-to-point service-policy output PM1 ! interface atm 5/0/0.2 point-to-point pvc 1/40 service-policy output PM2 ! interface atm 5/0/0.1 point-to-point service-policy output PM1 ! interface atm 5/0/0.2 point-to-point pvc 1/40 service-policy output PM2 ! service-policy {input | output} policy-map Router(config-subif)# Service policies can be attached to an ATM (sub)interface. Using service policies on the main interface and subinterfaces at the same time is not supported in the distributed (VIP-based) version. service-policy {input | output} policy-map Router(config-if-atm-vc)# Service policies can also be attached to an ATM PVC.
12
© 2001, Cisco Systems, Inc. QOS v1.0—9-12 Attaching Policy Maps to Frame Relay Interfaces service-policy {input | output} policy-map Router(config-subif)# Service policy can be attached to an interface/subinterface. Service policy attached to a subinterface cannot include CBWFQ or CBLLQ except in the distributed (VIP-based) version. Using service policies on the main interface and subinterfaces at the same time is not supported in the distributed (VIP-based) version.
13
© 2001, Cisco Systems, Inc. QOS v1.0—9-13 Attaching Policy Maps to Frame Relay PVCs service-policy {input | output} policy-map Router(config-map-class)# Service policy can be attached to a Frame Relay map class. class-map Voice match protocol vofr ! policy-map LLQ class Voice priority 100 ! interface Serial0/0 encapsulation frame-relay ! interface Serial0/0.1 point-to-point frame-relay class Voice ! map-class frame-relay Voice service-policy output LLQ ! class-map Voice match protocol vofr ! policy-map LLQ class Voice priority 100 ! interface Serial0/0 encapsulation frame-relay ! interface Serial0/0.1 point-to-point frame-relay class Voice ! map-class frame-relay Voice service-policy output LLQ !
14
© 2001, Cisco Systems, Inc. QOS v1.0—9-14 Policy Map Example class-map match-all Test1 match protocol http match access-group 100 class-map match-any Test2 match protocol http match access-group 101 ! policy-map Test class Test1 bandwidth 100 class Test2 bandwidth 200 class Test3 access-group 100 bandwidth 300 ! access-list 100 permit tcp any host 10.1.1.1 access-list 101 permit tcp any host 10.1.1.2 class-map match-all Test1 match protocol http match access-group 100 class-map match-any Test2 match protocol http match access-group 101 ! policy-map Test class Test1 bandwidth 100 class Test2 bandwidth 200 class Test3 access-group 100 bandwidth 300 ! access-list 100 permit tcp any host 10.1.1.1 access-list 101 permit tcp any host 10.1.1.2
15
© 2001, Cisco Systems, Inc. QOS v1.0—9-15 Monitoring and Troubleshooting Policy Maps show policy-map [policy-map] Router# Router#show policy-map Policy Map Test Class Test1 Weighted Fair Queueing Bandwidth 100 (kbps) Max Threshold 64 (packets) Class Test2 Weighted Fair Queueing Bandwidth 200 (kbps) Max Threshold 64 (packets) Class Test3 Weighted Fair Queueing Bandwidth 300 (kbps) Max Threshold 64 (packets) Router#show policy-map Policy Map Test Class Test1 Weighted Fair Queueing Bandwidth 100 (kbps) Max Threshold 64 (packets) Class Test2 Weighted Fair Queueing Bandwidth 200 (kbps) Max Threshold 64 (packets) Class Test3 Weighted Fair Queueing Bandwidth 300 (kbps) Max Threshold 64 (packets)
16
© 2001, Cisco Systems, Inc. QOS v1.0—9-16 Monitoring and Troubleshooting Policy Maps (cont.) show policy-map interface [intf] {input | output} Router# Router#show policy-map interface FastEthernet0/0 output FastEthernet0/0 Service-policy output: Test (1101) Class-map: Test1 (match-all) (1103/3) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: access-group 101 (1107) Match: access-group 102 (1111) Match: protocol http (1115) Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth 100 (kbps) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0... Class-map: class-default (match-any) (1143/0) 25 packets, 19310 bytes 5 minute offered rate 1000 bps, drop rate 0 bps Match: any (1147) Router#show policy-map interface FastEthernet0/0 output FastEthernet0/0 Service-policy output: Test (1101) Class-map: Test1 (match-all) (1103/3) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: access-group 101 (1107) Match: access-group 102 (1111) Match: protocol http (1115) Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth 100 (kbps) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0... Class-map: class-default (match-any) (1143/0) 25 packets, 19310 bytes 5 minute offered rate 1000 bps, drop rate 0 bps Match: any (1147)
17
© 2001, Cisco Systems, Inc. QOS v1.0—9-17 Summary Upon completing this lesson, you should be able to: Describe and configure policy maps List all the QoS mechanisms currently available in the MQC Monitor and troubleshoot policy maps
18
© 2001, Cisco Systems, Inc. QOS v1.0—9-18 Lesson Review 1.What are the benefits of using the MQC? 2.How many classes can be used for one service policy?
19
Class-based Weighted Fair Queuing © 2001, Cisco Systems, Inc. QOS v1.0—9-19
20
© 2001, Cisco Systems, Inc. QOS v1.0—9-20 Objectives Upon completing this lesson, you will be able to: Describe class-based weighted fair queuing (CBWFQ) Configure CBWFQ Monitor and troubleshoot CBWFQ
21
© 2001, Cisco Systems, Inc. QOS v1.0—9-21 Class-Based Weighted Fair Queuing Class-based weighted fair queuing (CBWFQ) is a mechanism that is used to guarantee bandwidth to classes. CBWFQ extends the standard WFQ functionality to provide support for user-defined traffic classes: –Classes are based on user-defined match criteria. –Packets satisfying the match criteria for a class constitute the traffic for that class. A queue is reserved for each class, and traffic belonging to a class is directed to that class queue.
22
© 2001, Cisco Systems, Inc. QOS v1.0—9-22 CB-WFQ Up to 64 classes (class maps) and one default class CBWFQ Hardware Queuing System Class 1? Queue 1 CBWFQ Scheduler Interface Forwarded Packets Hardware Q Tail drop Class 2? Queue 2Tail drop Class-Default? Default QueueTail drop
23
© 2001, Cisco Systems, Inc. QOS v1.0—9-23 CBWFQ Classification Classification uses class-maps. The availability of certain classification options depends on the Cisco IOS version. Some classification options depend on the type of interface and encapsulation where the service policy is used. For example: –Matching on Frame Relay DE bits can be used only on interfaces with Frame Relay encapsulation. –Matching on MPLS experimental bits has no effect if MPLS is not enabled. –Matching on ISL priority bits has no effect if ISL is not used.
24
© 2001, Cisco Systems, Inc. QOS v1.0—9-24 CBWFQ Insertion Policy Each queue has a maximum number of packets that it can hold (queue size). The default maximum queue size is 64. After a packet is classified to one of the queues, the router will enqueue the packet if the queue limit has not been reached (tail drop within each class). WRED can be used in combination with CBWFQ to prevent congestion of the class.
25
© 2001, Cisco Systems, Inc. QOS v1.0—9-25 CBWFQ Scheduling CBWFQ guarantees bandwidth according to weights assigned to traffic classes. Weights can be defined by specifying: –Bandwidth (in kbps) –Percentage of bandwidth (percentage of configured interface bandwidth) –Percentage of available bandwidth One service policy cannot have mixed types of weights. The show interface command can be used to display the available bandwidth.
26
© 2001, Cisco Systems, Inc. QOS v1.0—9-26 Available Bandwidth Available bandwidth is calculated according to this formula: BW avail = BW * MaxReservable – SUM(all fixed guarantees) Configured using the interface bandwidth command Configured using the interface max-reserved-bandwidth command 75% is the default value Configured using the interface max-reserved-bandwidth command 75% is the default value Sum of all fixed guarantees using CBWFQ, CBLLQ, IP RTP Prioritization
27
© 2001, Cisco Systems, Inc. QOS v1.0—9-27 Available Bandwidth Example 1 Ethernet interface uses a default bandwidth of 10,000 (kbps) and WFQ: BW avail = BW * MaxReservable – SUM(all fixed guarantees) BW avail = 10000 kbps * 75% – 0 kbps = 7500 kbps Router#show interface Ethernet 0/0 Ethernet0/0 is up, line protocol is up Hardware is AmdP2, address is 00b0.64e2.2860 (bia 00b0.64e2.2860) Internet address is 192.168.20.1 255.255.255.0 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:04, output 00:00:08, 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: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/0/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 7500 kilobits/sec... Router#show interface Ethernet 0/0 Ethernet0/0 is up, line protocol is up Hardware is AmdP2, address is 00b0.64e2.2860 (bia 00b0.64e2.2860) Internet address is 192.168.20.1 255.255.255.0 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:04, output 00:00:08, 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: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/0/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 7500 kilobits/sec...
28
© 2001, Cisco Systems, Inc. QOS v1.0—9-28 Available Bandwidth Example 2 Ethernet interface uses a default bandwidth of 10,000 (kbps) with WFQ: Maximum reservable bandwidth is set to 50% IP RTP Prioritization is used to guarantee 1 Mbps to VoIP BW avail = BW * MaxReservable – SUM(all fixed guarantees) BW avail = 10000 kbps * 50% – 1000 kbps = 4000 kbps interface Ethernet0/0 ip address 192.168.20.1 255.255.255.0 half-duplex max-reserved-bandwidth 50 fair-queue ip rtp priority 16384 16383 1000 interface Ethernet0/0 ip address 192.168.20.1 255.255.255.0 half-duplex max-reserved-bandwidth 50 fair-queue ip rtp priority 16384 16383 1000
29
© 2001, Cisco Systems, Inc. QOS v1.0—9-29 Available Bandwidth Example 2 (cont.) Router#show interface Ethernet0/0 Ethernet0/0 is up, line protocol is up Hardware is AmdP2, address is 00b0.64e2.2860 (bia 00b0.64e2.2860) Internet address is 192.168.20.1 255.255.255.0 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:04, output 00:00:06, 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: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 4000 kilobits/sec... Router#show interface Ethernet0/0 Ethernet0/0 is up, line protocol is up Hardware is AmdP2, address is 00b0.64e2.2860 (bia 00b0.64e2.2860) Internet address is 192.168.20.1 255.255.255.0 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:04, output 00:00:06, 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: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 4000 kilobits/sec...
30
© 2001, Cisco Systems, Inc. QOS v1.0—9-30 Configuring CBWFQ bandwidth Router(config-pmap-c)# Allocate a fixed amount of bandwidth to a class. Set the value in kbps. bandwidth percent percent Router(config-pmap-c)# Allocate a percentage of bandwidth to a class. The configured (or default) interface bandwidth is used to calculate the guaranteed bandwidth. bandwidth remaining percent percent Router(config-pmap-c)# Allocate a percentage of available bandwidth to a class.
31
© 2001, Cisco Systems, Inc. QOS v1.0—9-31 Configuring CBWFQ (cont.) queue-limit Router(config-pmap-c)# Set the maximum number of packets this queue can hold The default maximum is 64 Sets the discard threshold in the “class-default” if flow-based WFQ is used fair-queue [dynamic-queues] Router(config-pmap-c)# The “class-default” class can be configured to use flow-based WFQ WFQ can be configured with 16 to 4096 dynamic queues
32
© 2001, Cisco Systems, Inc. QOS v1.0—9-32 CBWFQ Example 1 policy-map Policy1 class Class1 bandwidth 2000 class Class2 bandwidth 2000 ! interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 duplex auto speed 10 max-reserved-bandwidth 80 service-policy output Policy1 ip rtp priority 16384 16383 1000 ! policy-map Policy1 class Class1 bandwidth 2000 class Class2 bandwidth 2000 ! interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 duplex auto speed 10 max-reserved-bandwidth 80 service-policy output Policy1 ip rtp priority 16384 16383 1000 ! BW avail = 10000 kbps * 80% - (2000+2000+1000) kbps = 3000 kbps
33
© 2001, Cisco Systems, Inc. QOS v1.0—9-33 CBWFQ Example 2 policy-map Policy1 class Class1 bandwidth percent 20 class Class2 bandwidth percent 20 ! interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 duplex auto speed 10 max-reserved-bandwidth 80 service-policy output Policy1 ip rtp priority 16384 16383 1000 ! policy-map Policy1 class Class1 bandwidth percent 20 class Class2 bandwidth percent 20 ! interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 duplex auto speed 10 max-reserved-bandwidth 80 service-policy output Policy1 ip rtp priority 16384 16383 1000 ! BW avail = 10000 kbps * 80% - (10000*(20%+20%)+1000) kbps = 3000 kbps
34
© 2001, Cisco Systems, Inc. QOS v1.0—9-34 CBWFQ Examples 1 and 2 Router#show interface fastethernet 0/0 FastEthernet0/0 is up, line protocol is up Hardware is AmdFE, address is 0030.8546.aa00 (bia 0030.8546.aa00) Internet address is 10.1.1.1/24 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Half-duplex, 10Mb/s, 100BaseTX/FX ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:00, output 00:00:09, 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: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 2/2 (allocated/max allocated) Available Bandwidth 3000 kilobits/sec... Router#show interface fastethernet 0/0 FastEthernet0/0 is up, line protocol is up Hardware is AmdFE, address is 0030.8546.aa00 (bia 0030.8546.aa00) Internet address is 10.1.1.1/24 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Half-duplex, 10Mb/s, 100BaseTX/FX ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:00, output 00:00:09, 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: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 2/2 (allocated/max allocated) Available Bandwidth 3000 kilobits/sec...
35
© 2001, Cisco Systems, Inc. QOS v1.0—9-35 CBWFQ Example 3 policy-map Policy1 class Class1 bandwidth remaining percent 20 class Class2 bandwidth remaining percent 20 ! interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 duplex auto speed 10 max-reserved-bandwidth 80 service-policy output Policy1 ip rtp priority 16384 16383 1000 ! policy-map Policy1 class Class1 bandwidth remaining percent 20 class Class2 bandwidth remaining percent 20 ! interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 duplex auto speed 10 max-reserved-bandwidth 80 service-policy output Policy1 ip rtp priority 16384 16383 1000 ! BW avail = 10000 kbps * 80% - 1000 kbps = 7000 kbps
36
© 2001, Cisco Systems, Inc. QOS v1.0—9-36 CBWFQ Example 3 (cont.) Router#show interface fastethernet 0/0 FastEthernet0/0 is up, line protocol is up Hardware is AmdFE, address is 0030.8546.aa00 (bia 0030.8546.aa00) Internet address is 10.1.1.1/24 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Half-duplex, 10Mb/s, 100BaseTX/FX ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:00, output 00:00:03, 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: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 2/2 (allocated/max allocated) Available Bandwidth 7000 kilobits/sec... Router#show interface fastethernet 0/0 FastEthernet0/0 is up, line protocol is up Hardware is AmdFE, address is 0030.8546.aa00 (bia 0030.8546.aa00) Internet address is 10.1.1.1/24 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation ARPA, loopback not set Keepalive set (10 sec) Half-duplex, 10Mb/s, 100BaseTX/FX ARP type: ARPA, ARP Timeout 04:00:00 Last input 00:00:00, output 00:00:03, 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: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/1/256 (active/max active/max total) Reserved Conversations 2/2 (allocated/max allocated) Available Bandwidth 7000 kilobits/sec...
37
© 2001, Cisco Systems, Inc. QOS v1.0—9-37 Monitoring and Troubleshooting CBWFQ show policy-map interface [intf] Router# Displays parameters and statistics of CBWFQ Router#show policy-map interface FastEthernet0/0 Service-policy output: Policy1 Class-map: Class1 (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth remaining 20 (%) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 Class-map: class-default (match-any) 42 packets, 4439 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Router#show policy-map interface FastEthernet0/0 Service-policy output: Policy1 Class-map: Class1 (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth remaining 20 (%) Max Threshold 64 (packets) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 Class-map: class-default (match-any) 42 packets, 4439 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any
38
© 2001, Cisco Systems, Inc. QOS v1.0—9-38 Monitoring and Troubleshooting CBWFQ show queueing fair Router# Displays queuing parameters on interfaces Router#show queueing fair Current fair queue configuration: Interface Discard Dynamic Reserved Link Priority threshold queues queues queues queues FastEthernet0/0 64 256 64 8 1 Serial0/0 64 32 0 8 1 Serial0/1 64 32 0 8 1 Router#show queueing fair Current fair queue configuration: Interface Discard Dynamic Reserved Link Priority threshold queues queues queues queues FastEthernet0/0 64 256 64 8 1 Serial0/0 64 32 0 8 1 Serial0/1 64 32 0 8 1 One queue is reserved for IP RTP Prioritization. CBWFQ reserves 64 queues in the WFQ system.
39
© 2001, Cisco Systems, Inc. QOS v1.0—9-39 Monitoring and Troubleshooting CB-DWFQ show queueing interface [intf] Router# Displays queuing parameters on a specific VIP-based interface c7500#show queueing interface serial 5/1/0 Interface Serial5/1/0 queueing strategy: VIP-based fair queueing Serial5/1/0 queue size 0 pkts output 0, wfq drops 0, nobuffer drops 0 WFQ: aggregate queue limit 0 max available buffers 0 Class 0: weight 50 limit 250 qsize 0 pkts output 0 drops 0 Class 23: weight 30 limit 150 qsize 0 pkts output 0 drops 0 Class 24: weight 20 limit 100 qsize 0 pkts output 0 drops 0 c7500#show queueing interface serial 5/1/0 Interface Serial5/1/0 queueing strategy: VIP-based fair queueing Serial5/1/0 queue size 0 pkts output 0, wfq drops 0, nobuffer drops 0 WFQ: aggregate queue limit 0 max available buffers 0 Class 0: weight 50 limit 250 qsize 0 pkts output 0 drops 0 Class 23: weight 30 limit 150 qsize 0 pkts output 0 drops 0 Class 24: weight 20 limit 100 qsize 0 pkts output 0 drops 0
40
© 2001, Cisco Systems, Inc. QOS v1.0—9-40 Summary Upon completing this lesson, you should be able to: Describe class-based weighted fair queuing (CBWFQ) Configure CBWFQ Monitor and troubleshoot CBWFQ
41
© 2001, Cisco Systems, Inc. QOS v1.0—9-41 Lesson Review 1.What type of guarantee does CBWFQ provide? 2.Which DiffServ PHB can be implemented using CBWFQ? 3.What configuration steps are needed to configure CBWFQ?
42
Class-based WRED © 2001, Cisco Systems, Inc. QOS v1.0—9-42
43
© 2001, Cisco Systems, Inc. QOS v1.0—9-43 Objectives Upon completing this lesson, you will be able to: Describe class-based weighted random early detection (CB-WRED) Configure CB-WRED Monitor and troubleshoot CB-WRED
44
© 2001, Cisco Systems, Inc. QOS v1.0—9-44 Class-Based WRED Class-based WRED can be used in combination with CBWFQ. Using CBWFQ with WRED allows the implementation of DiffServ’s assured forwarding PHB. The class-based configuration of WRED is identical to standalone WRED. Flow-based WRED is not available with the Modular QoS CLI.
45
© 2001, Cisco Systems, Inc. QOS v1.0—9-45 RED Profile WRED starts randomly dropping packets when the average queue size is above the minimum threshold. Average Queue Size Drop Probability 10% 100% 20 40 Minimum Threshold Maximum Threshold Maximum Drop Probability Maximum Drop Probability No dropRandom dropFull drop
46
© 2001, Cisco Systems, Inc. QOS v1.0—9-46 RED Modes RED has three modes: –No drop: when the average queue size is between 0 and the minimum threshold –Random drop: when the average queue size is between the minimum and the maximum threshold –Full drop (tail drop): when the average queue size is at maximum threshold or above Random drop should prevent congestion (prevent tail drops).
47
© 2001, Cisco Systems, Inc. QOS v1.0—9-47 WRED Building Blocks IP Packet WRED Calculate Average Queue Size Calculate Average Queue Size FIFO Queue Select WRED Profile Select WRED Profile Current Queue Size IP Precedence or DSCP Minimum threshold Maximum threshold Mark probability Denominator Queue Full? Queue Full? No Yes Tail DropRandom Drop
48
© 2001, Cisco Systems, Inc. QOS v1.0—9-48 Weighted Random Early Detection WRED uses a different RED profile for each weight. Each profile is identified by: –Minimum threshold –Maximum threshold –Maximum drop probability Weight can be: –IP Precedence (8 profiles) –DSCP (64 profiles) WRED drops less important packets more aggressively than more important packets.
49
© 2001, Cisco Systems, Inc. QOS v1.0—9-49 WRED Profiles WRED profiles can be manually set. WRED has 8 default value sets for IP Precedence–based WRED. WRED has 64 default value sets for DSCP-based WRED. Average Queue Size Drop Probability 10% 100% 20 40 10
50
© 2001, Cisco Systems, Inc. QOS v1.0—9-50 IP Precedence and Class Selector Profiles Average Queue Size Drop Probability 10% 100% 2040 RSVP 01234567 2224262831333537 IP Precedence
51
© 2001, Cisco Systems, Inc. QOS v1.0—9-51 DSCP-Based WRED (Expedited Forwarding) Average Queue Size Drop Probability 10% 100% 2040 EF 36
52
© 2001, Cisco Systems, Inc. QOS v1.0—9-52 DSCP-Based WRED (Assured Forwarding) Average Queue Size Drop Probability 10% 100% 2040 AF High Drop 322428 AF Medium Drop AF Low Drop
53
© 2001, Cisco Systems, Inc. QOS v1.0—9-53 Configuring WRED random-detect Router(config-pmap-c)# Enables IP Precedence–based WRED in the selected class within the service policy configuration mode Default service profile is used
54
© 2001, Cisco Systems, Inc. QOS v1.0—9-54 Changing the WRED Profile random-detect precedence precedence min-threshold max-threshold mark-prob-denominator Router(config-pmap-c)# Changes RED profile for specified IP Precedence value Packet drop probability at maximum threshold is 1 / mark-prob-denominator nonweighted RED is achieved by using the same RED profile for all precedence values
55
© 2001, Cisco Systems, Inc. QOS v1.0—9-55 Changing WRED Sensitivity to Bursts random-detect exponential-weighting-constant n Router(config-pmap-c)# WRED takes the average queue size to determine the current WRED mode (no drop, random drop, full drop). High values of n allow short bursts. Low values of n make WRED more burst-sensitive. The default value (9) should be used in most scenarios. The average output queue size with n=9 is average t+1 = average t * 0.998 + queue_size t * 0.002 Current Queue Size Previous Average Queue Size New Average Queue Size
56
© 2001, Cisco Systems, Inc. QOS v1.0—9-56 Configuring DSCP-Based WRED random-detect {prec-based | dscp-based} Router(config-pmap-c)# Selects WRED mode Precedence-based WRED is the default mode DSCP-based command uses 64 profiles
57
© 2001, Cisco Systems, Inc. QOS v1.0—9-57 Changing the WRED Profile random-detect dscp dscp min-threshold max- threshold mark-prob-denominator Router(config-pmap-c)# Changes RED profile for specified DSCP value Packet drop probability at maximum threshold is 1 / mark-prob-denominator
58
© 2001, Cisco Systems, Inc. QOS v1.0—9-58 CBWFQ with WRED Example 1 Enable CBWFQ to prioritize traffic according to these requirements: –Class Gold is marked with IP Precedence values 3 and 4 (3 is high drop, 4 is low drop) and should get 30% of interface bandwidth –Class Silver is marked with IP Precedence values 1 and 2 (1 is high drop, 2 is low drop) and should get 20% of interface bandwidth –All other traffic should be per-flow fair-queued Use differentiated WRED to prevent congestion in all three classes (try to set up your own WRED profiles for Gold and Silver).
59
© 2001, Cisco Systems, Inc. QOS v1.0—9-59 CBWFQ with WRED Example 1 (cont.) class-map Gold match ip precedence 3 4 ! class-map Silver match ip precedence 1 2 ! policy-map Policy1 class Gold bandwidth percent 30 random-detect random-detect precedence 3 20 40 10 random-detect precedence 4 30 40 10 class Silver bandwidth percent 20 random-detect random-detect precedence 1 15 35 10 random-detect precedence 2 20 35 10 class class-default fair-queue random-detect ! class-map Gold match ip precedence 3 4 ! class-map Silver match ip precedence 1 2 ! policy-map Policy1 class Gold bandwidth percent 30 random-detect random-detect precedence 3 20 40 10 random-detect precedence 4 30 40 10 class Silver bandwidth percent 20 random-detect random-detect precedence 1 15 35 10 random-detect precedence 2 20 35 10 class class-default fair-queue random-detect !
60
© 2001, Cisco Systems, Inc. QOS v1.0—9-60 CBWFQ with WRED Example 2 Use the QoS design from the previous example. Implement it using DSCP: –Class Gold is using AF1. –Class Silver is using AF2. Make sure that the new configurations still conform to the design and implementation from the previous example.
61
© 2001, Cisco Systems, Inc. QOS v1.0—9-61 CBWFQ with WRED Example 2 class-map Gold match ip dscp af11 af12 af13 cs3 cs4 ! class-map Silver match ip dscp af21 af22 af23 cs1 cs2 ! policy-map Policy1 class Gold bandwidth percent 30 random-detect dscp-based random-detect dscp af11 30 40 10 random-detect dscp af12 25 40 10 random-detect dscp af13 20 40 10 random-detect dscp cs3 20 40 10 random-detect dscp cs4 30 40 10 class-map Gold match ip dscp af11 af12 af13 cs3 cs4 ! class-map Silver match ip dscp af21 af22 af23 cs1 cs2 ! policy-map Policy1 class Gold bandwidth percent 30 random-detect dscp-based random-detect dscp af11 30 40 10 random-detect dscp af12 25 40 10 random-detect dscp af13 20 40 10 random-detect dscp cs3 20 40 10 random-detect dscp cs4 30 40 10 class Silver bandwidth percent 20 random-detect dscp-based random-detect dscp af11 25 35 10 random-detect dscp af12 20 35 10 random-detect dscp af13 15 35 10 random-detect dscp cs3 15 35 10 random-detect dscp cs4 25 35 10 class class-default fair-queue random-detect dscp-based ! class Silver bandwidth percent 20 random-detect dscp-based random-detect dscp af11 25 35 10 random-detect dscp af12 20 35 10 random-detect dscp af13 15 35 10 random-detect dscp cs3 15 35 10 random-detect dscp cs4 25 35 10 class class-default fair-queue random-detect dscp-based !
62
© 2001, Cisco Systems, Inc. QOS v1.0—9-62 Monitoring and Troubleshooting CB-WRED Router#show policy-map interface fastEthernet 0/0 FastEthernet0/0 Service-policy output: Policy1 Class-map: Gold (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: ip precedence 3 4 Match: ip dscp 10 12 14 24 32 Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth 30 (%) Bandwidth 3000 (kbps) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 exponential weight: 9 mean queue depth: 0 Dscp Random drop Tail drop Minimum Maximum Mark (Prec) pkts/bytes pkts/bytes threshold threshold probability 0(0) 0/0 0/0 20 40 1/10 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... Router#show policy-map interface fastEthernet 0/0 FastEthernet0/0 Service-policy output: Policy1 Class-map: Gold (match-all) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: ip precedence 3 4 Match: ip dscp 10 12 14 24 32 Weighted Fair Queueing Output Queue: Conversation 265 Bandwidth 30 (%) Bandwidth 3000 (kbps) (pkts matched/bytes matched) 0/0 (depth/total drops/no-buffer drops) 0/0/0 exponential weight: 9 mean queue depth: 0 Dscp Random drop Tail drop Minimum Maximum Mark (Prec) pkts/bytes pkts/bytes threshold threshold probability 0(0) 0/0 0/0 20 40 1/10 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...
63
© 2001, Cisco Systems, Inc. QOS v1.0—9-63 Summary Upon completing this lesson, you should be able to: Describe class-based weighted random early detection (CB-WRED) Configure CB-WRED Monitor and troubleshoot CB-WRED
64
© 2001, Cisco Systems, Inc. QOS v1.0—9-64 Lesson Review 1.How does WRED supplement CBWFQ? 2.Can WRED be combined with flow-based WFQ in the default class? 3.Which two operational modes does WRED support? 4.How many profiles does WRED support?
65
Class-based Low-latency Queuing © 2001, Cisco Systems, Inc. QOS v1.0—9-65
66
© 2001, Cisco Systems, Inc. QOS v1.0—9-66 Objectives Upon completing this lesson, you will be able to: Describe class-based low-latency queuing (CBLLQ) Configure CBLLQ Monitor and troubleshoot CBLLQ
67
© 2001, Cisco Systems, Inc. QOS v1.0—9-67 Class-Based Low-Latency Queuing VoIP or other multimedia applications should not be fair-queued with other data. IP RTP Prioritization has a number of drawbacks: –It is not selective enough (filters only on UDP port range). –It does not support TCP or other protocols. –You can specify only overall high-priority traffic rate. Class-based low-latency queuing (CBLLQ) removes most of the drawbacks of IP RTP Prioritization.
68
© 2001, Cisco Systems, Inc. QOS v1.0—9-68 Low-Latency Queuing Queuing and Scheduling Forwarder Class Priority Class Priority No WFQ Scheduling Priority Queue (FIFO) Yes Class Default? No WFQ/FIFO Class N? Flow Queue (FIFO) Yes BW Policing Yes BW Policing
69
© 2001, Cisco Systems, Inc. QOS v1.0—9-69 CBLLQ Scheduling High-priority classes are guaranteed: –Low-latency propagation of packets –Bandwidth High-priority classes are also policed–they cannot exceed the guaranteed bandwidth.
70
© 2001, Cisco Systems, Inc. QOS v1.0—9-70 Configuring CBLLQ priority bandwidth Router(config-pmap-c)# Allocate a fixed amount of bandwidth (in kbps) to a class and ensure expedited forwarding. Traffic exceeding the specified bandwidth is dropped. priority percent percent Router(config-pmap-c)# Allocate a percentage of configured or default interface bandwidth to a class and ensure expedited forwarding. Traffic exceeding the specified bandwidth is dropped.
71
© 2001, Cisco Systems, Inc. QOS v1.0—9-71 CBLLQ Example class-map VoIP match ip precedence 5 ! class-map Gold match ip precedence 3 4 ! class-map Silver match ip precedence 1 2 ! policy-map Policy1 class VoIP priority percent 10 class Gold bandwidth percent 30 random-detect class Silver bandwidth percent 20 random-detect class class-default fair-queue random-detect ! class-map VoIP match ip precedence 5 ! class-map Gold match ip precedence 3 4 ! class-map Silver match ip precedence 1 2 ! policy-map Policy1 class VoIP priority percent 10 class Gold bandwidth percent 30 random-detect class Silver bandwidth percent 20 random-detect class class-default fair-queue random-detect !
72
© 2001, Cisco Systems, Inc. QOS v1.0—9-72 Monitoring and Troubleshooting CBLLQ Router#show policy-map interface fastethernet 0/0 FastEthernet0/0 Service-policy output: LLQ Class-map: LLQ (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Weighted Fair Queueing Strict Priority Output Queue: Conversation 264 Bandwidth 1000 (kbps) Burst 25000 (Bytes) (pkts matched/bytes matched) 0/0 (total drops/bytes drops) 0/0 Class-map: class-default (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Router#show policy-map interface fastethernet 0/0 FastEthernet0/0 Service-policy output: LLQ Class-map: LLQ (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Weighted Fair Queueing Strict Priority Output Queue: Conversation 264 Bandwidth 1000 (kbps) Burst 25000 (Bytes) (pkts matched/bytes matched) 0/0 (total drops/bytes drops) 0/0 Class-map: class-default (match-any) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any
73
© 2001, Cisco Systems, Inc. QOS v1.0—9-73 Summary Upon completing this lesson, you should be able to: Describe class-based low-latency queuing (CBLLQ) Configure CBLLQ Monitor and troubleshoot CBLLQ
74
© 2001, Cisco Systems, Inc. QOS v1.0—9-74 Lesson Review 1.What advantages does CBLLQ have over IP RTP Prioritization? 2.What guarantees does CBLLQ provide?
75
Class-based Policing © 2001, Cisco Systems, Inc. QOS v1.0—9-75
76
© 2001, Cisco Systems, Inc. QOS v1.0—9-76 Objectives Upon completing this lesson, you will be able to: Describe class-based policing Configure class-based policing Monitor and troubleshoot class-based policing
77
© 2001, Cisco Systems, Inc. QOS v1.0—9-77 Class-Based Policing Class-based policing is used to limit a traffic class to a configured bit rate. It uses a token bucket model to measure the arrival rate of packets. Class-based policing is an improved version of the committed access rate (CAR) mechanism. Class-based policing is configured using the Modular QoS CLI.
78
© 2001, Cisco Systems, Inc. QOS v1.0—9-78 How Do Routers Measure Traffic Rate? Routers use the token bucket mathematical model to keep track of packet arrival rate. The Token Bucket model is used whenever a new packet is processed. The return value is conform or exceed. Bandwidth Time Link Bandwidth Rate Limit Exceeding Traffic Conforming Traffic
79
© 2001, Cisco Systems, Inc. QOS v1.0—9-79 700 Token Bucket 500 bytes Conform Action
80
© 2001, Cisco Systems, Inc. QOS v1.0—9-80 200 Token Bucket (cont.) 300 bytes Exceed Action 300 bytes
81
© 2001, Cisco Systems, Inc. QOS v1.0—9-81 Token Bucket B c is normal burst size (specifies sustained rate). B e is excess burst size (specifies length of burst). BeBe B c of tokens is added every T c [ms] T c = B c / CIR Time Link Use TcTc 2*T c 3*T c 4*T c 5*T c BcBc BcBc BcBc BcBc BcBc BcBc Link BW Average BW (CIR) BeBe
82
© 2001, Cisco Systems, Inc. QOS v1.0—9-82 Class-Based Policing CAR uses one single token bucket to determine if a packet conforms to or exceeds the bit-rate policy. Class-based policing uses one or two token buckets to determine if a packet: –Conforms–is within the average bit rate –Exceeds–exceeds the average bit rate but is within the allowed excess burst –Violates–exceeds both the average bit rate and the allowed excess burst (optional)
83
© 2001, Cisco Systems, Inc. QOS v1.0—9-83 Class-Based Policing Actions A packet can conform, exceed, or violate the rate limit. In response, the policer can take one of these actions: –Transmit –Drop –Set IP Precedence and transmit –Set IP DSCP and transmit –Set QoS group and transmit –Set MPLS experimental bits and transmit –Set Frame Relay DE bit and transmit –Set ATM CLP bit and transmit
84
© 2001, Cisco Systems, Inc. QOS v1.0—9-84 Single Token Bucket with Class-Based Policing The packet conforms to the policy if the size of the packet is less than or equal to the number of tokens in the token bucket. 700 BeBe 500 bytes Conform Action 700
85
© 2001, Cisco Systems, Inc. QOS v1.0—9-85 Single Token Bucket with Class-Based Policing (cont.) The packet exceeds the policy if the size of the packet is more than the number of tokens in the token bucket. 200 BeBe 300 bytes Exceed Action
86
© 2001, Cisco Systems, Inc. QOS v1.0—9-86 Double Token Bucket with Class-Based Policing The packet conforms to the policy if the size of the packet is less than or equal to the number of tokens in the first token bucket. 700400 BcBc BeBe 500 bytes Conform Action 700
87
© 2001, Cisco Systems, Inc. QOS v1.0—9-87 Double Token Bucket with Class-Based Policing (cont.) The packet exceeds the policy if the size of the packet is more than the number of tokens in the first token bucket and less or equal to the number of tokens in the second token bucket. 200400 BcBc BeBe 300 bytes Exceed Action 400
88
© 2001, Cisco Systems, Inc. QOS v1.0—9-88 Double Token Bucket with Class-Based Policing (cont.) The packet violates the policy if the size of the packet is more than the number of tokens in the first and the second token bucket. 200100 BcBc BeBe 400 bytes Violate Action
89
© 2001, Cisco Systems, Inc. QOS v1.0—9-89 Refilling the Token Buckets TB 1 TB 2 Add tokens at the configured bit rate Excess spills over into the second token bucket The number of tokens that have to be added is actually calculated every time a new packet has to be processed: TB 1 = min(B C, TB 1 + ( T now - T LastPacket ) * BitRate / 8) BcBc BeBe Time of the last packet [seconds] Time now [seconds] New size of the token bucket Previous size of the token bucket
90
© 2001, Cisco Systems, Inc. QOS v1.0—9-90 Configuring Class-Based Policing police avg-rate [B C [B E ]] [conform-action [action] [exceed-action [action] [violate-action [action]]]] Router(config-pmap-c)# avg-rate – traffic rate in bps (8.000 to 200.000.000) B C – normal burst sets the size of the first token bucket in bytes (default is 1500 or avg-rate/32, whatever is higher) B E – excess burst sets the size of the second token bucket in bytes (equals B C if not configured) action – can be: –transmit (default conform action) –drop (default exceed and violate action) –set-prec-transmit ip-precedence –set-dscp-transmit dscp –set-qos-transmit qos-group –set-mpls-exp-transmit mple-exp –set frde-transmit –set-clp-transmit
91
© 2001, Cisco Systems, Inc. QOS v1.0—9-91 Class-Based Policing Example The customer can locate a server at service provider premises (switched LAN). Class-based policing is used to limit the amount of traffic that the web server can generate (more flexible per-bandwidth pricing). Unknown traffic is rate-limited to 64 kbps to allow remote configuration of new servers.
92
© 2001, Cisco Systems, Inc. QOS v1.0—9-92 Class-Based Policing Example class-map www.acme.com match source-address mac 000d.dddf.0480 ! class-map www.void.com match source-address mac 000d.dddc.ad21 ! policy-map ServerFarm class www.acme.com police 128000 conform-action transmit exceed-action drop class www.void.com police 256000 conform-action transmit exceed-action drop class class-default police 64000 ! interface FastEthernet 0/0 service-policy input ServerFarm ! class-map www.acme.com match source-address mac 000d.dddf.0480 ! class-map www.void.com match source-address mac 000d.dddc.ad21 ! policy-map ServerFarm class www.acme.com police 128000 conform-action transmit exceed-action drop class www.void.com police 256000 conform-action transmit exceed-action drop class class-default police 64000 ! interface FastEthernet 0/0 service-policy input ServerFarm !
93
© 2001, Cisco Systems, Inc. QOS v1.0—9-93 Monitoring and Troubleshooting Class-Based Policing Router#show policy interface fastethernet 0/0 FastEthernet0/0 Service-policy input: ServerFarm (1207) Class-map: www.acme.com (match-all) (1209/6) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: ip precedence 4 (1213) Match: source-address mac 000D.DDDF.0480 (1217) police: 128000 bps, 4000 limit, 4000 extended limit conformed 0 packets, 0 bytes; action: transmit exceeded 0 packets, 0 bytes; action: drop conformed 0 bps, exceed 0 bps violate 0 bps... Class-map: class-default (match-any) (1229/0) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any (1233) police: 64000 bps, 2000 limit, 2000 extended limit conformed 0 packets, 0 bytes; action: transmit exceeded 0 packets, 0 bytes; action: drop conformed 0 bps, exceed 0 bps violate 0 bps... Router#show policy interface fastethernet 0/0 FastEthernet0/0 Service-policy input: ServerFarm (1207) Class-map: www.acme.com (match-all) (1209/6) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: ip precedence 4 (1213) Match: source-address mac 000D.DDDF.0480 (1217) police: 128000 bps, 4000 limit, 4000 extended limit conformed 0 packets, 0 bytes; action: transmit exceeded 0 packets, 0 bytes; action: drop conformed 0 bps, exceed 0 bps violate 0 bps... Class-map: class-default (match-any) (1229/0) 0 packets, 0 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any (1233) police: 64000 bps, 2000 limit, 2000 extended limit conformed 0 packets, 0 bytes; action: transmit exceeded 0 packets, 0 bytes; action: drop conformed 0 bps, exceed 0 bps violate 0 bps...
94
© 2001, Cisco Systems, Inc. QOS v1.0—9-94 Summary Upon completing this lesson, you should be able to: Describe class-based policing Configure class-based policing Monitor and troubleshoot class-based policing
95
© 2001, Cisco Systems, Inc. QOS v1.0—9-95 Lesson Review 1.What do CAR and class-based policing do? 2.What are the main differences between CAR and class-based policing? 3.Which marking options does class-based policing support? 4.Which actions does class-based policing support?
96
Class-based Shaping © 2001, Cisco Systems, Inc. QOS v1.0—9-96
97
© 2001, Cisco Systems, Inc. QOS v1.0—9-97 Objectives Upon completing this lesson, you will be able to: Describe class-based shaping Configure class-based shaping Monitor and troubleshoot class-based shaping
98
© 2001, Cisco Systems, Inc. QOS v1.0—9-98 Class-Based Shaping Use of class-based shaping is similar to that of class-based policing Class-Based Shaping is used to rate-limit packets Delays exceeding packets rather than dropping them Has no marking capabilities Class-based shaping is a version of generic traffic shaping (GTS) using the Modular QoS CLI
99
© 2001, Cisco Systems, Inc. QOS v1.0—9-99 Class-Based Shaping Router periodically updates the token bucket (every T C ) and checks if any packets can be forwarded to the main queue. T C = B C / BitRate Shaping Queue N Token Bucket Enough Tokens? packet Check Shaping Queue N Forward Yes Do Nothing No Packet Size Tokens Queue N B C +B E Add Tokens
100
© 2001, Cisco Systems, Inc. QOS v1.0—9-100 Refilling the Token Bucket Class-based shaping has two shaping methods: –Shaping to the configured average rate (adds B C tokens every T C ) –Shaping to the peak rate (adds B C +B E tokens every T C ) Average rate is forwarding packets at the configured average rate with allowed bursting up to B E when there are extra tokens available Peak rate is forwarding packets at the peak rate, which is calculated using this formula: PeakRate = AvgRate * (1+B E /B C )
101
© 2001, Cisco Systems, Inc. QOS v1.0—9-101 Configuring Class-Based Shaping shape {average | peak} bit-rate [B C [B E ]] Router(config-pmap-c)# B C and B E can be omitted to let the router select the optimal values. shape max-buffers queue-limit Router(config-pmap-c)# Set the maximum number of packets that can be stored in the shaping queue.
102
© 2001, Cisco Systems, Inc. QOS v1.0—9-102 Class-Based Shaping Frame Relay Adaptation shape adaptive min-rate Router(config-pmap-c)# Adapts the shaping rate when BECN bits are received Each BECN bit causes the shaping rate to be reduced to three-quarters of the previous rate but not below the min-rate This command has effect only if used on Frame Relay interfaces shape fecn-adapt Router(config-pmap-c)# Responds to FECN bits by creating test frames in the opposite direction with the BECN bit set
103
© 2001, Cisco Systems, Inc. QOS v1.0—9-103 Class-Based Shaping Example class-map Shape match access-group 123 ! policy-map ShapeAvg class Shape shape average 16000 1024 2048 ! policy-map ShapePeak class Shape shape peak 16000 1024 2048 ! interface Serial0/0 service-policy output ShapeAvg ! interface Serial0/1 service-policy output ShapePeak ! access-list 123 permit udp any any class-map Shape match access-group 123 ! policy-map ShapeAvg class Shape shape average 16000 1024 2048 ! policy-map ShapePeak class Shape shape peak 16000 1024 2048 ! interface Serial0/0 service-policy output ShapeAvg ! interface Serial0/1 service-policy output ShapePeak ! access-list 123 permit udp any any
104
© 2001, Cisco Systems, Inc. QOS v1.0—9-104 Monitoring and Troubleshooting Class-Based Shaping Router#show policy-map interface Serial0/0 Service-policy output: ShapeAvg Class-map: Shape (match-all) 782 packets, 728824 bytes 5 minute offered rate 24000 bps, drop rate 22000 bps Match: access-group 123 Traffic Shaping Target Byte Sustain Excess Interval Increment Adapt Rate Limit bits/int bits/int (ms) (bytes) Active 16000 384 1024 2048 64 128 - Queue Packets Bytes Packets Bytes Shaping Depth Delayed Delayed Active 64 135 125820 134 124888 yes Class-map: class-default (match-any) 9 packets, 3234 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any Router#show policy-map interface Serial0/0 Service-policy output: ShapeAvg Class-map: Shape (match-all) 782 packets, 728824 bytes 5 minute offered rate 24000 bps, drop rate 22000 bps Match: access-group 123 Traffic Shaping Target Byte Sustain Excess Interval Increment Adapt Rate Limit bits/int bits/int (ms) (bytes) Active 16000 384 1024 2048 64 128 - Queue Packets Bytes Packets Bytes Shaping Depth Delayed Delayed Active 64 135 125820 134 124888 yes Class-map: class-default (match-any) 9 packets, 3234 bytes 5 minute offered rate 0 bps, drop rate 0 bps Match: any
105
© 2001, Cisco Systems, Inc. QOS v1.0—9-105 Summary Upon completing this lesson, you should be able to: Describe class-based shaping Configure class-based shaping Monitor and troubleshoot class-based shaping
106
© 2001, Cisco Systems, Inc. QOS v1.0—9-106 Lesson Review 1.What are the main differences between class-based policing and class-based shaping? 2.What are the two class-based shaping methods?
107
Class-based Marking © 2001, Cisco Systems, Inc. QOS v1.0—9-107
108
© 2001, Cisco Systems, Inc. QOS v1.0—9-108 Objectives Upon completing this lesson, you will be able to: Describe class-based marking Configure class-based marking Monitor and troubleshoot class-based marking
109
© 2001, Cisco Systems, Inc. QOS v1.0—9-109 Class-Based Marking Class-based marking is an additional tool available with the Modular QoS CLI that allows static per-class marking of packets. It can be used to mark inbound or outbound packets. It can be combined with any other QoS feature on output. It can be combined with class-based policing on input.
110
© 2001, Cisco Systems, Inc. QOS v1.0—9-110 Class-Based Marking Packets can be marked with one of these markers: –IP Precedence –IP DSCP –QoS group –MPLS experimental bits –IEEE 802.1Q CoS bits or ISL priority bits –Frame Relay DE bit –ATM CLP bit
111
© 2001, Cisco Systems, Inc. QOS v1.0—9-111 Configuring IP Precedence Marking set ip precedence ip-precedence Router(config-pmap-c)# Mark IP packets with the specified IP Precedence value. IP Precedence can be set using a value (0 to 7) or a corresponding name (e.g., routine, priority, immediate). policy-map SetPrec class Class1 set ip precedence priority class Class2 set ip precedence flash class Class3 set ip precedence 5 ! policy-map SetPrec class Class1 set ip precedence priority class Class2 set ip precedence flash class Class3 set ip precedence 5 !
112
© 2001, Cisco Systems, Inc. QOS v1.0—9-112 Configuring IP DSCP Marking set ip dscp dscp Router(config-pmap-c)# Mark IP packets with the specified DSCP value. DSCP can be set using a value (0 to 63) or a corresponding name (e.g., af11, af12, af13, af21, ef, cs1, default). policy-map SetDSCP class Class1 set ip dscp af11 class Class2 set ip dscp af21 class Class3 set ip dscp ef ! policy-map SetDSCP class Class1 set ip dscp af11 class Class2 set ip dscp af21 class Class3 set ip dscp ef !
113
© 2001, Cisco Systems, Inc. QOS v1.0—9-113 Configuring QoS Group Marking set qos-group qos-group Router(config-pmap-c)# Mark packets with the specified QoS group value (0 to 99). policy-map SetQoS class Class1 set qos-group 1 class Class2 set qos-group 2 class Class3 set qos-group 3 ! policy-map SetQoS class Class1 set qos-group 1 class Class2 set qos-group 2 class Class3 set qos-group 3 !
114
© 2001, Cisco Systems, Inc. QOS v1.0—9-114 Configuring MPLS Marking set mpls experimental exp-bits Router(config-pmap-c)# Mark labeled packets with the specified value (0 to 7). MPLS marking can be used only on input. policy-map SetMPLS class Class1 qos-group 1 set mpls experimental 1 class Class2 qos-group 2 set mpls experimental 2 class Class3 qos-group 2 set mpls experimental 3 ! policy-map SetMPLS class Class1 qos-group 1 set mpls experimental 1 class Class2 qos-group 2 set mpls experimental 2 class Class3 qos-group 2 set mpls experimental 3 !
115
© 2001, Cisco Systems, Inc. QOS v1.0—9-115 Configuring LAN Marking set cos cos Router(config-pmap-c)# Mark frames with the specified value (0 to 7). The value applies to the class of service bits with the IEEE 802.1Q encapsulation or priority bits with the ISL encapsulation. The command can be used only on output LAN interfaces that are using one of the two mentioned encapsulations. policy-map SetCoS class Class1 set cos 1 class Class2 set cos 2 class Class3 set cos 3 ! policy-map SetCoS class Class1 set cos 1 class Class2 set cos 2 class Class3 set cos 3 !
116
© 2001, Cisco Systems, Inc. QOS v1.0—9-116 Configuring Frame Relay DE Marking set fr-de Router(config-pmap-c)# Mark packets with the Frame Relay discard eligibility (DE) bit value 1. Do not use the command to mark frames with the default value 0. The command can be used only on output Frame Relay interfaces. policy-map SetFR class Class1 set fr-de class Class2 class Class3 set fr-de ! policy-map SetFR class Class1 set fr-de class Class2 class Class3 set fr-de !
117
© 2001, Cisco Systems, Inc. QOS v1.0—9-117 Configuring ATM CLP Marking set atm-clp Router(config-pmap-c)# Mark cells of packets with the ATM cell loss priority (CLP) bit value 1. Do not use the command to mark cells with the default value 0. The command can be used only on output ATM interfaces. policy-map SetATM class Class1 set atm-clp class Class2 class Class3 set atm-clp ! policy-map SetATM class Class1 set atm-clp class Class2 class Class3 set atm-clp !
118
© 2001, Cisco Systems, Inc. QOS v1.0—9-118 Monitoring and Troubleshooting Class-Based Marking Router#show policy-map interface serial 0/0 Serial0/0 Service-policy input: SetMPLS (1837) Class-map: Class1 (match-any) (1839/12) 0 packets, 0 bytes 30 second offered rate 0 bps, drop rate 0 bps Match: qos-group 1 (1843) 0 packets, 0 bytes 30 second rate 0 bps QoS Set mpls experimental 1 Class-map: Class2 (match-any) (1847/13) 0 packets, 0 bytes 30 second offered rate 0 bps, drop rate 0 bps Match: qos-group 2 (1851) 0 packets, 0 bytes 30 second rate 0 bps QoS Set mpls experimental 2... Router#show policy-map interface serial 0/0 Serial0/0 Service-policy input: SetMPLS (1837) Class-map: Class1 (match-any) (1839/12) 0 packets, 0 bytes 30 second offered rate 0 bps, drop rate 0 bps Match: qos-group 1 (1843) 0 packets, 0 bytes 30 second rate 0 bps QoS Set mpls experimental 1 Class-map: Class2 (match-any) (1847/13) 0 packets, 0 bytes 30 second offered rate 0 bps, drop rate 0 bps Match: qos-group 2 (1851) 0 packets, 0 bytes 30 second rate 0 bps QoS Set mpls experimental 2...
119
© 2001, Cisco Systems, Inc. QOS v1.0—9-119 MQC Compatibility Matrix Police Shape Queue WRED Schedule Classify Output Forward Classify Input Mark Police Class-Based QoS mechanism Configuration command Supported directions Can be combined with these class-based mechanisms WFQbandwidthoutput WRED, shaping, policing, marking LLQpriorityoutput shaping, policing, marking WREDrandom-detectoutput WFQ, LLQ Policingpoliceinput/output WRED, shaping, WFQ, LLQ, marking Shapingshapeoutput WRED, policing, WFQ, LLQ, marking Markingsetinput/output WRED, policing, shaping, WFQ, LLQ
120
© 2001, Cisco Systems, Inc. QOS v1.0—9-120 Summary Upon completing this lesson, you should be able to: Describe class-based marking Configure class-based marking Monitor and troubleshoot class-based marking
121
© 2001, Cisco Systems, Inc. QOS v1.0—9-121 Lesson Review 1.Which parameters can be set using class- based marking? 2.Can class-based marking be used on input? 3.Can class-based marking be combined with any other QoS mechanisms?
122
© 2001, Cisco Systems, Inc. QOS v1.0—9-122 Module Summary Upon completing this module, you should be able to: Describe the policy part of the Modular QoS CLI Configure packet marking with the modular CLI Configure policing and shaping with the modular CLI Configure class-based WFQ with the modular CLI Configure congestion avoidance mechanisms (WRED) with the modular CLI Configure low-latency queuing Monitor and troubleshoot policy maps
123
© 2001, Cisco Systems, Inc. IP QoS Modular QoS CLI Service Policy-123
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.