Java Network Traffic Generator

From NovaOrdis Knowledge Base
Revision as of 05:25, 16 March 2017 by Ovidiu (talk | contribs) (Ovidiu moved page Java Multicast Tool to Java Network Traffic Generator without leaving a redirect)
Jump to navigation Jump to search

External

Internal

Overview

A Java program sends multicast socket using DatagramSocket and listens for multicast traffic with MulticastSocket.

GitHub

https://github.com/NovaOrdis/playground/tree/master/java/network/multicast

User Manual

Common Arguments

--interface

--interface=<interface-name>|<address>

Example:

--interface=eth0
--interface=172.20.1.11


Listen for multicast:

java -jar multicast.jar listen <network-interface-name> <multicast-address>:<port>

The network interface name is one of those returned by ip addr.

Send multicast:

java -jar multicast.jar send <network-interface-name> <multicast-address>:<port>

The network interface name is one of those returned by ip addr.