Up until that point I had only read about this new fad, and played around with it a bit at work for use as a stable build environment for cross-compiling. I had no idea people would want to use a Docker container as a multicast sink. Basically I was baffled.
The reporter used a Java based tool but simply couldn’t get things to
work properly with
pimd running on the host:
eth0 MC sender ---> [ Server host ] <--- router running pimd | ________|________ / docker0 \ <--- bridge ______ / | \ | | <--- MC receiver __________/ | \_______________|______|_____ \ | / / \ `------------------>-------' / \________________________________________________________/ Container ship
We tried several approaches, but nothing seemed to help. This became a
bit of blocker for the
pimd v2.3.2 release and I admittedly lost a bit
of sleep over this. So finally this weekend, I sat down and whipped my
old mcjoin tool up into shape.
I’ve relied on it for years, but it couldn’t send or receive packets,
Running docker v1.5 in Ubuntu 15.10 I ran this, with
pimd on the host
mcjoin as a multicast sink for 250 groups in a container:
cd ~/Troglobit/mcjoin docker run -t -i -u `id -u`:`id -g` -v $HOME:$HOME -w $PWD troglobit/toolchain:latest ./mcjoin 188.8.131.52+250 ^C Received total: 2500 packets
pimd and the multicast sender runs on my host, which should not
matter since Linux still has to route the traffic to the
interface. Also, without setting the TTL to 2 (or greater) the
container receives no traffic at all. Here’s what I run in another
terminal on my host:
./mcjoin -s -t 2 -c 10 184.108.40.206+250
pimd is a little slow to register and install the forwarding
rules in the kernel, it sure enough worked on the first attempt! \o/
This is my first real application level experience with Docker, but it is sure not the last. Docker is a truly revolutionary new tool!