ARISTA - CLI Commands

From IT-Arts.net


Return to Wiki Index


Basic Configuration Commands

  • enable - Enters privileged exec mode.
  • configure terminal or conf t - Enters global configuration mode.
  • show version - Displays EOS software version, device model, and hardware information.
  • show running-config - Displays the current active configuration.
  • show startup-config - Displays the configuration stored in NVRAM (startup config).
  • copy running-config startup-config - Saves the current running configuration to the startup configuration.
  • write memory or wr mem - Saves the running configuration to startup configuration.
  • reload - Reboots the switch/router.
  • hostname <name> - Configures the hostname of the device.

Interface Configuration

  • interface Ethernet <slot>/<port> - Enters the configuration mode for a specific Ethernet interface.
  • ip address <ip> <subnet-mask> - Configures an IP address on an interface.
  • no shutdown - Enables the interface (brings it up).
  • shutdown - Disables the interface (brings it down).
  • description <text> - Sets a description for an interface.
  • show interfaces - Displays statistics for all interfaces.
  • show interfaces Ethernet <slot>/<port> - Displays detailed statistics for a specific interface.

Routing and Switching

  • ip route <destination> <subnet-mask> <next-hop> - Configures a static IP route.
  • show ip route - Displays the routing table.
  • ip routing - Enables IP routing.
  • show vlan - Displays VLAN information.
  • vlan <vlan-id> - Configures a VLAN.
  • interface vlan <vlan-id> - Enters configuration mode for a VLAN interface (SVI).
  • spanning-tree mode <pvst|rstp|mstp> - Configures spanning tree protocol mode.
  • spanning-tree vlan <vlan-id> root primary - Configures the switch as the root bridge for a VLAN.

User and Privileges

  • username <username> privilege <level> secret <password> - Creates a user with a specific privilege level and password.
  • show users - Displays current user sessions.
  • enable secret <password> - Sets the password for entering privileged exec mode.

Monitoring and Troubleshooting

  • show logging - Displays the system log.
  • show processes - Displays CPU and memory usage.
  • show tech-support - Collects detailed system information for troubleshooting.
  • ping <destination> - Sends ICMP echo requests to verify network connectivity.
  • traceroute <destination> - Traces the path taken by packets to a destination.
  • show ip interface brief - Displays a summary of the interface IP addresses and status.

Security

  • ip access-list <name> - Creates or enters the configuration of an access control list (ACL).
  • show ip access-lists - Displays the configured ACLs.
  • interface Ethernet <slot>/<port> ip access-group <acl-name> in - Applies an ACL to an interface (inbound traffic).
  • no ip access-group <acl-name> in - Removes an ACL from an interface.
  • enable secret <password> - Set a password for privileged EXEC mode.

System Management

  • show system resources - Displays system resource usage.
  • show environment - Displays hardware environment (e.g., fan, temperature, power supply status).
  • show platform - Displays platform-specific information.
  • show mac address-table - Displays the MAC address table.
  • clear counters - Clears interface counters.

Advanced Features

  • vrf <vrf-name> - Configures a virtual routing and forwarding instance.
  • interface Ethernet <slot>/<port> vrf <vrf-name> - Assigns an interface to a specific VRF.
  • show vrf - Displays information about the VRFs configured on the system.
  • show ip bgp - Displays the BGP routing table.
  • show ip ospf - Displays the OSPF routing table and information.
  • show vrrp - Displays information about the Virtual Router Redundancy Protocol (VRRP).

Saving and Reverting Configurations

  • copy startup-config running-config - Copies the startup configuration to the running configuration.
  • rollback - Rolls back the configuration to a previous state.

Alias Commands

  • alias exec <alias-name> <command> - Creates an alias for a command in exec mode.
  • alias configure <alias-name> <command> - Creates an alias for a command in configuration mode.

Help and Command Reference

  • ? - Displays a list of available commands or options.
  • <command> ? - Displays the options available for a specific command.
  • show command: Displays more information about a command or its usage.