Date created: 06/08/22 13:06:00. Last modified: 06/08/22 14:57:33

cEOS Overview

Using cEOS With Containerlab

An important note is that this is on a fresh Ubuntu 22.04 install and a cEOS version of at least 4.28.0M is being used (4.28.1F in this case).
Use of pre 4.28.0M cEOS images required the host OS to be using cgroups to v1. As of Ubuntu 21 cgroups v2 is being used. Since cEOS 4.28.0M cgroups v2 is supported. # Install Docker # https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository sudo usermod -aG docker $USER # ^ Log out and then in again to take effect # Install Containerlab # https://containerlab.dev/install/ #Import image: docker import cEOS64-lab-4.28.1F.tar.xz ceos:4.28.1F_x64 sha256:64460eb59f50ef24cba3d0d633a66a9372dc0db9e408c2de58359a777cfcc02c # Run the image as a test, note that all the -e options are required in addition to options being parsed to /sbin/init, even though they are the same set of option, both sets are needed! # Also note, the container is run in the background. Once the container is fully up and running it doesn't drop to any sort of CLI. One needs to start the Arista CLI process separately. docker run \ --name ceos_4.28.1F_x64 \ --privileged \ -p 4443:443 \ -td \ --rm \ -e INTFTYPE=eth \ -e ETBA=1 \ -e SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 \ -e CEOS=1 \ -e EOS_PLATFORM=ceoslab \ -e container=docker \ -e MAPETH0=1 \ -e MGMT_INTF=eth0 \ ceos:4.28.1F_x64 \ /sbin/init systemd.setenv=INTFTYPE=eth systemd.setenv=ETBA=1 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 # These are the last log lines to appear before the device is ready for use: docker logs ceos_4.28.1F_x64 .... [ OK ] Started EOS Warmup Service. Starting This init script starts th…system and hardware properties.... [ OK ] Started This init script starts the…n system and hardware properties.. [ OK ] Reached target Multi-User System. [ OK ] Reached target Graphical Interface. Starting Update UTMP about System Runlevel Changes... [ OK ] Started Update UTMP about System Runlevel Changes. # Start the "Cli" process on the container - note the capical "C" character !!! docker exec -it ceos_4.28.1F_x64 Cli ba4ec22a83e6>enable ba4ec22a83e6#show interfaces description Interface Status Protocol Description Ma0 up up ba4ec22a83e6#show ver Arista cEOSLab Hardware version: Serial number: D707EC2CAAD981AF78C348C64A6AFD95 Hardware MAC address: 0242.ac6a.979d System MAC address: 0242.ac6a.979d Software image version: 4.28.1F-27567367.4281F (engineering build) Architecture: x86_64 Internal build version: 4.28.1F-27567367.4281F Internal build ID: 6f301867-3225-4d36-bc3f-7cd04e39fb76 Image format version: 1.0 Image optimization: None cEOS tools version: 1.1 Kernel version: 5.15.0-37-generic Uptime: 1 minute Total memory: 15170180 kB Free memory: 12910140 kB ba4ec22a83e6#exit docker container rm --force ceos_4.28.1F_x64 # Create a containerlab topology file vi v6sr_evpn.clab.yml name: v6sr_evpn prefix: __lab-name topology: kinds: ceos: image: ceos:4.28.1F_x64 nodes: pe1: kind: ceos pe2: kind: ceos p1: kind: ceos p2: kind: ceos pe3: kind: ceos pe4: kind: ceos links: - endpoints: ["pe1:eth3", "pe2:eth3"] - endpoints: ["pe1:eth1", "p1:eth1"] - endpoints: ["pe1:eth2", "p2:eth1"] - endpoints: ["pe2:eth1", "p1:eth2"] - endpoints: ["pe2:eth2", "p2:eth2"] - endpoints: ["pe3:eth3", "pe4:eth3"] - endpoints: ["pe3:eth1", "p1:eth3"] - endpoints: ["pe3:eth2", "p2:eth3"] - endpoints: ["pe4:eth1", "p1:eth4"] - endpoints: ["pe4:eth2", "p2:eth4"] # Build and run the topology sudo containerlab deploy --topo v6sr_evpn.clab.yml -g INFO[0038] Created /home/bensley/contaierlab/v6sr_evpn/clab-v6sr_evpn/graph/v6sr_evpn.clab.dot INFO[0038] Adding containerlab host entries to /etc/hosts file +---+---------------+--------------+------------------+------+---------+----------------+----------------------+ | # | Name | Container ID | Image | Kind | State | IPv4 Address | IPv6 Address | +---+---------------+--------------+------------------+------+---------+----------------+----------------------+ | 1 | v6sr_evpn-p1 | 454195176c87 | ceos:4.28.1F_x64 | ceos | running | 172.20.20.4/24 | 2001:172:20:20::4/64 | | 2 | v6sr_evpn-p2 | 756f9b37c6f9 | ceos:4.28.1F_x64 | ceos | running | 172.20.20.5/24 | 2001:172:20:20::5/64 | | 3 | v6sr_evpn-pe1 | 6928eea6b896 | ceos:4.28.1F_x64 | ceos | running | 172.20.20.7/24 | 2001:172:20:20::7/64 | | 4 | v6sr_evpn-pe2 | 9164801d58c4 | ceos:4.28.1F_x64 | ceos | running | 172.20.20.6/24 | 2001:172:20:20::6/64 | | 5 | v6sr_evpn-pe3 | 9bf3c16cd820 | ceos:4.28.1F_x64 | ceos | running | 172.20.20.2/24 | 2001:172:20:20::2/64 | | 6 | v6sr_evpn-pe4 | bcc1b07885a3 | ceos:4.28.1F_x64 | ceos | running | 172.20.20.3/24 | 2001:172:20:20::3/64 | +---+---------------+--------------+------------------+------+---------+----------------+----------------------+ # The default login generated by containerlab is admin / admin, devices can now be connected to via SSH or by starting the Cli process: docker exec -it v6sr_evpn-pe1 Cli ssh admin@v6sr_evpn-pe1