Showing posts with label Qos. Show all posts
Showing posts with label Qos. Show all posts

9/23/2020

Understanding the output of "show qos interface eth#"

In this post, I like to explain the output of the EOS command - "show qos interface eth#" based on my understanding from EOS document. 

wa461.00:58:25#sh qos interfaces e17/1
Ethernet17/1:
   Trust Mode: DSCP
   Default COS: 0
   Default DSCP: 0

   Port shaping rate: disabled
   Burst-size: disabled

  Tx    Bandwidth         Shape Rate               Burst-Size          Priority   ECN/WRED
 Queue  (percent)          (units)                  (units)
 ------------------------------------------------------------------------------------------
   7      - / -       - / -          ( - )           -  /  -           SP / SP       D
   6      - / -       - / -          ( - )           -  /  -           SP / SP       D
   5      - / -       - / -          ( - )           -  /  -           SP / SP       D
   4      - / -       - / -          ( - )           -  /  -           SP / SP       D
   3      - / -       - / -          ( - )           -  /  -           SP / SP       D
   2     20 / 20    1.2 / 1.0        (Gbps)     2048 KB / 2048 KB      RR / RR       D
   1     30 / 30      - / -          ( - )           -  /  -           RR / SP       D
   0     50 / 50      - / -          ( - )           -  /  -           RR / SP       D

Note: Values are displayed as Operational/Configured
Legend:
RR -> Round Robin
SP -> Strict Priority
 - -> Not Applicable / Not Configured
 % -> Percentage of line rate

  • Values are displayed as Operational/Configured, like RR/SP which means this Q is configured as strict priority but operational as round-robin. 
  • If one queue is configured as no priority (RR), then all the lower queues are changed to RR
    • In this example, Q 2 is RR, then 0 and 1 are automatically changed to RR. 
    • And Q 0 and 1 are RR/SP, which means their configuration are SP by default, but operational mode is RR.
  • If both interface and tx-queue are configured with shape, which is effective? 
    • From EOS manual chapter 27.5 - Enabling port shaping on an FM6000 interface disables queue shaping internally. Disabling port shaping restores queue shaping as specified in running-config.
interface Ethernet17/1
   speed forced 10000full
   !
   tx-queue 0
      bandwidth percent 50
   !
   tx-queue 1
      bandwidth percent 30
   !
   tx-queue 2
      no priority
      bandwidth percent 20
      shape rate 1000000
  • Bandwidth vs shape.  
    • Bandwidth% is the b/w percent this RR queue can get. Says the above configuration:
      • In the sample below, the interface 17/1 is 10 Gbps interface 
      • Q3-7 are the strict priority and, say use total 2 Gbps traffic, which left 8Gbps for Q0-2
      • The tx-Q 2 can have 20% of left-over capacity which is 1.6Gbps
      • But the shape rate is 1.2Gbps
      • So the maximum throughput of tx-Q 2 is 1.2 Gbps, even it is assigned with 1.6Gbps.

    EOS: A simple Qos design example

    This article - "A Simple Quality of Service Design Example" is a very good starting point for understanding the EOS Qos architecture and starting a Qos design. 

    Some points:

    • 3 ways in the ingress points to map packets to Tx queues:
      • qos cos trust + cos-tc map
      • qos dscp trust + dscp-tc map
      • service-policy + policy-map
    • 3 big categories of traffic:
      • network-control = control plane
      • latency/jitter sensitive traffic
      • best-efforts = scavenger traffic
    • qos profile = 
      • policy-map for input
      • tx-queue set for output
    • "no priority" in a tx-queue, all lower queues become RR

    9/22/2020

    Support for CPU traffic policy

    The default EOS Copp only provides protocol level traffic policy, for example, the maximum throughput of bgp traffic destined to the cpu. But there is no granularity of source address. So this feature - Support for CPU traffic policy is for this purpose. 


    Set DSCP value for CPU outbound packets

    In Arista EOS, the following protocol packets are able to set a DSCP value other than the default value 0:

    Notes:

    • The setting must be done individually and under the protocol section
    • hostname is not supported. 
    For example, setting all locally originated CP packets to DSCP value nc1/cs6/110000/63:

    logging qos dscp 48
    !
    dns qos dscp 48
    !
    ntp qos dscp 48
    !
    traceroute qos dscp 48
    !
    sflow qos dscp 48
    snmp-server qos dscp 48
    radius-server qos dscp 48
    tacacs-server qos dscp 48
    management ssh
       qos dscp 48
    !
    router ospf general
       qos dscp 48


    4/30/2019

    ECN: Explicit Congestion Notifcation, PFC

    • 在DC里面,特别是Storage Network/FCOE,对pkt drop很敏感,常用的是2种QOS
      • ECN
      • PFC
    • PFC - Prority Flow Control.
    • ECN - Explicit Congestion Notification,
      • 是DSCP后面的2 bit. 
      • 00 - Not supported
      • 01/10 - Supported
      • 11 - CE : congestion encountered
    • 如何Work:
      • Server pkt 通过 Router
      • Router发现有Egress congestion, 或者定义的min/max threshold, 开始set ECN to CE
      • Client收到CE pkt后,通过TCP adjust window to slow down traffic. 
    • 一般是定义在Egress interface,config在后面

    interface et3/1/1
     mtu 9000
     speed force 40gfull
     no switchport
     ip address 10.1.1.1/24
     qos trust dscp
     tx-queue 0
        random-detect ecn minimum-threshold xxxx bytes max yyyy bytes

    10/25/2018

    Arista EOS: Change the default shape and bandwidth of CoPP class

    The purpose of CoPP is to protect the CPU from unnecessary or malicious packets. Arista EOS has a default CoPP set with pre-defined bandwidth and shape.

    R1#sh policy-map type control-plane copp-system-policy
    Service-policy input: copp-system-policy
      Number of units programmed: 8
      Hardware programming status: Successful

      Class-map: copp-system-arp-inspect (match-any)
           shape : 250000 kbps
           bandwidth : 25000 kbps
    <....>

    Most of the class names are intuitive, some need a little explanation. 
    • l3destmiss - unicast routed packets but no ARP info, need ARP resolution. 
    • l3lpmoverflow - ip broadcast destined to router???
    • linklocal - multicast packets to 224.0.0.*
    • l3slowpath - header option
    How to change:

    bn302.15:27:12(config)#policy-map type control-plane copp-system-policy
    bn302.15:27:29(config-pmap-control-plane-copp-system-policy)#class copp-system-l3destmiss
    bn302.15:27:43(config-pmap-c-control-plane-copp-system-policy-copp-system-l3destmiss)#shape kbps 999999
    bn302.15:27:49(config-pmap-c-control-plane-copp-system-policy-copp-system-l3destmiss)#bandwidth kbps 88888

    Policy map changes are applied when existing configuration mode. Use 'abort' to ignore any changes. 

    How to verify:

    bn302.16:47:57#show policy-map interface control-plane copp-system-policy
    ....
      Class-map: copp-system-l3destmiss (match-any)
           shape : 999999 kbps
           bandwidth : 88888 kbps

    bn302.15:29:48(config-cp)#sh platform jericho copp mapping | egrep 'Shape|destmiss'
                             Class name   SysPhyPort First Voq# Total Voqs Bandwidth(kbps) Shape(kbps)
                 copp-system-l3destmiss           36       1680       0-40             250        2500