Arista EOS Configuration Cheat Sheet: Commands That Matter - 夜莺博客

Arista EOS Configuration Cheat Sheet: Commands That Matter

Arista EOS has become the operating system of choice in hyperscaler and enterprise data centers, and engineers coming from Cisco IOS will find the CLI familiar but different in the details — CIDR everywhere, port-channel instead of EtherChannel, VRRP instead of HSRP. This cheat sheet collects the configuration blocks that matter most in daily operations: secure management access, VLAN and trunk design, LACP port-channels, spanning tree, routing protocols, first-hop redundancy, and ACLs — each with a minimal, copy-paste-ready example. It is a distilled version of the CISCONET Training Solutions EOS reference, updated for current EOS releases.

Management and Security Hardening

hostname switch-1
enable secret <password>
username admin privilege 15 secret <password>
management ssh
  idle-timeout 5
  no shutdown
management api http-commands
  protocol https
  no shutdown

Note that EOS names interfaces as Ethernet1/Et1 without speed, and uses the Linux filesystem for flash.

VLANs, Trunks and Port-Channels

vlan 10
  name wireless
interface Ethernet1
  switchport mode access
  switchport access vlan 10
interface Ethernet1/1
  switchport mode trunk
  switchport trunk native vlan 999
  switchport trunk allowed vlan 10-12
interface Ethernet 1-2
  switchport mode trunk
  channel-group 1 mode active
interface Port-Channel 1
  switchport mode trunk

Spanning Tree and Port Protection

spanning-tree mode rapid-pvst
interface Ethernet1/1
  spanning-tree portfast
  spanning-tree bpduguard enable

Layer 3 and Routing

OSPFv2 with a global method, or directly on an interface:

router ospf 1
  router-id 172.16.255.1
  network 192.168.0.0/16 area 0
interface Ethernet1/1
  ip ospf 1 area 0

eBGP and an SVI for inter-VLAN routing:

router bgp 65001
  neighbor 192.168.1.2 remote-as 65000
  network 192.168.1.0/24
interface vlan 10
  ip address 172.16.1.1/24
  no shutdown

First-Hop Redundancy: VRRP

interface Ethernet1/1
  ip address 172.16.1.2/24
  vrrp 1
    ip 172.16.1.3
    priority 110
    preempt

ACLs and Monitoring

ip access-list extended HTTPS-FILTER
  permit tcp 192.168.1.0/24 host 172.33.1.1 eq 443
  deny tcp 192.168.1.0/24 any eq 23
  permit ip any any
interface Ethernet1/1
  ip access-group HTTPS-FILTER in

snmp-server community arista ro
logging host 192.168.3.1
ntp server 172.16.1.1 prefer

CLI Tips for Automation

  • Pipelining: show running-config | include hostname
  • Structured output: show interfaces json — perfect for eAPI/gNMI workflows.
  • Verify trunking with show interfaces switchport.

Go deeper with the Arista EOS MLAG configuration run book or the EOS upgrade via USB device walkthrough.

原文链接:https://www.cisconetsolutions.com/arista-eos-configuration-cheat-sheet