0

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.

Thanks

0

1 Answer 1

0

The man page for socat has this example:

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

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: 192.02.1.6666 > 224.255.0.1.6666: UDP, length 9 

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

$ nc -u 224.255.0.1 6666 

Both read from stdin.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.