Tcpdump is clearly one of my favorite tool. Here a little example to filter the traffic of my OSPF router.
tcpdump -i eth0 ip[9] == 89
And the result:
12:43:48.219432 IP p2b.soif.fr > OSPF-ALL.MCAST.NET: OSPFv2, Hello (1), length: 48 12:43:48.560817 IP wrt.soif.fr > OSPF-ALL.MCAST.NET: OSPFv2, Hello (1), length: 48
Wonderfull no ? :)
See also TCPWatch, by Shane Hathaway, which is invaluable for debugging HTTP problems:
http://hathaway.freezope.org/Software/TCPWatch
Yes, TCPWatch is a great tool too. I use it to debug HTTP server a couple of times, and this is a incredible feature.
– Enjoy Networking ?
Do you have any idea what should be the libpcap filter syntax in case we want to capture OSPFv3 packets!!
Hi Dipankar, I know your question more than one year old, but here is the answer:
sudo tcpdump -i eth0 proto ospf
This captures OSPFv3 traffic too.
Hi,
yes, found also this as better / nicer to type solution here:
http://docstore.mik.ua/orelly/networking_2ndEd/tshoot/ch05_04.htm
5.4.2.4.2. Protocol and port filtering.
=>
bsd1# tcpdump ip proto ospf
bsd1# tcpdump ip proto 89
Bests
Reiner