Nicholas Morrison - Networking Specialist

S1E3 - Introduction to the Arista CLI

S1E3 - Introduction to the Arista CLI

(and a bit about how it works with containerlab and docker)

Tech Stack overview

  • VM in the Hetzner Cloud (named “netlab.nanocat.net”)
  • .. running Linux (Debian 11)
  • .. and docker
  • .. and containerlab
  • containerlab creates containers based on a YAML file
  • and runs EOS images (called cEOS) that I downloaded from Arista.com
  • (and also tiny Linux images, to act as “PCs” in the LAB)

Connecting to the lab server

Connect to the lab server:

local$ ssh-keygen -R netlab.nanocat.net
local$ ssh [email protected]
Password: (see discord)

Connect to your router:

lab@netlab$ list-devices
lab@netlab$ connect DEVICE

enable and disable modes

You will almost always enter enable as your first command after logging into your EOS (or IOS) device.

enable (privileged) mode

router>enable
router#
  • prompt#
  • changes to the configuration possible
  • more access to detailed show commands

disable (unprivileged) modes

router#disable
router>
  • prompt>
  • no configuration changes possible
  • safe, even for public access (search the web for “bgp looking glass telnet”)

? and <TAB>

  • ? and <TAB> are used for help and command completion respectively. Try entering these commands:

    • show ?
    • show ip ?
    • show ip route ?
    • sh<TAB> ip ro<TAB>
  • Commands can be abbreviated to their shortest unambiguous length. Try these:

    • show running-config
    • show running
    • show run
    • sh run
    • sh ru

The show command

Show commands tell us about the device hardware status, its protocols, software version, and so on.

Try these commands:

show version
show running-config
show interface
show interface status
show ip interface
show ip interface brief

Changing the Configuration

Entering “Global Configuration Mode”:

router#configure
router(config)#

Configuring an interface:

router(config)#interface ethernet1
router(config-if-eth1)#description This interface connects to the switch
router(config-if-eth1)#

Exiting interface configuration, back to global config, then exit config mode:

router(config-if-eth1)#exit
router(config)#exit
router#

Look at the configuration:

router#show running-config

Configuring an interface

Configuring an IP address on an ethernet interface:

router#configure
router(config)#interface ethernet1
router(config-if)#ip address 172.17.0.1/24
! IP configuration will be ignored while interface Ethernet1 is not a routed port.
router(config-if)#no switchport
router(config-if)#exit
router(config)#exit
router#show ip interface brief
...

Reconfiguring an interface

Changing an IP address on an ethernet interface:

router#configure
router(config)#interface ethernet1
router(config-if-eth1)#ip address 10.0.0.1/24
router(config-if-eth1)#end
router#show ip interface brief
...

Reconfiguring an interface, again

Removing the IP address from an ethernet interface:

router#configure
router(config)#interface ethernet1
router(config-if-eth1)#no ip address
router(config-if-eth1)#end
router#show ip int brief
...

Discovering our neighbours

Checking our LLDP neighbours:

router#show lldp neighbor
...

Ping another device:

router#ping 10.0.0.4
...