Public Repository

Last pushed: 3 years ago
Short Description
Multicast Testing Package
Full Description

mtools - Multicast Testing Package

This image includes two binaries in /sbin directory:

  1. msend - sending multicast packets
  2. mreceive - receiving multicast packets

Sending Multicast Packets

First, download the image:

docker pull greenpau/mtools

Then, start a container:

docker run -d -i -t --name=msend -v /tmp:/tmp greenpau/mtools /bin/sh

Next, lookup a container id for the container and start sending multicast packets:

MSEND_DOCKER=`docker ps | grep "msend" | tr -s ' ' | cut -d" " -f1 | xargs`

docker exec -it ${MSEND_DOCKER} msend -g -p 5001 -P 2000 -text "1234"

The above command directs a system to send multicast packets with UDP payload 1234 to group at the interval of 2s.

Now sending to multicast group:
Send out msg 1 to 1234
Send out msg 2 to 1234

Receiving Multicast Packets

Follow similar steps for subscribing to the above multicast stream:

docker run -d -i -t --name=mreceive -v /tmp:/tmp greenpau/mtools /bin/sh
MRECEIVE_DOCKER=`docker ps | grep "mreceive" | tr -s ' ' | cut -d" " -f1 | xargs`
docker exec -it ${MRECEIVE_DOCKER} mreceive -g -p 5001

The expected output is:

Now receiving from multicast group:
Receive msg 1 from 1234
Receive msg 2 from 1234
Docker Pull Command