Is there a tool to generate layer 2 multicast traffic on Linux (debian/raspberry/ubuntu). Need it for testing purpose. Need to monitor some netfilter rules. Expecting no one on the other side to listen to this traffic or send any response. Just that the traffic should reach the destination. I believe NIC accepts Layer 2 multicast traffic without any additional config, so tcpdump and wireshark will be able to sniff the traffic on the listening host. Or maybe wireshark converts NIC to promiscuous mode which enables to sniff multicast traffic.



1 Answer 1


The man page for socat has this example:

$ socat - UDP4-DATAGRAM:,bind=:6666,ip-add-membership=

which gives me sufficiently ok-looking tcpdump output (though I only tested this on the same machine):

19:23:47.218608 00:11:22:33:44:55 > 01:00:5e:7f:00:01, 
    ethertype IPv4 (0x0800), length 51: > UDP, length 9

Though the netcat I have also seems to work (nc.openbsd):

$ nc -u 6666

Both read from stdin.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .