Showing posts with label Arista. Show all posts
Showing posts with label Arista. Show all posts

5/27/2021

Troubleshooting Arista EOS EVPN VPWS (1)

This blog provides troubleshooting information for common problems with Arista EVPN MPLS VPWS. It covers the following error:
  • Status: CLI conflict
  • Status: Admin down
  • Status: Interface unavailable
  • Status: No remote
  • Status: Unprogrammed local connector
Most of the issues start with down state in the output of "show patch panel" like below:

RR1-PE5-wa465.11:42:56#sh patch panel
Patch                        Connector                                               Status
---------------------------- ------------------------------------------------------- ------
pbVpws-PE5:e471--PE1:e1312   1: BGP VPWS custAB Pseudowire PE5:e471--PE1:e1312       Down
                             2: Ethernet47/1

And command - "show patch panel <name> details" shows the detailed error reason:

RR1-PE5-wa465.14:58:02#sh patch panel pbVpws-PE5:e471--PE1:e1312 detail
......
Patch: pbVpws-PE5:e471--PE1:e1312, Status: Down
   Connector 1: BGP VPWS custAB Pseudowire PE5:e471--PE1:e1312
      Status: Interface unavailable
      Local MPLS label: 100004
      EVPN VPWS type: port-based
   Connector 2: Ethernet47/1
      Status: Interface mode

The following error status means a local misconfiguration most likely.
  • Ethernet side:
    • Status: CLI conflict
      • Possible reason: duplicated patch panel entries for the same ethernet interface
    • Status: Admin down
      • Check the interface status, to make sure is up
  • Pseudowire side:
    • Status: Interface unavailable
      • Possible reason: make sure "no switchport" under interface
After the local configuration is corrected, check the output of "show bgp evpn route-type auto-dis next-hop 0.0.0.0". This is to check if the locally originated BGP EVPN prefixes are advertised out to BGP peers. 

RR1-PE5-wa465.14:58:14#show bgp evpn route-type auto-discovery next-hop 0.0.0.0
....
AS Path Attributes: Or-ID - Originator ID, C-LST - Cluster List, LL Nexthop - Link Local Nexthop

          Network                Next Hop              Metric  LocPref Weight  Path
 * >     RD: 100.250.250.5:100 auto-discovery 50471 0000:0000:0000:0000:0000
                                 -                     -       -       0       i

RR1-PE5-wa465.15:07:10#show bgp evpn route-type auto-discovery next-hop 0.0.0.0 detail
BGP routing table information for VRF default
Router identifier 100.250.250.5, local AS number 65000
BGP routing table entry for auto-discovery 50471 0000:0000:0000:0000:0000, Route Distinguisher: 100.250.250.5:100
 Paths: 1 available
  Local
    - from - (0.0.0.0)
      Origin IGP, metric -, localpref -, weight 0, valid, local, best
      Extended Community: Route-Target-AS:65000:100 TunnelEncap:tunnelTypeMpls L2 Attributes: control word
      MPLS label: 100004

The most important information as highlighted above is the ETID/PW ID. And compare it with the definition of PW  PE5:e471--PE1:e1312

RR1-PE5-wa465.15:06:29#show bgp evpn instance vpws custAB
...
    Pseudowire PE5:e471--PE1:e1312
      Status: up
      VPWS label: 100004
      Local VPWS ID: 50471
      Remote VPWS ID: 101312

After this point, you are pretty sure this end of PW is good. 

But if you are seeing the error status as "No remote", the device may have an issue with remote PW. 

Patch: pbVpws-PE5:e471--PE1:e1312, Status: Down
   Connector 1: BGP VPWS custAB Pseudowire PE5:e471--PE1:e1312
      Status: No remote
      Local MPLS label: 100004
      EVPN VPWS type: port-based
   Connector 2: Ethernet47/1
      Status: Unprogrammed local connector

Now let's check the router knows how to reach PW with VPWS ID 101312. 

RR1-PE5-wa465.15:13:06#show bgp evpn route-type auto-discovery | grep 101312
RR1-PE5-wa465.15:13:10# 

Clearly, the router has no EVPN AD prefix with ETID 101312, so it doesn't how to reach. The next step is to log in to the other end of PW to figure out why by following the above steps. For example, the remote PW should be from NH 100.250.250.11

PE3-lp232.22:00:03#sh bgp evpn route-type auto-discovery next-hop 100.250.250.11
...
          Network                Next Hop              Metric  LocPref Weight  Path
 * >Ec   RD: 100.250.250.11:100 auto-discovery 101331 0000:0000:0000:0000:0000
                                 100.250.250.11        -       100     0       i Or-ID: 100.250.250.11 C-LST: 100.250.250.6

From the above output, the PE1(100.250.250.11) sends out an AD prefix with ETID 101331, not 101311. 

And sometimes, you may face traffic issues even all the PW and patch panels are UP!! That's because the BGP EVPN AD prefixes only contain the local ETID/PW id, no the expected remote one. There is no way to ensure consistency. 

Reference:

6/30/2020

"no-internal-vlan" error for routed interfaces

Creating several L3 routed port-channels and sub-interfaces, but they failed to come up with errdisabled status. The output "show interface status err" displays the following reasons:

yo411.16:22:08(config-if-Po1201)#show int status errdisabled
   Port           Name             Status         Reason
-------------- ---------------- ----------------- ---------------------
   Et3/12/1                        errdisabled    port-channel-shutdown
   Et4/12/1                        errdisabled    port-channel-shutdown
   Po1201.3                        errdisabled    no-internal-vlan
   Po1201.2                        errdisabled    no-internal-vlan
   Po1201                          errdisabled    no-internal-vlan


Basically, the "port-ch-shutdown" error was caused by the Po1201 being down. Checked the EOS document, the system will reserve an internal VLAN for any "no switchport" interfaces. And the internal VLAN ranges start from 1006 to 4094 (ref: EOS Manual section 19.4.3)

yo411.16:22:59(config-if-Po1201)#show vlan internal usage
1006  Port-Channel1900.4002
1007  Ethernet3/36/3
1008  Port-Channel1900
1009  Ethernet3/36/1
1010  Port-Channel1900.4003
1011  Ethernet3/36/4
1012  Ethernet3/36/2
1013  Ethernet3/36/4.2
1014  Ethernet3/36/4.3


And internal VLAN assignment stops at 1015. 

yo411.16:23:23(config-if-Po1201)#sh vlan 1015
VLAN  Name                             Status    Ports
----- -------------------------------- --------- -------------------------------
1015  VLAN1015                         suspended

So the root cause is that there is an accidental configuration of vlan 1015 with a suspended state, and this blocks the internal VLAN assignment. 

yo411.16:24:19(config)#no vlan 1006 - 1099
yo411.16:24:36(config)#sh int status errdisabled

After removing the VLAN configuration, there is no internal-VLAN error anymore. 

yo411.16:24:47(config)#show vlan internal usage
...
1015  Port-Channel1201.2
1016  Port-Channel1201.3
1017  Port-Channel1201


Another way is to specify the internal VLAN range to an unused space (ref: EOS manual section 21.3

yo411(config)# vlan internal order descending range 4000 4094

5/15/2019

Switch goes into power-forever after losing all FANs

If a switch loses all fans, no matter bad hardware or removing parts, the switch should go into a "power-forever" mode. To exit this hardware protection, you have to unplug ALL power cords and reinsert them. This will reset the hardware logic. Unplug then plug power cord one by one doesn't work, neither the power flap.

4/30/2019

Arista MLAG reload-delay timers

In this blog post, I will cover the following MLAG related topics:
  • What is the MLAG reload-delay and why it is needed
  • The difference of 2 different timers
  • How to tune the timer values
After an MLAG peer boot up, all its ports are placed in err-disabled state (except the peer-link) with a reason of "mlag-issu". During the reload-delay, the MLAG agents sync all MAC and ARP information with the active peer. 

Another trigger of mlag reload delay is forwarding plane agent restart. On some platforms like TH or T3, a port speed change needs a hitful agent restart, which forces mlag interfaces to transition and starts reload-delay.

From 4.15.2F, the default reload-delay timers are different per platform:
  • All fixed systems: 300 sec
  • 7500* (Arad/Jericho): 1800 sec (due to long hw initialization time)
  • 7300* (Trident*/TH): 1200 sec
When to start the reload timer? The timers start to tick after the start of MLAG agent. In old releases, it is triggered by the sysdb agent. 

Can I lower the reload-delay timers? Yes, but be careful since if the interfaces exit err-disabled mode before sync is done, the mlag peer will blackhole the traffic. 

Which value should be used, it is highly based on system and configuration. You can look at the log messages closely. 

! this is MLAG agent up and timers are on
Apr 19 11:33:32 localhost Mlag: %AGENT-6-INITIALIZED: Agent 'Mlag' initialized; pid=3030
! LCs power on
Apr 19 11:34:08 R1 NorCalCard: %HARDWARE-6-CARD_POWERED_ON: Card Fabric3 has been powered on. model: 7512R-FM rev: 11.02 serial number: JPE16305615
....
Apr 19 11:34:24 R1 NorCalCard: %HARDWARE-6-CARD_POWERED_ON: Card Linecard11 has been powered on. model: 7500R-36Q-LC rev: 02.01 serial number: JPE16204252
! LC initialization
Apr 19 11:38:40 R1 SandFap: %SAND-6-INIT_SUCCEEDED: Initialization of Linecard12 switch asics succeeded.
....
Apr 19 11:43:12 R1 SandFap: %SAND-6-INIT_SUCCEEDED: Initialization of Linecard13 switch asics succeeded.
! interfaces up
Apr 19 11:43:01 R1 Ebra: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet12/26/3 (mlag.207_leaf_et9/3_et10/3=>et12/17/3), changed state to up
....
Apr 19 11:46:33 R1 Ebra: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet14/34/1 (peerLink=>mlagSec.et14/34/1.100g), changed state to up

This is the messages of a 7512N with 8 J/J+ LCs. So you can see, 13 mins after MLAG agent up, the last peer-link interface is up. Given 5 mins to allow IGP/iBGP session and corresponding hw programming finished, a 20-min (1200 sec) reload-delay timer should be safe with an additional 2-minute buffer. 

And there are 2 timers:
  • MLAG reload-delay timer: this is for all MLAG port-channel links. It can be changed by CLI - "reload-delay mlag <seconds>"
  • Non-MLAG reload-delay timer: most of the time, they are the timeout values for L3 uplinks. And can be modified by CLI - "reload-delay non-mlag <seconds>"
Before discussing how to tune them, let me give a good example to help your understandings:
  • Imagine there is a house which has a front door (non-MLAG/uplinks to go out) and a back door (MLAG interfaces/to reach hosts/tenants)
  • And there is a side to your neighbor (MLAG peer), which shares the same tenants/hosts. 
  • So the first thing to do is to communicate with your neighbor to have all the address information, to know who is where. 
  • With all the knowledge, open which door first?
    • First of all, the side door is opened first. (so peer-link doesn't have reload-delay and a BGP/IGP peering is required)
    • During the gap of the front and back door, the traffic will not be lost since there is a side door to exit. 
    • The opening of the back door will have half south-north traffic in, and will go thru the side door. Similar to front door, half north-south traffic. 
    • Most of the time, the MLAG interfaces are facing servers which means south-north traffic is much higher than the opposite traffic. 
  • So it is preferable to configure non-mlag reload delay <= mlag timer. 
  • The ONLY exception is, if "reload-delay mode lacp-standby" is enabled, non-mlag timer > mlag timer. This feature keeps the LACP interfaces up to speed up hardware programming. So if the north-south coming first, the router has to drop them because the MLAG port-channels are not really ready. 

Arista EOS: sand hardware-only LAG

CLI: 
platform sand lag hardware-only

目的:
  • 一般情况下,1-port LAG是software LAG;
  • 如果增加一个port,变成2-port LAG,就会变成hardware LAG,会有traffic interruption,特别是interface flap! 
  • 什么意思啊?很简单,如果是2-port LAG,断了一根线,变成1-port/software LAG,有Traffic impact. 如果这根线在Flapping,traffic就一直受影响
  • 所以索性一上来就是hw-LAG
  • 唯一的影响是,占有的资源(啥资源啊?不知道,LAG table?)会多一些

Arista EOS Memory Util%

https://eos.arista.com/introduction-to-managing-eos-devices-memory-utilisation/

经常Arista Switch会显示Mem Util% at 70%,特别是低端的Switch。其实没有用到,而是Linux Caching System把他们Reserve到Cache和Buffer里面。下面红字的都是Free Mem

------------- show processes top memory once -------------

top - 01:14:08 up 21 days,  1:18,  1 user,  load average: 0.62, 0.39, 0.41
Tasks: 310 total,   1 running, 252 sleeping,   0 stopped,  57 zombie
%Cpu(s): 10.3 us,  2.0 sy,  0.0 ni, 87.3 id,  0.0 wa,  0.3 hi,  0.0 si,  0.0 st
KiB Mem:   3900776 total,  3730136 used,   170640 free,   201908 buffers
KiB Swap:        0 total,        0 used,        0 free,  2034600 cached

ckp348.jhm.ebgp.profB.WORKING.05:46:31#sh proc top mem once
top - 05:46:40 up 25 days,  7:21,  2 users,  load average: 0.42, 0.25, 0.24
Tasks: 289 total,   2 running, 287 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.4 us,  0.7 sy,  0.0 ni, 94.1 id,  0.0 wa,  0.2 hi,  0.5 si,  0.0 st
KiB Mem:   7931828 total,  4395336 used,  3536492 free,   218976 buffers
KiB Swap:        0 total,        0 used,        0 free,  2371220 cached

Arista optics with DOM support

DOM: 
  • Digital Optical Monitoring. 
  • Per industry standard - SFF-8742, and it gives end users the ability to monitor real-time parameters of SFP, such as in/output power, temperature, laser current and supply voltage
  • 2 Arista optical parts don't support full DOM:
    • 40G AOC doesn't support Tx Power
    • 10G AOC doesn't support DOM
  • EOS CLIs:
    • show int eth22/1 transceiver [detail]
  • https://www.cisco.com/c/en/us/products/collateral/interfaces-modules/transceiver-modules/data_sheet_c78-455693.html


upp106#show inv | grep SWDM

  22   Arista Networks  QSFP-100G-SWDM4  ATH173200003     20

upp106#show int eth 22/1 transceiver
If device is externally calibrated, only calibrated values are printed.
N/A: not applicable, Tx: transmit, Rx: receive.
mA: milliamperes, dBm: decibels (milliwatts).
                               Bias      Optical   Optical
          Temp       Voltage   Current   Tx Power  Rx Power
Port      (Celsius)  (Volts)   (mA)      (dBm)     (dBm)     Last Update
-----     ---------  --------  --------  --------  --------  -------------------
Et22/1     33.00      3.30      7.69     1.32      0.44      0:00:01 ago


upp106#show int eth 22/1 transceiver de
mA: milliamperes, dBm: decibels (milliwatts), NA or N/A: not applicable.
++ : high alarm, +  : high warning, -  : low warning, -- : low alarm.
A2D readouts (if they differ), are reported in parentheses.
The threshold values are calibrated.
                         High Alarm  High Warn   Low Alarm   Low Warn
           Temperature   Threshold   Threshold   Threshold   Threshold
Port       (Celsius)     (Celsius)   (Celsius)   (Celsius)   (Celsius)
-------    ------------  ----------  ----------  ----------  ----------
Et22/1     33.00         75.00       70.00       -5.00       0.00
                         High Alarm  High Warn   Low Alarm   Low Warn
           Voltage       Threshold   Threshold   Threshold   Threshold
Port       (Volts)       (Volts)     (Volts)     (Volts)     (Volts)
-------    ------------  ----------  ----------  ----------  ----------
Et22/1     3.30          3.60        3.47        2.97        3.10
                         High Alarm  High Warn   Low Alarm   Low Warn
           Current       Threshold   Threshold   Threshold   Threshold
Port       (mA)          (mA)        (mA)        (mA)        (mA)
-------    ------------  ----------  ----------  ----------  ----------
Et22/1     7.71          11.00       10.00       2.00        3.00
                         High Alarm  High Warn   Low Alarm   Low Warn
           Tx Power      Threshold   Threshold   Threshold   Threshold
Port       (dBm)         (dBm)       (dBm)       (dBm)       (dBm)
-------    ------------  ----------  ----------  ----------  ----------
Et22/1     1.33          6.00        5.00        -7.00       -6.00
                         High Alarm  High Warn   Low Alarm   Low Warn
           Rx Power      Threshold   Threshold   Threshold   Threshold
Port       (dBm)         (dBm)       (dBm)       (dBm)       (dBm)
-------    ------------  ----------  ----------  ----------  ----------
Et22/1     0.44          5.50        4.50        -16.00      -13.00

bn303.jhm.mlagA.profB.WORKING.17:56:54#sh int status  | grep 9/1/1
Et9/1/1        eth.mlag1601::2x25g::upp223_et1/1_et17/1<-->bn302|303_et9/1/1                 connected    in Po1601 full   25G    100GBASE-AR4

bn303.jhm.mlagA.profB.WORKING.17:56:39#sh int e9/1/1 transceiver
If device is externally calibrated, only calibrated values are printed.
N/A: not applicable, Tx: transmit, Rx: receive.
mA: milliamperes, dBm: decibels (milliwatts).
                               Bias      Optical   Optical
          Temp       Voltage   Current   Tx Power  Rx Power
Port      (Celsius)  (Volts)   (mA)      (dBm)     (dBm)     Last Update
-----     ---------  --------  --------  --------  --------  -------------------
Et9/1/1    31.11      3.23      7.08     0.36      -2.36     0:00:03 ago
bn303.jhm.mlagA.profB.WORKING.17:56:46#sh int e9/1/1 transceiver detail
mA: milliamperes, dBm: decibels (milliwatts), NA or N/A: not applicable.
++ : high alarm, +  : high warning, -  : low warning, -- : low alarm.
A2D readouts (if they differ), are reported in parentheses.
The threshold values are calibrated.
                         High Alarm  High Warn   Low Alarm   Low Warn
           Temperature   Threshold   Threshold   Threshold   Threshold
Port       (Celsius)     (Celsius)   (Celsius)   (Celsius)   (Celsius)
-------    ------------  ----------  ----------  ----------  ----------
Et9/1/1    31.53         80.00       75.00       -10.00      -5.00
                         High Alarm  High Warn   Low Alarm   Low Warn
           Voltage       Threshold   Threshold   Threshold   Threshold
Port       (Volts)       (Volts)     (Volts)     (Volts)     (Volts)
-------    ------------  ----------  ----------  ----------  ----------
Et9/1/1    3.23          3.63        3.46        2.97        3.14
                         High Alarm  High Warn   Low Alarm   Low Warn
           Current       Threshold   Threshold   Threshold   Threshold
Port       (mA)          (mA)        (mA)        (mA)        (mA)
-------    ------------  ----------  ----------  ----------  ----------
Et9/1/1    7.08          12.00       10.00       3.00        4.50
                         High Alarm  High Warn   Low Alarm   Low Warn
           Tx Power      Threshold   Threshold   Threshold   Threshold
Port       (dBm)         (dBm)       (dBm)       (dBm)       (dBm)
-------    ------------  ----------  ----------  ----------  ----------
Et9/1/1    0.36          5.40        2.40        -11.40      -8.40
                         High Alarm  High Warn   Low Alarm   Low Warn
           Rx Power      Threshold   Threshold   Threshold   Threshold
Port       (dBm)         (dBm)       (dBm)       (dBm)       (dBm)
-------    ------------  ----------  ----------  ----------  ----------
Et9/1/1    -2.39         5.40        2.40        -13.30      -10.30

Arista EOS ASU and ASU2

ASU = Accelerated Software Upgrade
  • EOS Docu
  • 就是在Control Plane booting的时候,Hardware继续Fwd Traffic based on old state
  • 等Control Plane is up and running, refresh hw. 所以Traffic disruption大概是30 seconds. 
  • CLI: reload fast-boot
  • 还有一个ASU+
ASU2
  • 没有Document ?
  • 就是加上Protocol GR,例如BGP, OSPF
  • Traffic disruption is about 50ms
  • CLI: reload hitless

Arista EOS PBR (1)

  • PBR = Policy Based Routing - 就是不走IP routing path,而是policy defined path
  • Arista EOS PBR configuration和Cisco有点不一样, Arista允许 Raw match
  • Cisco:
    • access-list 1 perm ip 1.1.1.0 0.0.0.255
    • route-map pbrRtmap perm 10
    • match ip address 1
    • set ip next-hop 2.2.2.2
    • Arista:
      • policy-map type pbr pbrPolicy
      • 10 match ip 1.1.1.0/24 any set nexthop recursive 2.2.2.2
      • Sand Platform实施有点特别:
        • 如果是routed/LAG上面配置, 只要一个set of TCAM,而且只在Faps that host this routed/LAG ports. 和Port ACL类似
        • 如果是VLAN/SVI上配置,每个SVI都有一个copy of TACM rules,而且是在所有Faps。
        • 所以routed/LAG scale更好
      • set nexthop recursive是为了ECMP
      • 如果no set = no action = bypass pbr and move to next stage. 
      • 如果不satisfy 如何match,就去routing
      • 如果NH不能Resolved, 直接drop
        • 知道via = vlan, eth and MAC
      • Configuration:
        • class-map type pbr match-any pbrClassMap
        • 10 match ip access pbrACL1
        • policy-map type pbr pbrPolicy
        • 10 class pbrClassMap
        • set next-hop ip-address <ip1> <ip2>....
        • interface e1
        • service-policy type pbr input pbrPolicy 
      • 如果policy-map applied to a Lag,但是Lag member port有policy-map,咋办?
        • member port's policy-map就作废了
      • ECMP support for PBR
        • set next-hop ip-addr nh1 nh2... nhN
        • N = max# of ECMP
        • No UCMP, 如果是同样的Via, 会被filter out
      • Reference:

      Arista 7160S-32CQ Error Msg: % Error: Cannot apply ip ACL test2 to Ethernet2/1 (Out of SW resources on Chip-0)

      Platform: Arista 7160S-32CQ, XP80, 32QSFP100
      2 large ip ACL with 1500 entries
      System is kind of strenched, and hitting limit with hash collision with mask-group
      IP Access List test2
              10 deny pim host 70.0.70.210 any
              20 deny ospf host 0.70.210.70 any
              30 deny pim host 140.140.70.210 any
              40 permit gre host 70.0.0.0 any
              50 permit ospf host 70.140.0.210 any
              60 deny icmp host 140.70.210.70 any
              70 permit igmp host 0.70.0.0 any
              80 permit vrrp host 0.0.0.210 any
              90 deny tcp host 70.70.210.70 any
              100 deny ospf host 0.210.210.140 any
              110 deny gre host 210.140.0.210 any
              120 deny ip host 0.0.210.210 any
              130 deny igmp host 140.70.140.70 any
              140 permit ip host 70.0.70.0 any

      dut23:44:51(config-if-Et2/1)#ip access-group test2 in
      % Error: Cannot apply ip ACL test2 to Ethernet2/1 (Out of SW resources on Chip-0)

      fu590.09:21:58#show platform algo chip 0 acl table usage
      Table ID Entries used
      -------- ------------
      0        7968
      1        5567
      2        6415
      3        0
      4        8010
      5        2520

      show platform algo chip 0 acl mask-group
      Initial revision
         Hw Acl ID 1
            Mask group ID Mask group descriptor                      Entries
            ------------- ------------------------------------------ -------
            2             ipv4PAcl,sip:8,dip:0,sport:0,dport:0       159
            1             ipv4PAcl,sip:8,dip:0,sport:0,dport:0,proto 1385
            3             ipv4PAcl,sip:9,dip:0,sport:0,dport:0,proto 19
      Final revision
         Hw Acl ID 1
            Mask group ID Mask group descriptor                      Entries
            ------------- ------------------------------------------ -------
            3             ipv4PAcl,sip:9,dip:0,sport:0,dport:0,proto 30480

      show platform algo chip 0 acl table la

      Final revision
         Hw Acl ID 1

            Table ID Mask group ID Mask group descriptor
            -------- ------------- ------------------------------------------
            0        3             ipv4PAcl,sip:9,dip:0,sport:0,dport:0,proto
            1        3             ipv4PAcl,sip:9,dip:0,sport:0,dport:0,proto
            2        3             ipv4PAcl,sip:9,dip:0,sport:0,dport:0,proto
            4        3             ipv4PAcl,sip:9,dip:0,sport:0,dport:0,proto
            5        3             ipv4PAcl,sip:9,dip:0,sport:0,dport:0,proto


      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

      4/29/2019

      How to see the open bug in Arista EOS

      Generally, you can see the list of the open bugs in the software release note. Another way is to go to arista.com, click Support in the menu bar, then select the "Software Bug Portal".

      Or if you know the specific bug id, you can get it like https://www.arista.com/en/support/software-bug-portal/bugdetail?bug_id=<bug_id>

      3/05/2019

      Install Arista EOS Swix

      Reference:
      In the Linux world, RPM package is used for software installation. Simply put, the swix (software image extension) is a software package which contains multiple RPM files and a manifest file, which is used to install software or software patch on Arista EOS. 

      Generally, a swix is installed in the following steps:
      1. copy to local extension directory - "scp, copy"
      2. install - "extension"
      3. copy them to boot-extension - "copy"
      4. if a modular system, install on the standby supervisor - "session"
      5. restart agents or reset hardware components if required - "agent terminate"

      Additionally, 
      1. uninstall - "no extension"
      2. remove packet - "delete
      3. If both sup running mismatched swix, login console and reset boot-extension file

      Below is the step by step:


      Step 1 - copy
      [admin@eosrouter flash]$ scp solomonyang@server:/users/solomonyang/swix/*swix /mnt/flash
      patch.swix                                                                            100%   11MB  11.4MB/s   00:00

      eosrouter#copy flash:patch.swix extension:
      eosrouter#show extensions
      Name                          Version/Release      Status      Extension
      ----------------------------- -------------------- ----------- ---------
      patch.swix                    1.0.4 .              A, NI       6

      A: available | NA: not available | I: installed | NI: not installed | F: forced

      eosrouter#show extensions detail
             Name: patch.swix
          Version: 1.0.4
          Release: blahblah
         Presence: available
           Status: not installed
          Summary: SandFap agent related libs

         Packages:
       Total size: 0 bytes
      Description: SandFap agent related libs.

      Step 2 - install

      eosrouter#extension patch.swix
      eosrouter#show extensions
      Name                          Version/Release      Status      Extension
      ----------------------------- -------------------- ----------- ---------
      patch.swix                    1.0.4                A, I        6


      Step 3 - copy to boot extension

      eosrouter#show installed-extensions
      patch.swix
      eosrouter#show boot-extensions
      eosrouter#copy installed-extensions boot-extensions
      Copy completed successfully.
      eosrouter#show boot-extensions
      patch.swix


      Step 4 - install them on standby sup

      eosrouter#copy flash:patch.swix supervisor-peer:/mnt/flash
      Copy completed successfully.

      eosrouter#session peer-supervisor
      Warning: Permanently added '[127.1.0.2]:3601' (RSA) to the list of known hosts.

      WARNING - you are currently logged in to the standby supervisor.
      Not all cli commands are available or supported. Configuration mode
      is disabled for SSO.

      s1:eosrouter#copy flash:patch.swix extension:
      Copy completed successfully.
      s1:eosrouter#extension patch.swix
      s1:eosrouter#copy installed-extensions boot-extensions
      Copy completed successfully.

      Step 5 - restart agents or reset hardware component

      For some software patches, it is required to restart software agents or hardware components to make patch effective. 

      eosrouter#show agent names | grep SandFap
      SandFap-Linecard3
      SandFap-Linecard4
      SandFap-Linecard5

      eosrouter#agent SandFap-Linecard3 SandFap-Linecard4 SandFap-Linecard5 terminate
      SandFap-Linecard3 was terminated
      SandFap-Linecard4 was terminated
      SandFap-Linecard5 was terminated

      Also you need to do the same on the standby sup

      How to fix unmatched swix'ed sup

      If you run into unmatched swix supervisor due to mis-configuration, the way to fix them is as follows:

      1. Login in the console of both supervisor. Sometimes the standby sup is at bad shape, then you have to fix it in Aboot mode

      Arista Networks EOS 4.20.5.2F
      localhost login: admin
      [PyServer ar.Aaa not responding, still trying -- is it running?]

      2. Reboot both and press ctrl-C to enter Aboot mode

      3. Vi /mnt/flash/boot-extensions to remove swix entries. Then reboot so you will have a clean EOS w/o any extensions. 

      12/02/2018

      Arista EOS - customized CLI

      https://www.arista.com/assets/data/pdf/Whitepapers/Arista_EOS_parser.pdf

      Arista EOS CLI is implemented in Python, so you can customize the CLI yourself. Of course it is limited to simple output instead of complicated contents.  

      Step 1: Modify the CLI script

      bn303.17:40:17#bash

      Arista Networks EOS shell

      [admin@bn303 ~]$ cd /usr/lib/python2.7/site-packages/CliPlugin/
      [admin@bn303 CliPlugin]$ vi RoutingBgpShowCli.py
      [admin@bn303 CliPlugin]$ sudo vi RoutingBgpCli.py

      Step 2: save the new CLI script and load up during boot

      copy the modified to /mnt/flash
      the /usr/lib is file system in memory, unsustainable after reboot. 
      vi /mnt/flash/rc.eos, so copy the save script to the location

      11/30/2018

      Arista EOS, SSO support starts from 4.20.5F

      On Sand platform, 7500R/E series. And 4.20.5F was released around Arp 2018. (bl)

      We have 2 commands to check if system is sso-ready:
      • wait-for-warmup checks for any agent to be not ready
      • show redundancy stat is to ensure sso stage participating agents to be warm
      And better to run these 2 commands on both sup:


      bn302.10:49:50#wait-for-warmup
      bn302.10:51:11#show redundancy states
        my state = ACTIVE
      peer state = STANDBY HOT
            Unit = Primary
         Unit ID = 1

      Redundancy Protocol (Operational) = Stateful Switchover
      Redundancy Protocol (Configured) = Stateful Switchover
      Communications = Up
      switchover completion timeout = 120.0 seconds (default)
      Not ready for switchover (Agents not ready in standby supervisor)
      Agents not ready =
         Sand

        Last switchover time = 10:00:13 ago
      Last switchover reason = Supervisor has control of the active supervisor lock
      bn302.10:51:16#sess peer-supervisor wait-for-warmup

      bn302.10:51:29#sess peer-supervisor show redu stat
        my state = STANDBY HOT
      peer state = ACTIVE
            Unit = Secondary
         Unit ID = 2

      Redundancy Protocol (Operational) = Stateful Switchover
      Redundancy Protocol (Configured) = Stateful Switchover
      Communications = Up
      switchover completion timeout = 120.0 seconds (default)
      Not ready for switchover (Agents not ready in standby supervisor)
      Agents not ready =
         Sand

      11/29/2018

      Arista Linux Essential (2)

      Useful Utilities
      • Date/time
        • date +%Y%m%d-%H%M%S
        • Epoch - Linux born time
      • Sort
        • du -s /var/* | sort -n
        • -n: numeric order
      • Cut
        • cut -d: -f:1,6 /etc/password
        • -c: cut columns
      • Diff:
        • Cli -p15 -c "show run" | diff -y -w -B --suppress-common-lines - /mnt/flash/startup-config
        • -B --ingore-blank-lines
        • -y --side-by-side
        • -w --ignore-all-space
      • regexp:
        • greedy vs lazy, ? at the end of pattern
      • grep = global reg exp print
        • -i: ignore case
        • -v: inverse, not-matching
        • -A: print # lines AFTER matching
        • -B: print # lines BEFORE matching
      • sed = powerful stream editor
        • remove quotes: sed -e 's/"//g'
        • reverse ip address:
          • echo "10.20.30.40" | sed -e 's/\([0-9]+\)\.\([0-9]+\)\.\([0-9]+\)\.\([0-9]+\)/\4.\3.\2.\1/'
          • reverse A-record to fwd record
      • awk
        • awk -F: '{print $1, $6}
        • alias shmc show int | awk '/^[A-Z]/ { intf=$1 } 
      • tar
        • tar czvf config.1.gz config.1

      [admin@bn303 etc]$ Cli -p15 -c "show run" | diff -y -w -B --suppress-common-lines - /mnt/flash/startup-config
      ! Command: show running-config        | ! Startup-config last modified at  Wed Nov 28 17:01:44 2018 b
      ! device: bn303 (DCS-7512N, EOS-4.20.1F)       | ! device: bn303 (DCS-7512N, EOS-4.20.10M)