How to use Arista cEOS to build a topology to test features

Kevin W Tech Notes
3 min readFeb 20, 2021

1. Download cEOS image from Arista website and import into docker

[root@beta-control-01 Downloads]# docker import cEOS64-lab-4.25.1F.tar.xz  ceos:4.25.1F
sha256:a6e939129819fabf9fe58a92d8bbc95e4c6f169a68d12ad3d2d60a223fc0a49e

2. Create cEOS

[root@beta-control-01 Downloads]# docker create --name=ceos-r1 -p 4000:8080 -p 4001:6030 -p 4002:6061 -p 4003:8081 -p 4423:443 --privileged -e INTFTYPE=eth -e ETBA=4 -e SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 -e CEOS=1 -e EOS_PLATFORM=ceoslab -e container=docker -i -t ceos:4.25.1F /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
6e0b70df41787849aa4ad96ae4c7bb127e2ced0d0a2a34b7ddd0e19366292500

3. Create network and connet it

[root@beta-control-01 Downloads]# docker network create r1r2-0 
[root@beta-control-01 Downloads]# docker network connect r1r2-0 ceos-r1

4. Connect to ceos

[root@beta-control-01 Downloads]# docker exec -it ceos-r1 Clilocalhost(config)#show ver
cEOSLab
Hardware version:
Serial number:
Hardware MAC address: 0242.ac22.bd71
System MAC address: 0242.ac22.bd71
Software image version: 4.25.1F-20005270.4251F (engineering build)
Architecture: x86_64
Internal build version: 4.25.1F-20005270.4251F
Internal build ID: 37a9ea6d-2c81-487d-9c86-579348318c0a
cEOS tools version: 1.1
Kernel version: 3.10.0-1127.el7.x86_64
Uptime: 0 weeks, 0 days, 0 hours and 0 minutes
Total memory: 263618792 kB
Free memory: 251252600 kB
localhost(config)#

Or you can use the following docker-compose file to build a 5 nodes leaf-spine topology automatically

[root@beta-control-01 ceos]# cat docker-compose.yml
version: '3'
services:
ceos-1:
hostname: CEOS-1
image: 'ceos:4.25.1F'
command: /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
privileged: true
environment:
container: docker
CEOS: 1
EOS_PLATFORM: ceoslab
SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT: 1
ETBA: 4
INTFTYPE: eth
MGMT_INTF: eth0
MAPETH0: 1
networks:
default:
r1r4:
r1r5:
vm1:
ceos-2:
hostname: CEOS-2
image: 'ceos:4.25.1F'
command: /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
privileged: true
environment:
container: docker
CEOS: 1
EOS_PLATFORM: ceoslab
SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT: 1
ETBA: 4
INTFTYPE: eth
MAPETH0: 1
networks:
default:
r2r4:
r2r5:
vm2:
ceos-3:
hostname: CEOS-3
image: 'ceos:4.25.1F'
command: /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
privileged: true
environment:
container: docker
CEOS: 1
EOS_PLATFORM: ceoslab
SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT: 1
ETBA: 4
INTFTYPE: eth
MAPETH0: 1
networks:
default:
r3r4:
r3r5:
vm3:
ceos-4:
hostname: CEOS-4
image: 'ceos:4.25.1F'
command: /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
privileged: true
environment:
container: docker
CEOS: 1
EOS_PLATFORM: ceoslab
SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT: 1
ETBA: 4
INTFTYPE: eth
MAPETH0: 1
networks:
default:
r1r4:
r2r4:
r3r4:
ceos-5:
hostname: CEOS-r5
image: 'ceos:4.25.1F'
command: /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
privileged: true
environment:
container: docker
CEOS: 1
EOS_PLATFORM: ceoslab
SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT: 1
ETBA: 4
INTFTYPE: eth
MAPETH0: 1
networks:
default:
r1r5:
r2r5:
r3r5:
vm-1:
hostname: vm-1
image: 'ceos:4.25.1F'
command: /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
privileged: true
environment:
container: docker
CEOS: 1
EOS_PLATFORM: ceoslab
SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT: 1
ETBA: 4
INTFTYPE: eth
MAPETH0: 1
networks:
default:
vm1:
vm-2:
hostname: vm-2
image: 'ceos:4.25.1F'
command: /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
privileged: true
environment:
container: docker
CEOS: 1
EOS_PLATFORM: ceoslab
SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT: 1
ETBA: 4
INTFTYPE: eth
MAPETH0: 1
networks:
default:
vm2:
vm-3:
hostname: vm-3
image: 'ceos:4.25.1F'
command: /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=4 systemd.setenv=SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 systemd.setenv=CEOS=1 systemd.setenv=EOS_PLATFORM=ceoslab systemd.setenv=container=docker systemd.setenv=MAPETH0=1 systemd.setenv=MGMT_INTF=eth0
privileged: true
environment:
container: docker
CEOS: 1
EOS_PLATFORM: ceoslab
SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT: 1
ETBA: 4
INTFTYPE: eth
MAPETH0: 1
networks:
default:
vm3:
networks:
r1r4:
r1r5:
r2r4:
r2r5:
r3r4:
r3r5:
vm1:
vm2:
vm3:

# rebuild the docker container, this will wipe out all configurations

[root@beta-control-01 ceos]# docker-compose  up -d

# restart container without loss configuration

[root@beta-control-01 ceos]# docker-compose  stop
[root@beta-control-01 ceos]# docker-compose start

# wipe out everything

[root@beta-control-01 ceos]# docker-compose  down

--

--