QoS

Switches and routers will use best effort or FIFO (first in first out) to forward traffic. This can be an issue at times when some traffic is more sensitive such as voice traffic from VOIP phones.


QoS is a set of tools used to manage how routers and switches deal with traffic. 

Characteristics of traffic that we might want to plan for are:
  • Bandwidth
  • Delay
  • Jitter
  • Loss
Bandwidth is the amount of traffic that can be sent at once(speed).

Delay is the time it takes for a one-way trip to the destination.

Jitter is the variation of the one-way delay. For example, one trip taking 5ms and the next taking 20ms.

Loss is data packets that were dropped.

Types of Traffic

Voice and video

Interactive application

Non-interactive application

Voice and video are more susceptible to network issues such as jitter and delays.

Scavenger Traffic: scavenger traffic is traffic considered 


QoS Tools

Classifying and marking traffic to distinguish types.

Creating different queues for different traffic types.

Shaping and Policing to rate limit traffic.

Congestion Avoidance: managing packet loss.


Integrated Services (INTSERV)

Uses IP precedence.

Differentiated Services (DIFFSERV)

Uses DSCP markings (TOS bits)



QOS marking at layers

Layer 1: Tagging traffic coming in interfaces or sub-interfaces.

Layer 2: Marking with MAC address (frame) or COS bits (stripped at layer 3). (802.1p)

Layer 3: Making traffic at source/dest IPs and TOS bits or DSCP (6 Bits).

Layer 4: Marking traffic bases on types of traffic using ports.

Layer 7: NBAR, using applications to examine the type of traffic to mark traffic.


More advanced levels of classification incur more overhead for devices.


Shaping and Policing

Shaping is for when you want to control but allow traffic on the network. Things such as bandwidth limits and queues are used.

Generally applied to egress.

Default is FIFO

Policing is used to limit traffic, such as dropping traffic that you do not want or limiting its bandwidth with no queue.

Policing is applied to ingress.



Queuing

Three types exist.
  • Weighted Fair: Low bandwidth will get priority.
  • Class Based: Bandwidth guarantee based on classes
  • Priority: Generally, the same as class based but with a priority that gets to go first.

DSCP Markings

Backwards compatible with IP precedence

Class Selector: Higher is better

Drop Preference: Lower is better related to assured forwarding behavior(AF#)

Not used

1 1 1 1 1 1 1 1
7 6 5 4 3 2 1 0

Cisco has LLQ which is a "combo" of all of them

Congestion Avoidance

Dropping traffic in Queues to avoid congestion.

TCP is generally dropped first as it handles it better.


Basic QOS Config

The following steps are needed for a basic QOS setup.

  • Create a class-map and define traffic
  • Create a policy and treatment of that traffic.
  • Apply policies to interfaces either in or out.

Class map

(conf)#class-map "match type" "class-map-name"
(conf-cmap)#match "protocol(NVAR" "protocol-name"

Do matches for as many protocols as you like for the class-map. Multiple matches will require the "match-type" to be either match-all or match-any. If not given it will default to match-all.

This is an example with email:

(conf)#class-map "match-any" "EMAIL"
(conf-cmap)#match "protocol" "pop3"
(conf-cmap)#match "protocol" "imap"
(conf-cmap)#match "protocol" "smtp"
(conf-cmap)#match "protocol" "exchange"

Policy-map

(conf)#policy-map "policy map name"
(conf-pmap)#class "class-map-name"

This is where we configure policies on maps.

For example, we can set a DSCP level/ID


(conf-pmap-c)#"set" "dscp" "af12"


We can also set bandwidth. In this case meaning the minimum amount that this traffic is going to get and more if more is available. This is not a limit.


(conf-pmap-c)#"bandwidth" "Kb/s"

or

(conf-pmap-c)#"bandwidth" "percent" "10"


Using priority, we can set the maximum that is allowed to be used but will have priority(go first).

(conf-pmap-c)#"priority" "Kb/s"

Applying to an interface

(conf)# int "g0/0"
(conf-if)# "service-policy" "output" "Policy-map-name"

























Popular posts from this blog