I have been using Wireshark to capture and analyze the Ethernet based protocols. It's a freeware / open source tool released by GNU.
In computing, Wireshark (formerly known as Ethereal) is a free software protocol analyzer, or "packet sniffer"application used for network troubleshooting, analysis, software and protocol development, and education. It has all of the standard features of a protocol analyzer. In June 2006 the project was renamed from Ethereal due to trademark issues.
The functionality Wireshark provides is very similar to tcpdump, but it has a GUI front-end, and many more information sorting and filtering options. It allows the user to see all traffic being passed over the network (usually an Ethernet network but support is being added for others) by putting the network card into promiscuous mode.
Wireshark is released under the GNU General Public License, and it uses the cross-platform GTK+ widget toolkit. It runs on Unix and nix-like systems, including Linux, Solaris, FreeBSD, NetBSD, OpenBSD and Mac OS X (although GTK+ only works with X11 on Mac OS X, so the user will need to run an X server such as X11.app), and on Windows.
Wireshark is software that "understands" the structure of different network protocols. Thus it's able to display encapsulation and single fields and interpret their meaning. Wireshark uses pcap to capture packets, so it can only capture on networks supported by pcap.
Features
- Data can be captured "from the wire" from a live network connection or read from a capture file.
- Live data can be read from Ethernet, FDDI, PPP, token ring, IEEE 802.11, classical IP over ATM, and loopback interfaces (at least on some platforms; not all of those types are supported on all platforms).
- Captured network data can be browsed via a GUI, or via the terminal (command line) version of the utility, tshark.
- Captured files can be programmatically edited or converted via command-line switches to the "editcap" program.
- Display filters can also be used to selectively highlight and color packet summary information.
- Data display can be refined using a display filter.
- Hundreds of protocols can be dissected.
Security
Capturing raw network traffic from an interface requires special privileges on some platforms. For this reason, Wireshark often runs with superuser privileges. Taking into account the huge number of protocol dissectors, which are called when traffic for their protocol is captured, this can pose a serious security risk given a bug in a dissector. Due to the rather large number of vulnerabilities in the past (of which many have allowed remote code execution) and developers' doubts for better future development, OpenBSD removed Ethereal from its ports tree prior to its 3.6 release.
One possible alternative is to run tcpdump, or the dumpcap utility that comes with Wireshark, with superuser privileges to capture packets into a file, and later analyze these packets by running Wireshark with restricted privileges on the packet capture dump file.
Website: