Cumulus Routing on the Host Docker Advertisement Daemon (CRoHDAd)
2.2K

The container is designed to be run on Linux hosts in privileged mode. It can be used to advertise other Docker Containers as they are created on the host, into a routed IP fabric. In effect the CRoHDAd daemon is listening to the Docker-engine API and adding newly created container host-routes to a separate Linux Kernel Routing Table. This table is then redistributed into any routing protocol such as BGP or OSPF. This routing protocol can be running inside of another privileged container or baremetal. Compatible and tested with Quagga/FRR, may also be compatible with Bird but untested.
To run the container:
$ docker run -t -d --net=host --privileged \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/iproute2/rt_tables:/etc/iproute2/rt_tables \
-v /dev/log:/dev/log \
--name crohdad cumulusnetworks/crohdad
The usage below will disable syslog messages from being sent to the host.
To run the container without syslogs being sent to the host:
$ docker run -t -d --net=host --privileged \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/iproute2/rt_tables:/etc/iproute2/rt_tables \
--name crohdad cumulusnetworks/crohdad -l
To see the host-routes the CRoHDAd container is aware of check the logs for the container.
$ docker logs crohdad
To see all Options: The CRoHDAd daemon has a number of different options that can be specified. By default it starts with one option '-l' to see all available options run the following command.
'docker run -it --name=crohdad cumulusnetworks/crohdad:latest -h'
Example Output
docker run -it --name=crohdad cumulusnetworks/crohdad:latest -h
RUNNING CRoHDAd: /root/crohdad.py -h &
usage: crohdad.py [-h] [-d] [-f] [-l] [-t TABLE_NUMBER] [-n] [-s SUBNETS] [-v]
Cumulus Routing on the Host Docker Advertisement Daemon (CRoHDAD) -- A Daemon
to advertise Docker container IP addresses into Routing Fabrics running with
Quagga/FRR.
optional arguments:
-h, --help show this help message and exit
-d, --debug enables verbose logging output.
-f, --no-flush-routes
disables table flush of existing host-routes at
startup.
-l, --log-to-syslog-off
disable logging to syslog.
-t TABLE_NUMBER, --table_number TABLE_NUMBER
route table number to add/remove host routes (see:
/etc/iproute2/rt_tables). Default is 30
-n, --no-add-on-start
automatically detects existing containers and adds
their host routes upon initial script start-up.
-s SUBNETS, --subnets SUBNETS
Allows the user to specify the acceptable container
subnets which can be advertised via CRoHDAD when seen
on containers. Defaults to advertising everything.
example ./crohdad.py --subnets 172.19.0.0/24 --subnets
172.17.0.0/24
-v, --version Using this option displays the version of CRoHDAd and
exits.
[hit enter key to exit] or run 'docker stop <container>'
To see a Vagrant based demo of the CRoHDAd container in action visit the following link: https://github.com/CumulusNetworks/cldemo-roh-dad
Content type
Image
Digest
Size
250 MB
Last updated
almost 9 years ago
docker pull cumulusnetworks/crohdad