Skip to content
Arista Switch Command Cheat Sheet

Arista Switch Command Cheat Sheet

These are typically executed on an EOS (Extensible Operating System) based Arista switch. Remember to replace the placeholders <VLAN_ID>, <INTERFACE>, <IP_ADDRESS>, and <PREFIX> with your actual values.

Please note that using these commands improperly can disrupt network service. Always verify with documentation and Arista's official resources, especially when you're configuring live devices.

Category Command Description
Basic Commands cli Enter the command line interface
exit Exit from the current command line level
show version Show system information
show interfaces status Show interface status
Configuration Commands configure terminal Enter the global configuration mode
vlan <VLAN_ID> Create a VLAN
name <VLAN_NAME> Assign a name to VLAN
interface Ethernet<INTERFACE><br>switchport access vlan <VLAN_ID> Assign an interface to a VLAN
interface Ethernet<INTERFACE><br>switchport mode trunk Set an interface as a trunk
interface Ethernet<INTERFACE><br>switchport trunk allowed vlan add <VLAN_ID> Add a VLAN to a trunk
interface Ethernet<INTERFACE><br>ip address <IP_ADDRESS>/<PREFIX> Assign an IP address to an interface
Verification Commands show vlan Verify VLAN configuration
show interface Ethernet<INTERFACE> Verify interface configuration
show ip interface brief Verify IP configuration
Miscellaneous Commands copy running-config startup-config Save running configuration to startup configuration
erase startup-config Erase startup configuration
reload Reboot the switch
Interface Commands interface Ethernet<INTERFACE><br>description <DESCRIPTION> Setting a description on an interface
interface Ethernet<INTERFACE><br>shutdown Shutting down an interface
interface Ethernet<INTERFACE><br>no shutdown No shutdown (Enable) an interface
interface Ethernet<INTERFACE><br>spanning-tree portfast Setting a port as a Spanning Tree Protocol (STP) edge port
Routing & VLAN Commands ip route 0.0.0.0/0 <NEXT_HOP_IP> Add a default route
ip route <DESTINATION_NETWORK> <SUBNET_MASK> <NEXT_HOP_IP> Adding a static route
interface Vlan<VLAN_ID> Create a VLAN interface (for routing)
interface Vlan<VLAN_ID><br>ip address <IP_ADDRESS>/<PREFIX> Setting an IP address on a VLAN interface
Security Commands enable secret <PASSWORD> Configuring a password for the 'enable' command
username <USERNAME> secret <PASSWORD> Configuring a user name and password for login
Troubleshooting Commands ping <IP_ADDRESS> Ping a remote IP address
traceroute <IP_ADDRESS> Trace the network path to a remote IP
show mac address-table Inspect the MAC address table
show arp Check the ARP table
show processes cpu Display CPU utilization
show processes memory Display memory utilization

Please replace the placeholders <VLAN_ID>, <INTERFACE>, <IP_ADDRESS>, <PREFIX>, <VLAN_NAME>, <DESCRIPTION>, <PASSWORD>, <USERNAME>, <NEXT_HOP_IP>, <DESTINATION_NETWORK>, <SUBNET_MASK> with your actual values.

Basic Commands

  • Enter the command line interface: cli
  • Exit from the current command line level: exit
  • Show system information: show version
  • Show interface status: show interfaces status

Configuration Commands

Enter the global configuration mode:

configure terminal

Create a VLAN:

php
vlan <VLAN_ID>

Assign a name to VLAN:

php
name <VLAN_NAME>

Assign an interface to a VLAN:

csharp
interface Ethernet<INTERFACE> switchport access vlan <VLAN_ID>

Set an interface as a trunk:

csharp
interface Ethernet<INTERFACE> switchport mode trunk

Add a VLAN to a trunk:

csharp
interface Ethernet<INTERFACE> switchport trunk allowed vlan add <VLAN_ID>

Assign an IP address to an interface:

csharp
interface Ethernet<INTERFACE> ip address <IP_ADDRESS>/<PREFIX>

Verification Commands

  • Verify VLAN configuration: show vlan
  • Verify interface configuration: show interface Ethernet<INTERFACE>
  • Verify IP configuration: show ip interface brief

Miscellaneous Commands

  • Save running configuration to startup configuration: copy running-config startup-config
  • Erase startup configuration: erase startup-config
  • Reboot the switch: reload

Remember to save any changes with the write or copy running-config startup-config command to ensure the configuration stays after a reboot. Always consult the Arista documentation or a qualified network professional if you are unsure about any command.

These commands work for Arista switches running the EOS operating system. As with any command line tool, be sure to use these commands carefully and only if you're certain of their function.

Interface Commands

Setting a description on an interface:

csharp
interface Ethernet<INTERFACE> description <DESCRIPTION>

Shutting down an interface:

arduino
interface Ethernet<INTERFACE> shutdown

No shutdown (Enable) an interface:

arduino
interface Ethernet<INTERFACE> no shutdown

Setting a port as a Spanning Tree Protocol (STP) edge port:

csharp
interface Ethernet<INTERFACE> spanning-tree portfast

Routing & VLAN Commands

Add a default route:

php
ip route 0.0.0.0/0 <NEXT_HOP_IP>

Adding a static route:

php
ip route <DESTINATION_NETWORK> <SUBNET_MASK> <NEXT_HOP_IP>

Create a VLAN interface (for routing):

csharp
interface Vlan<VLAN_ID>

Setting an IP address on a VLAN interface:

csharp
interface Vlan<VLAN_ID> ip address <IP_ADDRESS>/<PREFIX>

Security Commands

Configuring a password for the 'enable' command:

bash
enable secret <PASSWORD>

Configuring a user name and password for login:

php
username <USERNAME> secret <PASSWORD>

Troubleshooting Commands

Ping a remote IP address:

php
ping <IP_ADDRESS>

Trace the network path to a remote IP:

php
traceroute <IP_ADDRESS>

Inspect the MAC address table:

css
show mac address-table

Check the ARP table:

sql
show arp

Display CPU utilization:

sql
show processes cpu

Display memory utilization:

sql
show processes memory

 

Important Note

Whenever making changes to a live network device, make sure to save your configuration changes. On Arista switches, use the following command to save:

arduino
write

or

arduino
copy running-config startup-config

If you do not save your changes and the device is powered off or rebooted, all changes will be lost.

As always, if you're unsure about a command, consult the Arista documentation, use the '?' help feature in the CLI, or consult with a network professional.

Previous article The Dawn of Next-Generation Networking Switches: Unveiling a Paradigm Shift
Next article Understanding Network Hardware: Routers vs. Switches vs. Hubs

Compare products

{"one"=>"Select 2 or 3 items to compare", "other"=>"{{ count }} of 3 items selected"}

Select first item to compare

Select second item to compare

Select third item to compare

Compare