Posted on July 31, 2021 5:09 am
 |  Asked by Gangadhar Naredla
 |  78 views
RESOLVED
0
0
Print Friendly, PDF & Email

Hi,

Is there any way to hardcode the S/N  number of the cEOS, as  it generates a new one every time it rebooted in the docker.

I have added cEOS CVP, when the cEOS reboots CVP detects as new device as the S/N is changed.

0
Posted by Tamas Plugor
Answered on August 5, 2021 1:51 pm

Hi Gangadhar,

Yes there is, it's the same approach as with vEOS-lab where you can create the /mnt/flash/veos-config file and add the SN/MAC inside, but in case of cEOS-lab the file that has to be created is /mnt/flash/ceos-config, you can create that file on the host and volume mount it when you create your container, e.g.

1. create ceos-config file and add the serial number you'd want,e.g.:

# cat ceos-config
SERIALNUMBER=133713371337

2. create your container and volume mount that file with -v ~/ceos-config:/mnt/flash/ceos-config

e.g.:

docker create --name=ceos1337 -p 4000:8080 -p 4001:6030 -p 4002:6061 -p 4003:8081 -p 4423:443 -v ~/ceos-config:/mnt/flash/ceos-config --privileged -e INTFTYPE=eth -e ETBA=1 -e SKIP_ZEROTOUCH_BARRIER_IN_SYSDBINIT=1 -e CEOS=1 -e EOS_PLATFORM=ceoslab -e container=docker -i -t ceos:latest /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

3. login and check if the SN has been set:

# docker exec -it ceos1337 Cli
localhost>en
localhost#sh ver
 cEOSLab
Hardware version:
Serial number: 133713371337
Hardware MAC address: Not available
System MAC address: Not available

Software image version: 4.26.1F-22602519.4261F (engineering build)

HTH,
Tamas

Post your Answer

You must be logged in to post an answer.