Showing posts with label CLI. Show all posts
Showing posts with label CLI. Show all posts

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

8/20/2018

Arista EOS 4.21 : L2 subinterface

Topology:

[rtr3]
  |
  | et2
  |    eth1.1
[rtr1]==============[rtr2]
  |    eth1.2
  | eth3
  |
[rtr4]

Configuration

interface et1.100
  encap dot1q vlan 100
  vlan id 1000
interface et1.200
  encap dot1q vlan 200
  vlan id 1000
interface eth2
  switch access vlan 1000
interface eth3
  switch mode trunk

L2 bridge domain
  • Above configuration is to create a L2 bridge domain of 4 end points - et1.100, et1.200, eth2 (access), eth3 (trunk). 
  • 1 bcast from et1.100, will be flood to et1.200, et2, et3
  • Vlan mapping is different, which is 1:1 relation. So no vlan 1000 on both et1.100 and et1.200
  • et1 must be "no switch". 
  • Feature is supported from 4.21.*?

Arista Eos 4.21: BGP DSCP Configuration

By default, the BGP packets' DSCP value is 0x0. Now customer wants to have it configurable. A global value is enough. New configuration/change doesn't tear down existing sessions. This feature is started from 4.21.*?

The configuration is quite simple:

router bgp 1
  bgp transport qos dscp 48

Arista EOS CLIs

Platform Dependent
  • Trident hw programming
    • show platform trident counter | egrep 'card|drop' | nz
    • show platform trident tcam detail | grep -i "LAG E" -A2
    • show platform trident L3 shadow my-station
  • Trident agent logs:
    • qtcat strataL3.qt | grep <prefix> 
Platform Independent:
  • evpn:
    • show l2rib input bgp
  • System:
    • show event-monitor mac
Software:
  • CVP:
    • management api http-commands
    •   no shutdown
    •   user cvpadmin privilege 15 role admin secret eosuper

4/06/2018

Eos: last 100 commands you ran

Starting from bloomington release - 4.20.4F, the following command will print out last 100 commands you ran and duration details. 

bn303.jhm.mlagA.profA0.w.14:21:02#bash CliCtrl --print-state | more
Activity Lock owner is: 0
Recently run commands:
TID: 17702, Duration: 0.0779159069061*, Start: 1523050110.22, End: None, Cmd: bash CliCtrl --print-state | more
TID: 17702, Duration: 0.139348983765, Start: 1523049662.16, End: 1523049662.3, Cmd: bash CliCtrl --print-state
TID: 17702, Duration: 0.00744891166687, Start: 1523049649.22, End: 1523049649.23, Cmd: enable
TID: 11106, Duration: 0.0013120174408, Start: 1523046913.33, End: 1523046913.33, Cmd: show monitor device-health category
TID: 11106, Duration: 0.00137400627136, Start: 1523046913.33, End: 1523046913.33, Cmd: show monitor device-health component
TID: 11106, Duration: 0.107572078705, Start: 1523046913.22, End: 1523046913.33, Cmd: show agent event history