Multicast Traffic Generator for Windows

Multicast Traffic Generator for Windows

Are there any multicast traffic generators for Windows?

3

1 Answer

Multicast traffic is actually pretty simple to create with any programming language. If you got python installed here's an example, I hope it works under Windows.

import sys
import socket
from time import sleep

UDP_IP=sys.argv[1]
UDP_PORT=sys.argv[2]
TTL=2
DATA="whateverandever"

sock = socket.socket( socket.AF_INET, socket.SOCK_DGRAM )
sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, TTL)

while True:
  sock.sendto ( DATA, (UDP_IP, int(UDP_PORT)) )
  sleep(1)

Save it to i.e. mcast.py and execute it like this:

python mcast.py <destination> <port>

Change TTL in the script if you whant the traffic to reach further down in the network.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.