Public Repository

Last pushed: 2 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 239.1.1.1 -p 5001 -P 2000 -text "1234"

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

Now sending to multicast group: 239.1.1.1
Send out msg 1 to 239.1.1.1:5001: 1234
Send out msg 2 to 239.1.1.1:5001: 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 239.1.1.1 -p 5001

The expected output is:

Now receiving from multicast group: 239.1.1.1
Receive msg 1 from 10.252.93.4:5001: 1234
Receive msg 2 from 10.252.93.4:5001: 1234
Docker Pull Command
Owner
greenpau