Posted on October 7, 2021 3:01 pm
 |  Asked by Luca Nicosia
 |  64 views
0
0
Print Friendly, PDF & Email

Hello,

I’m new with Arista cEOS. I would like to create a testing environment with 2 docker container running cEOS version 4.21.15M (the version is not important, I chose this version because it was written inside a guide). In order to test well these containers I need that they can run a ssh-server, but they cannot even ping each other.

Can you tell me how to do such thing?

These are command that I executed:

docker create -p 22 –name=ceos1 –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 ceosimage:4.21.15M /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

docker create -p 22 –name=ceos1 –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 ceosimage:4.21.15M /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

docker network create net1
docker network create net2

docker network connect net1 ceos1
docker network connect net1 ceos2
docker network connect net2 ceos1
docker network connect net2 ceos2
docker start ceos1 ceos2

Thanks in advance

Luca

0
Posted by Tamas Plugor
Answered on October 15, 2021 4:58 pm

Hi Luca,

Not sure if you found your answer already or not, if not, that seems to be some docker networking issue then.

I'd highly recommend automating the deployment of these containers as it can help a lot with the underlying network infra and also much easier to build bigger topologies. One of the most popular tool for this is containerlab: https://containerlab.srlinux.dev/quickstart/

It's very easy to setup, and you can create arbitrary topologies just by definining everything in your yaml file. If you want to take things to the next level, checkout this cool project we have on github: https://github.com/arista-netdevops-community/avd-cEOS-Lab which uses containerlab, ceos-lab and ansible-avd to provision varios EVPN topologies.

If you're into k8s, then check out Google's new kubernetes network emulation tool: https://github.com/google/kne

With that said I'd recommend using the latest EOS versions (4.21 is pretty ancient at this stage and there've been lots of improvements added since, especially on cEOS-lab side)

FWIW, I tried this:

 

# docker create --name=ceos1 -p 4000:8080 -p 4001:6030 -p 4002:6061 -p 4003:8081 -p 4423:443 --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

# docker create --name=ceos2 -p 4100:8080 -p 4101:6030 -p 4102:6061 -p 4103:8081 -p 4523:443 --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

# docker network connect net1 ceos1
# docker network connect net1 ceos2
# docker network connect net2 ceos2
# docker network connect net2 ceos1

configured the IPs from docker inspect ceos1 and docker inspect ceos2 and can ping and ssh to the containers just fine

HTH,

Tamas

 

 

Post your Answer

You must be logged in to post an answer.