Sei sulla pagina 1di 12

2018

QOS for
CCNA Students
By
Eng. Abeer Hosni
Introduction to QoS:
- QOS helps to ensure that the voice and video streams receive the propper level of
attention which ensures that the voice and video are of high quality.

- Due to voice codec, like sampling, voice frames are very small. They don’t require a lot of BW.
But voice is very sesitive for delay.

- Video frames are large in size. It consumes a lot of BW. But they are very sesitive to loss
causing the video to be choppy or stops for a second or two.

Buffers and Queues:


Buffer:
 It is a physical memory divided into pieces (millions of pieces).

 On routers, there is a buffer for routing table, ARP table, EIGRP
topology table and some for interfaces.

 Shared memory is also used by lots of other CPU processes.

Queue:
 It is any buffer used for QOS.

 On routers, it is a logical part of the shared memory buffer.

 On switches, each interface has its own memory which is used as
interface queue, making it a fast buffer but it can’t be extended as
the interface needs more space for data.

 Each interface has ingress queue and egress queue.

 For example. Assume that a fast ethernet interface sends data to a serial
interface which of course has a much more less buffer size. The router will
then allocate extra buffer space for the serial interface. When egress
traffic cannot immediately be transmitted, it is places in an egress queue.
What is affected by QOS?
 Bandwidth (For example, giving VOIP more bandwidth than other types
of traffic).

 Delay (For example, sending VOIP to the beginning of the queue).

 Jitter (QOS can reduce jitter).

 Loss (or drops) (Dropping less priority traffic if we have to).

Classification and Marking:


 
 Classification:

 Traffic must first be divided into classes. Each class of traffic will receive
the same type of QOS treatment.

 Most common ways of classifying traffic:

1- Addressing (Based on port number or destination network)

2- ACL

3- MAC address

4- Application signature (A certain size of the packet or the traffic body
has a specific URL or certain range of port numbers).

5- Markings (A downstream device has marked the traffic)

6- L2 classification.

7- L3 classification.

8- NBAR (Network-Based Application Recognition).
 
 Marking:

 Packets belonging to the same class marked on egress to allow for easier
classification by upstream devices.
L2 Classification:
 Ethernet frames contain no priority field unless they are carried on dot1q
or ISL trunks.

 ISL header (COS is 3 bits)

 Dot1q header (User priority is 3 bits)

 Default is 000 (routine traffic).

 L2 classification is point to pint only.

L3 Classification:
 Both IPv4 and IPv6 contain a byte used for indication priority of
the packet.

 For IPv4 it is TOS (Type of Service).

 For IPv6 it is Traffic Class.
TOS value in IPv4:
 Only 3 bits are used. That is why created DSCP to make use of other bits.

IP Precedence & DSCP:


 DSCP stand for Differentiated Service Code Point.

 DSCP uses 6 bits within TOS byte for QOS prioritization.

 CS (Class Selector) is mapped to IP precedence bits for compatibility.


 Ex: CS4 = 100 00000

 Ex: CS7 = 111 00000

 AF (Assured Forwarding), the highest the value, the lowest the priority.

 Ex: AF11 = 001 01 000 (001 is the IP precedence and 01 is the AF value)

 Ex: AF12 = 001 10 000

 Ex: AF13 = 001 11 000

 ECN stands for Explicit Congestion Notification and it is not used
for prioritize the data.

 Assume that an interface has 4 queues as follows:

 When there is congestion in the queue, the most droppable place is


CS1AF13 then CS1AF12 and so on. The lease droppable place is CS4AF11.

Exercise:
Express the following DSCP values as binary numbers (express the entire
TOS byte in binary):

 CS3 = 011 00000



 CS6 = 110 00000

 AF23 = 010 11 000

 AF41 = 100 01 000
 AF32 = 011 10 000

- For the third bit in the AF value, it is 0 by default. But if you want to use that
bit, it can be manually defined.

R1(config)#class-map TSHOOT

R1(config-cmap)#exit

R1(config)#policy-map ECST

R1(config-pmap)#class TSHOOT

R1(config-pmap-c)#set ip dscp ?

<0-63> Differentiated services codepoint value

- Configuring that value manually with an odd number will cause that value to be
1 not 0. If you configure that value manually, it will be binary represented not
using the previous method.

NBAR (Network-Based Application Recognition)


 Some protocols negotiate dynamic port numbers.

 NBAR examines the data payload.

 More CPU intensive than other classification features.

 Supports recognition of a large quantity of protocols.

 It can be used to match on a full URL name, or a word, or a phrase within
the URL.

 Most Cisco switches don’t support NBAR because their CPUs never see
the traffic.

Trust Boundaries:
 Some host devices may mark traffic upon creation.
 Default when QOS is enabled = untrusted.

Congestion Avoidance (Policing, Shaping and Markdown):


 Between the ISP and customer, there is a pre-defined contracted rate
called CIR.

 ISP will police ingress traffic. Traffic that is non-conforming is caught
by policer and dropped or marked down.

 Customer typically doesn’t want any traffic dropped (delay is better than
 drops), so shaping is done on egress interface leading to the ISP.
 
 Policing: anything is above that rate, drop it.
 
Shaping: anything is above that rate, store it in memory and delay it.

- To avoid congestion on the aggregation switch, the ISP will apply policing on
the ingress interfaces facing the customers.

- Classify traffic from each customer IP subnet.


- Police to CIR (10Mbps).

- The customer could configure shaping on the egress interfaces facing the ISP to
avoid dropping the data by the ISP. Traffic shaping will delay the data by
putting it in buffers.

- Most Cisco switches don’t support traffic shaping.

Congestion Avoidance (Pre-emptive queue drops):


- Sets of features to pre-emptively drop traffic within queues.

- Prevent queues from becoming saturated with low-priority traffic by


randomly dropping that traffic. Thus leaving a room in the queue for future,
high priority traffic.

1- Congestion avoidance within queues on switches:

 WTD (Weighted Tail Drop)



 WRED (Weighted random Early Detection)

2- Congestion avoidance within queues on routers:

 WRED (Weighted random Early Detection)



For WTD:

Once the buffer is 30% of its threshold,


packets with COS 0, 1and 2 will not enter the
queue and will be dropped before entering
the queue even if the 70% of the queue
might be empty.

Once the buffer is 100% of its threshold,


packets with COS 4, 5, 6 and 7 will not enter
the queue and will be dropped before
entering the queue.
 
For WRED:

Random packet drops at the minimum


threshold.

Increase in a linear format until the maximum


Threshold is reached.

After the maximum threshold is reached,


WRED drops 100% of all subsequent
packets received.

Congestion Management (Queuing and Scheduling):


 A set of QOS features that handle the queuing and scheduling of the
traffic.

 By enabling queuing, buffer is divided into blocks. For example, one of the
data and another for voice.

 Scheduling is to prioritize sending the data. For example, sending one
packet from the first queue then sending two packets from the
second queue. Or, sending all packets from the first queue then start
sending packets from the second queue.

 By default, queues are configured for FIFO.

 Congestion management techniques provide some control of the order of
transmission.
 
Queuing features:
1- FIFO (no congestion management)

2- WFQ (Weighted Fair Queuing)


3- LLC (Low Latency Queuing)

4- CBWFQ (Class Based Weighted Fair Queuing)


 
Scheduling features:
1- Round Robin (one packet- one packet)

2- Weighted Round Robin

3- LLC (Low Latency Queuing)

4- CBWFQ (Class Based Weighted Fair Queuing)

 Most Cisco routers enable WFQ when enabling QOS by default.



 For WFQ, the transmit queue is divided to a dynamic number of sections.
One for each flow of traffic. There is no way to predict the number of
dynamic queues. When a flow of traffic is finished, its queue is given to
another flow of traffic.

 The size of the queue in WFQ is dynamic too.

 Each section of the queue is assigned a weight value. According to the
weight value, number of packets is sent from each section.

 For CBWFQ, number of sections of the queue is configurable. The weight
value is configurable too. The admin has the choice to determine which
section will send its packets first.

Other telnet video voice

Weight=5 Weight=3 Weight=10 Weight=4

12Mbps 8Mbps 65Mbps 15Mbps


 The problem now is that the voice queue could fill up much more
than other queues. So LLC could be configured in this scenario.

 In LLC, the voice queue for example will be a special one “priority queue”.

The schedule will start first with the voice queue and makes sure that it is
always empty before start sending packets from other queues.

 LLC could end up to “queue starvation” for other queues. So be
very careful to the type of data in the priority queue.

Best wishes:
Abeer 

Potrebbero piacerti anche