|
| 1 | +# cEOS |
| 2 | + |
| 3 | +This document discusses how to use cEOS as DUT neighbor device. |
| 4 | + |
| 5 | +cEOS is the container-based EOS. All the software running inside |
| 6 | +the container. Compared with vEOS, cEOS has much smaller memory |
| 7 | +footprint. |
| 8 | + |
| 9 | +Follow [instruction](README.testbed.VsSetup.md) to setup cEOS testbed. |
| 10 | + |
| 11 | +In below example, there are four cEOS containers. |
| 12 | + |
| 13 | +``` |
| 14 | +lgh@jenkins-worker-15:~$ docker ps |
| 15 | +CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
| 16 | +fe48c207a51c ceosimage:4.23.2F-1 "/sbin/init systemd.…" 8 days ago Up 8 days ceos_vms6-1_VM0103 |
| 17 | +52297010e66a ceosimage:4.23.2F-1 "/sbin/init systemd.…" 8 days ago Up 8 days ceos_vms6-1_VM0102 |
| 18 | +8dd95269b312 ceosimage:4.23.2F-1 "/sbin/init systemd.…" 8 days ago Up 8 days ceos_vms6-1_VM0101 |
| 19 | +3a50dd481bfb ceosimage:4.23.2F-1 "/sbin/init systemd.…" 8 days ago Up 8 days ceos_vms6-1_VM0100 |
| 20 | +b91b48145def debian:jessie "bash" 8 days ago Up 8 days net_vms6-1_VM0103 |
| 21 | +d1ff26d84249 debian:jessie "bash" 8 days ago Up 8 days net_vms6-1_VM0102 |
| 22 | +1489f52b9617 debian:jessie "bash" 8 days ago Up 8 days net_vms6-1_VM0101 |
| 23 | +ce1214a008ed debian:jessie "bash" 8 days ago Up 8 days net_vms6-1_VM0100 |
| 24 | +``` |
| 25 | + |
| 26 | +## Resource consumption |
| 27 | + |
| 28 | +A cEOS containers consumes around 1G memory. |
| 29 | + |
| 30 | +``` |
| 31 | +lgh@jenkins-worker-15:~$ docker stats --no-stream |
| 32 | +CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 6 |
| 33 | +fe48c207a51c ceos_vms6-1_VM0103 2.04% 970.9MiB / 125.9GiB 0.75% 0B / 0B 365MB / 55.8GB 138 |
| 34 | +52297010e66a ceos_vms6-1_VM0102 2.19% 965.4MiB / 125.9GiB 0.75% 0B / 0B 237MB / 55.6GB 139 |
| 35 | +8dd95269b312 ceos_vms6-1_VM0101 1.93% 980.9MiB / 125.9GiB 0.76% 0B / 0B 300MB / 55.9GB 138 |
| 36 | +3a50dd481bfb ceos_vms6-1_VM0100 2.05% 970.2MiB / 125.9GiB 0.75% 0B / 0B 365MB / 56.1GB 138 |
| 37 | +``` |
| 38 | + |
| 39 | +## Network Setup |
| 40 | + |
| 41 | +We first create a base container `net_${testbed_name}_${vm_name}`, inject six ethernet ports into the base container, |
| 42 | +and then start cEOS `ceos_${testbed_name}_${vm_name}` container on top of the base container. The six ethernet ports |
| 43 | +are used for |
| 44 | +- 1 management port |
| 45 | +- 4 front panel ports to DUT |
| 46 | +- 1 backplane port to PTF docker |
| 47 | + |
| 48 | +``` |
| 49 | + +------------+ +----+ |
| 50 | + | cEOS Ma0 +--------- VM0100-m ---+ br | |
| 51 | + | | +----+ |
| 52 | + | | |
| 53 | + | | +--------------+ |
| 54 | + | Et1 +----------VM0100-t0---+ br-VM0100-0 | |
| 55 | + | | +--------------+ |
| 56 | + | | |
| 57 | + | | +--------------+ |
| 58 | + | Et2 +----------VM0100-t1---+ br-VM0100-1 | |
| 59 | + | | +--------------+ |
| 60 | + | | |
| 61 | + | | +--------------+ |
| 62 | + | Et3 +----------VM0100-t2---+ br-VM0100-2 | |
| 63 | + | | +--------------+ |
| 64 | + | | |
| 65 | + | | +--------------+ |
| 66 | + | Et4 +----------VM0100-t3---+ br-VM0100-3 | |
| 67 | + | | +--------------+ |
| 68 | + | | |
| 69 | + | | +--------------+ |
| 70 | + | Et5 +----------VM0100-back--+ br-b-vms6-1 | |
| 71 | + | | +--------------+ |
| 72 | + +------------+ |
| 73 | +``` |
| 74 | + |
| 75 | +## Configuration |
| 76 | + |
| 77 | +The `/mnt/flash` in cEOS container is mount to `/data/ceos/ceos_${testbed_name}_${vm_name}` on the host. The `/mnt/flash` |
| 78 | +contiains the configuration file and logs. |
| 79 | + |
| 80 | +``` |
| 81 | +lgh@jenkins-worker-15:~$ ls -l /data/ceos/ceos_vms6-1_VM0100/ |
| 82 | +total 40 |
| 83 | +-rw-rw-r--+ 1 root root 924 Mar 31 07:35 AsuFastPktTransmit.log |
| 84 | +drwxrwxr-x+ 2 root root 4096 Mar 31 03:31 Fossil |
| 85 | +-rw-rw-r--+ 1 root root 568 Mar 31 07:35 SsuRestore.log |
| 86 | +-rw-rw-r--+ 1 root root 568 Mar 31 07:35 SsuRestoreLegacy.log |
| 87 | +drwxr-xr-x+ 4 897 88 4096 Mar 31 07:35 archive |
| 88 | +drwxrwx---+ 3 root root 4096 Mar 18 06:12 debug |
| 89 | +drwxrwxr-x+ 2 root root 4096 Mar 18 06:12 fastpkttx.backup |
| 90 | +-rw-rw-r--+ 1 root root 180 Mar 31 07:35 kickstart-config |
| 91 | +drwxrwxr-x+ 3 root root 4096 Apr 8 09:11 persist |
| 92 | +-rw-rwxr--+ 1 root root 1915 Mar 18 06:12 startup-config |
| 93 | +``` |
| 94 | + |
| 95 | +## Login |
| 96 | + |
| 97 | +There are two ways to get into cEOS container |
| 98 | + |
| 99 | +1. docker exec |
| 100 | +``` |
| 101 | +lgh@jenkins-worker-15:~$ docker exec -it ceos_vms6-1_VM0100 Cli |
| 102 | +ARISTA01T1>show int status |
| 103 | +Port Name Status Vlan Duplex Speed Type Flags Encapsulation |
| 104 | +Et1 connected in Po1 full unconf EbraTestPhyPort |
| 105 | +Et2 connected 1 full unconf EbraTestPhyPort |
| 106 | +Et3 connected 1 full unconf EbraTestPhyPort |
| 107 | +Et4 connected 1 full unconf EbraTestPhyPort |
| 108 | +Et5 backplane connected routed full unconf EbraTestPhyPort |
| 109 | +Ma0 connected routed full 10G 10/100/1000 |
| 110 | +Po1 connected routed full unconf N/A |
| 111 | +
|
| 112 | +ARISTA01T1> |
| 113 | +``` |
| 114 | + |
| 115 | +2. ssh |
| 116 | +``` |
| 117 | +lgh@jenkins-worker-15:~$ ssh [email protected] |
| 118 | +Password: |
| 119 | +ARISTA01T1>show int status |
| 120 | +Port Name Status Vlan Duplex Speed Type Flags Encapsulation |
| 121 | +Et1 connected in Po1 full unconf EbraTestPhyPort |
| 122 | +Et2 connected 1 full unconf EbraTestPhyPort |
| 123 | +Et3 connected 1 full unconf EbraTestPhyPort |
| 124 | +Et4 connected 1 full unconf EbraTestPhyPort |
| 125 | +Et5 backplane connected routed full unconf EbraTestPhyPort |
| 126 | +Ma0 connected routed full 10G 10/100/1000 |
| 127 | +Po1 connected routed full unconf N/A |
| 128 | +
|
| 129 | +ARISTA01T1> |
| 130 | +``` |
| 131 | + |
0 commit comments