How can I test Multicast UDP connectivity between two servers?

113,000

Solution 1

Try iperf

An article that explains the different steps: http://taosecurity.blogspot.com/2006/09/generating-multicast-traffic.html

Solution 2

iperf is a great tool, but could be a long procedure in installing it; Most repositories don't have this package. Depending on your Distribution, netcat is available in mostly every repository

You can also use netcat :

Server: nc -lu -p PortNr

Client: nc -vzu ServerIP PortNr

Solution 3

I highly recommend sockperf

It's a great tool for checking performance with both TCP and UDP, including UDP Multicast.

Example of a multicast UDP stream:

  • on the server: sockperf server -i 224.4.4.4 -p 1234
  • on the client: sockperf ping-pong -i 224.4.4.4 -p 1234

Solution 4

You can use SimpleMulticastAnalyzer - it's a simple .net multicast application that I wrote.

Enjoy.

Solution 5

You can use iperf, but it seems to have problems above version 1.7.0.

Run server first:

:: 224.0.0.0-224.0.0.255   Reserved for special "well-known" multicast addresses
:: 224.0.1.0-238.255.255.255 Globally-scoped (Internet-wide) multicast addresses
:: 239.0.0.0-239.255.255.255 Administratively-scoped (local) multicast addresses
:: my location blocks ip's in (224.0.1.x)

netsh advfirewall firewall add rule name="iperf 5001 udp in" dir=in action=allow protocol=udp localport=5001

iperf --server --udp --bind 239.192.0.1 --parallel 1

Client:

iperf --client 239.192.0.1 --udp --time 10 --bandwidth 1000m --ttl 7

Or you can try uftp, but you need a file to send.

Server or receiver first:

:: kill when done, "taskkill -im uftpd.exe -f"
copy /y postreceive.bat c:\users\admin

netsh advfirewall firewall add rule name=uftpd dir=in action=allow protocol=udp localport=1044

uftpd.exe -x 1 -M 239.195.1.2 -d -F @LOG -s c:\users\admin\postreceive.bat

netsh advfirewall firewall delete rule name=uftpd
 
certutil -hashfile c:\temp\windows10.0-kb4534273-x64-jan-2020-973.msu md5 | find "c595e9f6fb0dde144be2b8d37c18bb7c"

exit /b %errorlevel%

Client or sender:

set file=windows10.0-kb4534273-x64-jan-2020-973.msu

netsh advfirewall firewall add rule name="uftp" dir=in action=allow protocol=udp remoteport=1044

uftp.exe -S @LOG -x 1 -M 239.195.1.2 -P 239.195.1.2 -ttl 11 -C tfmcc -s 50 %file%

set err=%errorlevel%

netsh advfirewall firewall delete rule name=uftp

exit /b %err%
Share:
113,000

Related videos on Youtube

Greg B
Author by

Greg B

I am head of .NET development at twentysix. I have won a Flash Forward award (in the art category) for my work on 15x15 I am an EPiServer certified developer I love working in C# (mainly ASP.NET) but I'm also a solid Flash developer and I wish I had more time to learn and use Python. I instigated and implemented Source Control at twentysix (SVN) and bug tracking (using Trac) on Ubuntu.

Updated on September 18, 2022

Comments

  • Greg B
    Greg B over 1 year

    I have two servers on the same subnet. I have an application installed which uses multicast UDP to propagate events between the two servers and keep them in sync.

    This does not seem to be happening, so I want to make sure that the multicast UDP messages are getting through as my first step.

    The servers are running Windows 2008 R2.

    How can I test Multicast UDP connectivity between two servers?

  • Greg B
    Greg B almost 13 years
    Perfect, thanks! A Windows binary is linked from this article: linhost.info/2010/02/iperf-on-windows
  • Viet
    Viet over 11 years
    +1 Ah! Awesome! I'm gonna try this!
  • avner
    avner over 10 years
    This will not work for UDP Multicatst. I tried it with a MC address like 224.4.4.4 and nothing happens. Also strace on it doesn't show any ADD_MEMBERSHIP operation. Multicast is also missing in man nc. I suggest sockperf - see below.
  • Francois
    Francois about 9 years
    example with socat: socat UDP4-RECVFROM:9875,ip-add-membership=225.2.215.254:0.0.0.0,f‌​ork - |hexdump
  • leif81
    leif81 over 7 years
    Newer Windows binaries for iperf3 here: iperf.fr/iperf-download.php
  • AndreKR
    AndreKR over 7 years
    I don't think this is correct. How would I set the group?
  • Daniel Griscom
    Daniel Griscom over 6 years
    Hello, and welcome to ServerFault. You should indicate in your answer that you wrote this tool; otherwise it is likely to be marked as spam.
  • mcr
    mcr almost 4 years
    I don't think multiNC sends multicast traffic.
  • RCross
    RCross over 3 years
    iperf3 doesn't support multicast though (see github.com/esnet/iperf/issues/27#issuecomment-679186606). Better to use iperf2
  • js2010
    js2010 over 3 years
    The only usable iperf for this is version 1.7.0.
  • teknopaul
    teknopaul about 3 years
    This just tests IP direct to the servers ip address not the multicast address