Catalyst QoS Lab Tips

  • Enable QoS on a  switch with mls qos at global config.
  • mls qos vlan-based under physical interfaces will….
Advertisements

QoS Lab Tips

  • Use MQC if FRTS is not an option and vice-versa
  • SPD or Selective Packet Discard seems very similar to RED, but uses terminology such as headroom. It is a hidden command and will need to refer to the DOCs
  • You can do service-policy within a policy-map , this is typically done under the policymap responsible for class class-default and is referred to as nested maps.
  • Make sure bandwidth matches value given in lab.
  • Bits per Interval, sustained or Burst (BC). To calculate the BC we need to know the TC. For example,  if the CIR is 384Kbps and we have 10 Time slices which is also 100ms (Tc), then the BC is CIR/TC which is 384000 (bits) / 10 = 38400
  • BC is 125ms (1/8th of a second) by default.
  • Bits per interval, excess or Burst Excess (BE). Generally the port speed – CIR, e.g. 512 – 384 = 128. then 128000 (bits) / TC (we are using 10 time slices at 100ms each) = 12800 (bits for excess).
  • If asked to adapt , use shape adaptive.
  • mincir is the value used as the lowest speed if a BECN / congestion notification is received
  • shaping allows queuing so can use shape-max-buffers 2000 (queue 2000 packets that goes over the shape average within, say, a match protocol class-map).
  • Verify QoS with show policy-map [expand with interface].
  • Use nbar if access-lists are not permitted and vice-versa (make sure ip cef is enabled for nbar).

QoS Written 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 ****

  • Best Effort – Is the default queuing method
  • IntServ – Integrated Services, reserves bandwidth for apps and is the 1st type of QoS. However inefficient as when the app is not using the bandwidth it is just wasted as other apps cannot use it. Not scalable
  • DiffServ – Divide traffic into classes and define how each class is treated.
  • IntServ vs DiffServ – Not all routers can support DiffServ and DiffServ does not provide the level of guarantee that IntServ does as it uses RSVP to carve out BW!.
  • QoS Methods
    • CLI – Legacy based and needs to be done interface by interface – not scalable!
    • MQC – Modular QoS CLI
      • Class maps – to classify
        • Config# class-map match-any JUNK_TRAFFIC
        • Config-cmap# match protocol // uses NBAR!
    • Policy maps – to mark
      • Config# policy-map MARKING
      • Config-pmap# class JUNK_TRAFFIC
      • Config-pmap-c# set precedence 0
  • AutoQoS – one command under the interface and it will automatically deploy QoS rules. It’s really good. Template on the network and same for all equipment!
  • QPM – QoS Policy Manager – GUI for cisco works
  • QoS Mechanisms
    • Classifications – Divide the traffic into classes
    • Marking – Mark as close to the source as possible
      • CoS – Marking at layer 2 e.g. switches
      • ToS – Marking at layer 3 e.g. router
        • IPPREC (0-7) – Legacy, maps CoS to ToS
        • DSCP (0-63) – Best way!
        • Queuing method Legacy
          • Queuing methods only exist if there is congestion
          • FIFO – Default
          • Priority Queuing – Suffers from queue starvation as it only service high priority queues first
          • Custom Queuing – Better than priority queuing,  can define how many packets / bytes to take from each queue via roud robin. Lessens starvation issue
          • Weighted Fair Queuing – prioritises the low volume senders over the high volume senders
          • Queuing methods – modern
            • Class-Based Weighted Fair Queuing
              • 16 queues  which has weighted fair queuing  of how many packets / bytes etc
  • LLQ
    • As soon as there is voice packets, that will go first with policing so no queue starvation and then everything else is CB-WFQ
    • Bandwidth
      • Bandwidth (CB-WFQ) statements should not be over 75% of the interface. Guarantees a minimum
      • Priority (LLQ) max bandwidth etc, polices it.
      • Remain – not often used, but uses 20% etc of the remaining percent e.g. 20% of 25%
      • WRED – combats taildrop which causes TCP synchronisation . It drops packets between the min value and max value, past the max it drops all of it.
      • Traffic Shaping – Outgoing only. Excess Traffic is queued. Typically used on FR and ATM networks
      • Traffic Policing – Incoming or Outgoing. Excess traffic is dropped or re-marked. Policing uses less memory buffers
        • Conforming traffic level  (CIR)-  e.g. transmits
        • Exceeding traffic level – e.g. remark the ip prec to say 0 and still transmit for WRED etc
        • Violating traffic level – e.g. drop the traffic!
        • Config-pmap-c# -Conform action transmit exceed-action drop
        • 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. Useful for VoIP packets. Can do this on
          • Multilink PPP
          • FRF 12 (VoIP over Frae Relay)
          • 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

 

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.  

Queuing 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.

Queueing                                                                                                                                                           

*** Theory ****

  • 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.  

 

*** Commands ****