Sign inSign up

xumamen/ceos

By xumamen

•Updated over 5 years ago

ceos images

Image
1

328

xumamen/ceos repository overview

⁠create ceos container:

sudo docker create --name=$1 --network=docker_mgmt --ip=$2 --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:default /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

(create docker network docker_mgmt before doing this, driver macvlan for external access)

⁠limitations:
  • ospf/isis may not work as linux interface naming "ethxxx" instead of "etxxx"
  • subinterface may not work on linux(works on macos)
  • use port-channel as a wrapper will be a workaround
  • for veth link, after attaching the interface into the namespace, cli cmd "agent Fru terminate" to make those links being shown in EOS.
⁠ create pc container
docker create --name u1 --network docker_mgmt --ip 10.0.64.111 --privileged -it ubuntu bash

(create docker network docker_mgmt before doing this, driver macvlan for external access)

⁠ start the containers
docker start u1 r101 r102
⁠ create topology using veth on linux
veth_namespace r101
veth_namespace r102
ip link add veth101 type veth peer veth102
ip link set dev veth101 netns r101
ip link set dev veth102 netns r102
ip netns exec r101 ip link set dev veth101 name eth1
ip netns exec r102 ip link set dev veth102 name eth1
ip netns exec r101 ip link set dev eth1 up
ip netns exec r102 ip link set dev eth1 up

veth_namespace r101 veth_namespace u1 ip link add veth103 type veth peer veth104 ip link set dev veth103 netns r101 ip link set dev veth104 netns u1 ip netns exec r101 ip link set dev veth103 name eth2 ip netns exec u1 ip link set dev veth104 name eth2 ip netns exec r101 ip link set dev eth2 up ip netns exec u1 ip link set dev eth2 up

veth_namespace(){ for instance in $@; do pid=docker-pid $instance 2>/dev/null if [ $? -eq 0 ] && [ $pid -gt 0 ]; then echo $instance $pid ln -sfT /proc/$pid/ns/net /var/run/netns/$instance fi done }

Tag summary

Content type

Image

Digest

Size

574.5 MB

Last updated

over 5 years ago

docker pull xumamen/ceos:4.26.0F