Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You need to use the -r <filename> option with tcpdump. a pcap file generally is what you get with the -w option of tcpdump.
For example: to see the traffic between hosts A and B, I use:
tcpdump -r <pcapfile> -n host A or host B
-jason
I've used "-r" before but that shows very little info. I need something that is able to give me the entire information, as seen with Wireshark!
For example, in Wireshark we get detailed info when the following sections are expanded, for some Protocol:
- Frame data
- Ethernet data
- IP data
- TCP/UDP data
- Protocol data
I want this in a way that I can read from the CLI.
You might need to run several different dumps to see what you want.
the -e option will print the link-level headers: this will show the source and destination mac addresses.
not sure what you mean by "frame data"
ip, tcp, and udp can all be filtered upon. if tcpdump doesn't show how to do this, read the man page on pcap-filter.
the -v options will print out more data, but this depends on the version of tcpdump.
The big issue to remember though is even though the data is there, it's hard to keep things in context. There are also lots of examples and tutorials online, such as tcpdump's website.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.