Notable Replies

  1. Hi Rene, i like your blog and web gns3vault
    I’ve a question because i’m doing troubleshooting with qos in switches and when i look at the policy i don’t see what i expect to see.

    i have applied a policy fa0/1 input. i inject traffic but i don’t see ever increasing packet. Could it be because it is a switch ? when is a router i see increases

    C3560-24TS_1#sh policy-map interface

    FastEthernet0/1

    Service-policy input: QoS_In

    Class-map: Clase_Gestion (match-all)
    
      0 packets, 0 bytes
    
       offered rate 0 bps, drop rate 0 bps
    
      Match: ip precedence 7 
    
    Class-map: Clase_Voz (match-all)
    
      0 packets, 0 bytes
    
       offered rate 0 bps, drop rate 0 bps
    
      Match: access-group 112
    
    Class-map: Clase_Oro (match-all)
    
      0 packets, 0 bytes
    
       offered rate 0 bps, drop rate 0 bps
    
      Match: access-group 111
    
         
    
    Class-map: class-default (match-any)
    
      0 packets, 0 bytes
    
       offered rate 0 bps, drop rate 0 bps
    
      Match: any 
    
        0 packets, 0 bytes
    
         rate 0 bps
    

    thanks

  2. Hi Rene,

    I have a question and may not be related to this section but it is to switches. I have been having latency issues with all my users in one location. We install a new 3560x switch with Access to shares, printing and voip and they are very very slow. I called cisco in regards to checking QOS on my switch, spoke to 2 different Engineers and I got different opinions, I have mls qos statements but QOS never enable so one opinion recommended these settings on the interface:

    srr-queue bandwidth share 10 10 60 20
    priority-queue out
    mls qos trust cos
    auto qos trust
    

    and the second opinion was:

    srr-queue bandwidth share 1  30  35  5
    priority-queue out
    mls qos trust device cisco-phone
    mls qos trust cos
    service-policy input AUTOQOS-SRND4-CISCOPHONE-POLICY
    auto qos voip cisco-phone
    

    I also have this command enable: auto qos srnd4 and I have cisco phones.

    What is your opinion on this one?

     

  3. Hi Alfredo,

    QoS on switches can be a pain…first of all, if you don’t have “mls qos” enabled then it won’t do any packet rewriting but it will still be queuing.

    Take a look at this post, there I explain how queuing works and there’s a great video that explains QoS on the switches:

    Here’s an example of a production 3560 switch here without “mls qos” enabled, you can see it’s queuing:

    SWITCH#show mls qos interfac GigabitEthernet 0/1 statistics
    GigabitEthernet0/1 (All statistics are in packets)
    
    dscp: incoming
    -------------------------------
    
    0 - 4 : 178414745 0 0 0 0
    5 - 9 : 0 0 0 0 0
    10 - 14 : 0 0 0 0 0
    15 - 19 : 0 0 0 0 0
    20 - 24 : 0 0 0 0 0
    25 - 29 : 0 0 0 0 0
    30 - 34 : 0 0 0 0 0
    35 - 39 : 0 0 0 0 0
    40 - 44 : 0 0 0 0 0
    45 - 49 : 0 0 0 0 0
    50 - 54 : 0 0 0 0 0
    55 - 59 : 0 0 0 0 0
    60 - 64 : 0 0 0 0
    dscp: outgoing
    -------------------------------
    
    0 - 4 : 14636069 0 0 0 17401786
    5 - 9 : 0 0 0 0 0
    10 - 14 : 0 0 0 0 0
    15 - 19 : 0 0 0 59194045 0
    20 - 24 : 0 0 0 0 0
    25 - 29 : 0 44 0 0 0
    30 - 34 : 0 0 0 0 0
    35 - 39 : 0 0 0 0 0
    40 - 44 : 0 0 0 0 0
    45 - 49 : 0 0 0 275 0
    50 - 54 : 0 0 0 0 0
    55 - 59 : 0 0 0 0 0
    60 - 64 : 0 0 0 0
    cos: incoming
    -------------------------------
    
    0 - 4 : 349353181 0 0 0 0
    5 - 7 : 0 0 0
    cos: outgoing
    -------------------------------
    
    0 - 4 : 471256874 0 0 0 0
    5 - 7 : 532 0 51009
    output queues enqueued:
    queue: threshold1 threshold2 threshold3
    -----------------------------------------------
    queue 0: 0 0 0
    queue 1: 0 1135332 8306773
    queue 2: 0 0 0
    queue 3: 0 0 461977806
    
    output queues dropped:
    queue: threshold1 threshold2 threshold3
    -----------------------------------------------
    queue 0: 0 0 0
    queue 1: 0 0 0
    queue 2: 0 0 0
    queue 3: 0 0 0
    
    Policer: Inprofile: 0 OutofProfile: 0
    

    Before you make any changes, you should figure out a couple of things:

    1. Are there any drops? If so, which interfaces?
    2. What packets are being dropped? what queue and what threshold?

    Here you can see the drops:

    SWITCH#show platform port-asic stats drop g0/1
    
    Interface Gi0/1 TxQueue Drop Statistics
    Queue 0
    Weight 0 Frames 0
    Weight 1 Frames 0
    Weight 2 Frames 0
    Queue 1
    Weight 0 Frames 0
    Weight 1 Frames 0
    Weight 2 Frames 0
    Queue 2
    Weight 0 Frames 0
    Weight 1 Frames 0
    Weight 2 Frames 0
    Queue 3
    Weight 0 Frames 0
    Weight 1 Frames 0
    Weight 2 Frames 0
    Queue 4
    Weight 0 Frames 0
    Weight 1 Frames 0
    Weight 2 Frames 0
    Queue 5
    Weight 0 Frames 0
    Weight 1 Frames 0
    Weight 2 Frames 0
    Queue 6
    Weight 0 Frames 0
    Weight 1 Frames 0
    Weight 2 Frames 0
    Queue 7
    Weight 0 Frames 0
    Weight 1 Frames 0
    Weight 2 Frames 0
    

    This interface isn’t dropping anything but perhaps on your switch, you do see drops. If you see them then you need to figure out what kind of traffic goes into what queues:

    SWITCH#show mls qos maps cos-output-q
    Cos-outputq-threshold map:
    cos: 0 1 2 3 4 5 6 7
    ------------------------------------
    queue-threshold: 2-1 2-1 3-1 3-1 4-1 1-1 4-1 4-1
    
    SWITCH#show mls qos maps dscp-output-q
    Dscp-outputq-threshold map:
    d1 :d2 0 1 2 3 4 5 6 7 8 9
    ------------------------------------------------------------
    0 : 02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01 02-01
    1 : 02-01 02-01 02-01 02-01 02-01 02-01 03-01 03-01 03-01 03-01
    2 : 03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01 03-01
    3 : 03-01 03-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01
    4 : 01-01 01-01 01-01 01-01 01-01 01-01 01-01 01-01 04-01 04-01
    5 : 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01 04-01
    6 : 04-01 04-01 04-01 04-01
    

    With the drops in the queues and the tables above, you can figure out what is being dropped. For example, COS 0 and DSCP 0 (unmarked packets) go to Queue 2 Threshold 1. Here are the default values on the switch:

    SWITCH#show mls qos interface g0/1 queueing
    GigabitEthernet0/1
    QoS is disabled. When QoS is enabled, following settings will be applied
    Egress Priority Queue : disabled
    Shaped queue weights (absolute) : 25 0 0 0
    Shared queue weights : 25 25 25 25
    The port bandwidth limit : 100 (Operational Bandwidth:100.0)
    The port is mapped to qset : 1
    

    When there is congestion, by default each queue gets 25% of the bandwidth. Here you can find the buffers and thresholds:

    SWITCH#show mls qos queue-set 1
    Queueset: 1
    Queue : 1 2 3 4
    ----------------------------------------------
    buffers : 25 25 25 25
    threshold1: 100 200 100 100
    threshold2: 100 200 100 100
    reserved : 50 50 50 50
    maximum : 400 400 400 400
    

    Now let’s look at your configurations:

    srr-queue bandwidth share 10 10 60 20
    priority-queue out
    mls qos trust cos
    auto qos trust
    

    Your queues will get:

    Q1 = 10%
    Q2 = 20%
    Q3 = 60%
    Q4 = 20%

    Unmarked traffic goes to Q2 by default and I’m guessing the ‘bulk’ of your traffic is untagged (printing / file sharing) so if you see drops there, reducing the queue isn’t going to help. Your voice traffic goes to Q1 by default, enabling the priority queue is a good idea. Depending on what you see in your output, I think you probably need to increase Q2, not Q3.

    srr-queue bandwidth share 1 30 35 5
    priority-queue out
    mls qos trust device cisco-phone
    mls qos trust cos
    service-policy input AUTOQOS-SRND4-CISCOPHONE-POLICY
    auto qos voip cisco-phone
    

     

    Enabling the priority queue is a good idea, by default Q1 will be the priority queue. COS 5 and DSCP 46 packets go to Q1 by default.

    You also want to think about the threshold/buffers. This is the ‘storage space’ of your queue. If you increase it then you can store more in the queue…when it’s full, it will drop packets. Let’s say you have a lot of unmarked traffic, in this case I would remap it from T1 to T3.

    Also when you test this, use queue-set 2…by default all interfaces are mapped to queue-set 1.

    You need to figure out your traffic pattern, your drops and then come up with a ‘plan’ for your queues and buffers. Implement it and then check if things have improved or not.

    Rene

  4. Hello Azm

    Yes, you are correct.

    Yes. The auto qos trust command will configure the CoS-to-DSCP map while the auto qos voip and auto qos ip-camera (and others) will create detailed class maps and policy maps based on best practices. You can find out more in this excellent Cisco documentation.[quote=“azmuddincisco, post:17, topic:857”]

    1. Is there any command to enable qos in a switch globally in MQC model that will analyze the traffic and create class-maps, policies etc. automatically to optimize traffic flow?
      [/quote]
      As far as I know, there is no “silver-bullet” QoS solution for Cisco devices where traffic is analysed and QoS is automatically and dynamically configured. You must specify something (like auto classify, auto qos voip cisco-phone or similar commands) to more specifically indicate to the switch how to implement QoS for specific ports.

    A Cisco phone will mark traffic using both CoS (Layer2) and DSCP (Layer3).

    Because CoS information is found in Layer 2 and DSCP information is found in Layer 3, in the scenario that you describe, the CoS information will be stripped away along with the Layer 2 header. The Layer 3 header however will retain the DSCP information and thus will retain the related QoS markings.

    In order for the access switch to send QoS info to a trusted device on the other end of the trunk, you must apply QoS configuration on the trunk. For example, if you are configuring QoS for VoIP, you need to apply QoS throughout the path that VoIP travels.

    A Cisco switch will recognise QoS markings of 3rd party phones as long as they are using QoS standard markings. However, configurations such as auto qos voip cisco-phone will NOT work correctly because the QoS labels of incoming packets are trusted ONLY when the telephone’s presence is detected using CDP. In order to make non-cisco IP phones function, the ports must be configured manually as if connecting to a trunk port to a switch, and then the command auto qos voip trust must be used as if configuring the QoS on a trunk.

    This really depends on the IOS version being used. Some will support both for the purposes of interoperability with older devices, however I’m not sure from which version on the old method is still supported. You will have to check for each IOS version that you are using.

    I hope this has been helpful!

    Laz

  5. Hello Fabrice

    If you mark Skype traffic (or any traffic for that matter), you can be sure that this traffic will be marked only within the network that you administrate. If the packet exits your network, (via your ISP, the Internet etc), you can’t be sure that those markings will be obeyed or even removed. It depends on the policies of your ISP and any agreements you have made with them. But even so, traffic that is destined to the internet at large does not generally have QoS mechanisms applied to it. The Internet is best effort at best.

    So it is almost certain that the Skype server on the Internet will not receive QoS markings nor will it respond with QoS markings. What you can do however is you can add QoS markings on incoming Skype traffic at your edge devices, so that any such traffic will at least have QoS mechanisms operating for all traffic within your network.

    I hope this has been helpful!

    Laz

Continue the discussion forum.networklessons.com

20 more replies!

Participants