QoS Crib Notes

These are my ‘crib notes’ that I’ve made to serve as a last minute refresher. Please forgive the grammer / spelling as I did not develop these notes with publishing in mind

QoS

*** Theory ****

  • Traffic Class: Traffic should be separated into queues. Should have a max bandwidth set as it should not eat all the bandwidth. Should have a min bandwidth to guarantee and should have prioritisation
  • Variable Length Delays:
    • Queuing delay – Time packet sits in exit queue before transmission
    • processing delay – Time from incoming queue to outgoing queue
  • Fixed Length Delays
    • Serialization Delay – Time it takes to put packet in hardware queue
    • Propagation Delay – Time it takes to send bits across the link (formula)
  • End to End Delay – sum or Queuing, processing, serialization and propagation delay and causes jitter for audio and video streams.
  • QoS Models
    • Best Effort – 1st in, 1st out.
    • IntServ – uses RSVP to reserve bandwidth in advance. Known as a signalling protocol. Not efficient as it waste bandwidth
    • DiffServ – uses Per Hop Behaviour (PHB). Every node makes a decision on the packet. More scalable and more preferred. Uses classification and marking
      • Classification – Identify certain types of traffic
      • Marking – Assigning a value to that class of traffic
  • Marking
    • CoS Value: Layer 2 marking, 3 bits = 8. Only applied on frames being trunked as no point in CoS for traffic that is local to that node i.e. switch. CoS markings are lost at each hop. There for copy CoS to ToS
    • IP Prec – Uses ToS value which is 8 bits. MSB, first 3 bits is the IP Prec
    • DSCP – ToS byte is referred as DiffServ and the first 6 bits makes up the DSCP. It is backward compatible with IP Prec via class selector, The AF bit defines four classes and the CS bit defines drop probability (3 = highest drop probability)
      • Expedited Forwarding (EF) – Ideal for voice and video
      • Assured Forwarding – noted as AFXX
        • 1st X = class number
        • 2nd X = CS Value
          • Class 1: AF11 (Low drop), AF12, AF13 (High drop)
          • Class 4: AF41, AF42, AF43
  • Ingress Interface
  • Queuing: Congestion management technique. What packet leaves the router first. Only 1 queuing scheme per interface
    • Bandwidth: Never assign more than 75% interface bandwidth
    • Queue Limit: Packets in queue before tail drop
  • FIFO – 1st in, 1st out. Default for greater than E1 speed.
  • Round Robin – No queue has priority. Round robin a packet from each queue
  • Weighted Round Robin – Like above, but can assign weight to a queue so more packets from that queue can be round robin. E.g. 2 packets from Q1 and 1 packet from Q3. No queue starvation in RR or WRR.
  • Priority Queuing: Suffer from queue starvation. Has 4 queues H, M , N (Default)  and L. Don’t have lots of traffic as high, otherwise lower queues will starve.
  • Weighted Fair Queuing – Default for serial interfaces running E1 or lower. WFQ does not use access lists. Packets handled based on flow. Flow can be;
    • Source and Dest IP / Port, Protocol Number, ToS

It gives priority to low-volume / small talker flow over high volume flows aka aggressive flows. Packets are dropped from high volume flows before low volume flows. WFQ dynamically builds and tear queues as needed. Max is 256 queues

  • Congestive Discard Threshold (CDT) – No. Of packets in queue before dropping it from high volume conversations.
  • WFQ will not work for: VI, loopback and diallers. Bridging or tunnelling, LAPB, X.25, SDLC
  • Class based WFQ – Create classes and place in own queue. The assign guarantee bandwidth. No risk of queue starvation. Up to 64 queues. Use either FIFO or WRED. Uses MQC
    • MQC – Modular Command Line
      • Access List – define interesting traffic
      • Class Map – Match Access List or other criteria
      • Policy Map – Assign QoS etc to class map
      • Service Policy output – Assign the Policy Map to the interface and direction
  • LLQ aka strict priority queue – Suitable for voice as it gives priority whereas CBWFQ etc don’t. It can be seen as extension of CBWFQ as it similar to setup. Uses priority command instead of bandwidth command.
  • NBAR: Identify flows on network and good to use for marking and classification. Uses PDLM to keep up with new definitions etc. Requires CEF and applies to interface only. Does not support non-IP traffic, packets created or destined for the local router, MPLS packets and fragments
  • Congestion Avoidance
    • Tail Drop – When the queue is fall, other packet entering the queue is dropped hence tail drop. Because of this, the sender realises the packets has been dropped and will throttle back it transmission as part of TCP detection & recovery. The sender gradually increases transmission. This leads to TCP Global Synchronisation
    • TCP Global Sync – Multiple senders will transmit at slow rate then fast rate in accordance to how full the queue is, the slow and fast typically is sync for all senders so link it either fully utilised or underutilised. To avoid this, we use RED or WRED
    • RED – Drop packets before the queue fills up, thereby avoiding tail drop that leads to TCP Sync issue. RED can drop at higher rate as the fuller the queue becomes. RED uses three values
      • Min threshold – When RED begins to drop packets
      • Max threshold – RED drops as many as it can
      • Mark Probability Denominator  – Value for how many packets can be dropped e.g. when the max threshold is met, drop 1 packet for every <MPD> packets
  • WRED – Same as RED, but uses IPrec /dscp values to determine which packets are dropped so it not totally random. Enable on interface, default is IPrec, weight is 9 and MPD is 10
  • Traffic Shaping – Friendly policy towards excess traffic. Good for bursty traffic. Applied only to outgoing interface
  • Traffic Policing – Packets are either dropped or re-marked. Set for incoming or outgoing interface
  • L2 Compression / L2 Payload Compression – uses stacker, predictor and msoft.
  • Header Compression (Done at the interface and one side must be active)
    • TCP – IP and TCP header is compressed. Use with CBWFQ for good data transmissions.
    • RTP – IP (20 bytes), RTP(12 bytes) and UDP(8 bytes) headers are compressed to around 2 to 4 bytes. Use RTP HC and LLQ for voice, which is good
  • Link fragmenting and interleaving – operates at L2. Sometimes we may have large data packets in the hardware queue (not software queue) and until that is sent, voice packets will have to wait. What we can do is fragment the large data packet into smaller packets and mix them with voice packets so the voice packets do not have to wait so long
  • QoS over VPN – Use QoS preclassification if QoS is not based on ToS but src or dst IP ports et
  • CoPPs – Protect control plane, Control Plane handles network control traffic.
  • FIFO – not ideal for time sensitive traffic
  • WFQ – Weighted Fair Queuing – Allows flow/stream to go through. Runs default on serial connections with E1 or less.
  • CBWFQ – Class Based – Allows admin to decide what flows are transmitted first. Manual. Cant assign more than 75% of interface bandwidth as 25% is reserved for network control and routing
    • WFQ and CBWFQ can’t be running together
    • Tail drop – packet drop due to tail drop results in TCP senders reducing transmission rate., congestion is reduced, then transmission increases from all senders which means congestion again. This problem is known as  tcp global synchronisation
    • Weighted (WRED) / Random Early Detection (RED) – Helps combat TCP global synchronisation by using this instead of tail drop. RED uses IP Prec or DSCP to drop packets early before queue is full. WRED drops packet from other queues before priority queue. Ineffective against UDP!
    • Low Latency Queuing (LLQ) – Adds to CBWFQ. Allows to avoid Jitter. Used for VoIP
      • WRED and LLQ can’t work together
      • LLQ Policy = create extended access list > create a class-map and match access-list > create policy-map and assign the class-map to it > assign policy-map to interface
      • Priority Queuing – High, Med, Normal, Low.  
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: