LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What is the difference between -n and -nn in tcpdump? (https://www.linuxquestions.org/questions/linux-software-2/what-is-the-difference-between-n-and-nn-in-tcpdump-4175598695/)

luofeiyu 02-01-2017 01:35 AM

What is the difference between -n and -nn in tcpdump?
 
Man tcpdump:
-n Don't convert addresses (i.e., host addresses, port numbers,
etc.) to names.

sudo tcpdump -i eth0 -nn 'host 192.168.1.176'
sudo tcpdump -i eth0 -n 'host 192.168.1.176'

TenTenths 02-01-2017 03:28 AM

As you give no useful information whatsoever, such as distro, version of tcpdump, etc. here's what I just read off my screen:

Code:

man tcpdump
      -n    Don’t convert host addresses to names.  This can be used to avoid DNS lookups.

      -nn    Don’t convert protocol and port numbers etc. to names either.

CentOS release 6.8 (Final)

# tcpdump -V
tcpdump version 4.1-PRE-CVS_2016_05_10
libpcap version 1.4.0

luofeiyu 02-01-2017 07:46 AM

My os is debian8.


All times are GMT -5. The time now is 12:53 AM.