Sometimes you need to know that a particular interface is receiving the correct packets. More often than not, the reason a multicast application isn't working is because the packet isn't even reaching the machine. You can test for this using the Linux
tcpdump utility.
[blog ~]# tcpdump -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
15:42:24.837450 IP 192.168.100.34 > 224.1.1.1: UDP, length 38
This will print out all the traffic coming in and out on this network interface eth0. You can use any network interface and the tcpdump utility has a lot of options available for pre-filtering. You can optional filter for the traffic you are particularly looking for by using grep:
[blog ~]# tcpdump -i eth0 | grep 224.1.1.1
Note that you can use any Linux box on your network to look for traffic on your interface. This allows you to confirm whether or not your application is sending out the correct network packets and the details contained there in.
tags: command line network linux multicast
links: digg this del.icio.us technorati