• Tag : EOS

 
 

How do I enable configure commands via HTTP API?

I'm working with a 7050s which has the http interface enabled and I am able to post non-privileged show commands and receive successful json output (e.g. show interfaces).  However, when I attempt to execute a command that requires configuration mode the command fails with the error message: ' 'configure' failed: invalid command.'   Executing 'show privilege' from the client indicates that the privilege level is 1, and so I assumed that by assigning the default privilege of 15 to the user that the configure command would be successful.  After adding a user: username newuser privilege 15 secret 0 ######  role...
Continue reading →

Packaging and installing EOS extensions

EOS follows the Fedora model of packaging and distributing software as RPMs. EOS extensions can be packaged either as normal RPMs, or as a bundle of RPMs called a SWIX. Creating an EOS extension as an RPM A standard RPM can be used for packaging EOS extensions. Documentation on how to build an RPM can be found in the rpmbuild man page, on the rpm.org website at http://www.rpm.org/wiki/Docs, or on the Fedora Project Wiki at http://fedoraproject.org/wiki/How_to_create_an_RPM_package. The following example shows a quick way to create an RPM extension for a fixed set of files, in this case a script called MyTestExtension...
Continue reading →

How to collect interface statistics from bash

Watch interface counters, update interval 10 second (defined by the -n flag): [user@Arista ~]$watch -n 10 "FastCli -c 'show int e1 count rates'" Note: This command can also be run from the CLI: Arista#watch 10 show int e1 count rates Watch interface counters, update interval 10 second & highlight differences (defined by the -d flag): [user@Arista ~]$ bash watch -d -n 10 "FastCli -c 'sh int e1 count rates'" Note: This command can also be run from the CLI: Arista#watch 10 diff show int e1 count rates Collect the interface names and the corresponding IP addresses (for all interfaces) to a...
Continue reading →

Debugging EOS agents

EOS’s architecture is built around the notion of agents. While the CLI show commands offer some great insights into the operational status of the switch, there is deeper level of detail that can be gathered from the agents by using a EOS debugging feature called agent tracing. Through this feature, which delivers live debug output to the CLI, EOS provides extensive troubleshooting information and enables users to debug complex control plane or protocol layer interactions. To configure agent tracing, first check the list of available agents. For example, in order to see the list of all agent starting with ‘A’, use: Arista#show trace...
Continue reading →

How to store and view previous contents of ‘show tech-support’

Introduction Starting with EOS 4.8.1, Arista introduced a unique feature called CLI Scheduler. Besides helping with troubleshooting and debugging Arista switches, this feature is used in order to automatically save the last 100 outputs of show tech-support (taken every hour). Please see an Arista EOS Manual for further details on the CLI Scheduler. Scheduling a show tech-support command The schedule command facilitates the periodic execution of a specified CLI command. Command parameters can be used in order to configure: the interval between consecutive executions of the command the maximum number of log files to be saved Starting with 4.8.1, by default, the...
Continue reading →

SSH login without password

This article describes how you can configure your switch with a pre-shared SSH key from a host. 1. Create the user account on the switch   Arista(config)#username <user> privilege 15 secret <secret password> 2. Generate SSH key files on the SSH client host. If you already have the SSH key files, skip to step 3. <host>$ssh-keygen -t dsa -f testkey Generating public/private dsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in testkey. Your public key has been saved in testkey.pub. The key fingerprint is: 38:dd:3a:68:ea:36:f1:9b:fa:69:ba:43:38:2f:98:f0 fred@HOST1.yourdomain.local The key's randomart image...
Continue reading →

Email client configuration in EOS

This article covers the configuration and use of email in Arista EOS. 1) Configuring Email Arista switches can be configured as email clients and can be used to send email alerts through event handlers (which trigger an action when a certain event happens, for example when an interface goes down). This capability is in addition to the other management and monitoring methods available in EOS. Email can also be used from the CLI, as a convenient way to retrieve information for support. EOS email supports both TLS and SMTP authentication. Arista(config)#email Arista(config-email)#? auth Email account authentication from-user Send email from...
Continue reading →

Programmatically update your routing table

Overview This article describes a script which is designed to allow the insertion/removal of a route in/from the routing table. If you want a way to remotely add/delete routes to/from your routing table, then this is the tool for you – using it will make insertion/removal of static routes as easy as running a script on any remote device that supports Python. How to get the code: Download the code Use your Github account and fork it (remember to contribute back) Installation The script (updateRoute) can be run/installed on any device that runs Python 2.7 or later. In order to run updateRoute, first...
Continue reading →

EOS ecosystem partner: SAP

See what SAP’s Global Managing Board Member Vishal Sikka has to say about the partnership between SAP and Arista: http://www.youtube.com/watch?v=5_xPSKKC2NE

Dynamically update your interface name via port auto-description

Overview: Port auto-description will dynamically update the port description based on the LLDP information received from the neighbour. As always we are looking for your feedback please let us know if you have ideas on how to improve this script or other ideas… The tool: The script, called ‘portAuto’, will dynamically change the port description based on the neighbour’s LLDP information. This could be used as a stand alone script or part of a larger toolset. How to get the code: Get the code directly from Github https://github.com/arista-eosext/PortAutoDescription 11 forks. 15 stars. 3 open issues. Recent commits: Update README.md, GitHub Add unix...
Continue reading →

Linux as a Switch Operating System: Five Lessons Learned

Arista spent the last nine years building a switch operating system based on Linux, including nearly six years of field experience. Here are five lessons we learned along the way. Lesson 1. It’s okay to leave the door unlocked. We weren’t the first to put Linux on a switch, but we were the first to leave it open. By “open”, I mean that an administrator can get a root shell on the switch, with access to all of the standard Linux tools from awk to zip. A few naysayers believed that customers would run with scissors, hurt themselves, and blame...
Continue reading →

Understanding EOS CLI implementation

This document gives an overview of the some of the APIs used for developing CLI Plugins. Although it tries to be as complete as possible, it only focuses on the most common APIs used by the CLI Plugins and it is not an exhaustive description of all the interfaces. The document is relevant for EOS version 4.12.0, although parts of the document might also apply to older releases. “Hello world!” example TestCli.py # Copyright(c)2013 AristaNetworks,Inc. All rights reserved. # Arista Networks, Inc. Confidential and Proprietary. import BasicCli import CliParser from CliModel import Model # Model ­ only required for eAPI...
Continue reading →

Reacting to syslog-triggered events

EOS in tandem with Python scripting can provide the network operator an invaluable tool that is driven by local log entries on the switch. The script presented here continuously monitors /var/log/messages for new entries as it contains verbose, unfiltered entries. The script then searches each log entry using the built-in Python regular expression module. When a matching entry is found (this script is looking for major errors) it saves the output of ‘show tech-support’ to internal flash. For every match, the script checks for the existence of a ‘show tech-support’ file to ensure it doesn’t create a duplicate entry for...
Continue reading →

EOS extensions on GitHub

A collection of scripts and examples on how to extend EOS using Python can be found in the following repository on GitHub: arista-eosext 18 repositories, 0 followers.

How to generate syslog messages using Python

Arista EOS extensions can be easily configured to generate syslog messages. This documents provides an overview of the APIs which can be used in order to achieve that and shows a few examples. The examples presented in the following sections were tested against EOS-4.12.0. Basic example #!/usr/bin/env python # Copyright (c) 2013 Arista Networks, Inc. All rights reserved. # Arista Networks, Inc. Confidential and Proprietary. import syslog syslog.openlog( 'myTestLog', 0, syslog.LOG_LOCAL4 ) syslog.syslog( '%%TEST-6-LOG: Log msg: %s' % 'test msg' ) Result Apr 17 07:15:40 <hostname> myTestLog: %TEST-6-LOG: Log msg: test msg See the official Python documentation for more details.

Which is the mount point in Sysdb for static routes?

I am trying to use SysDb with python to create a route. e.g. I want to have route for subnet 10.0.0.0/24 with next hop on 192.0.0.1. But I am not able to find a correct mount point to be able to do this. It will be great if someone can help me get this correct.

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: