Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why would one want to force "tcp" in a "tcpdump" filter when using "port", given port numbers are defined in TCP Headers (as opposed to IP)

In other words, is

tcpdump tcp and port 10000

synonym to

tcpdump port 10000
share|improve this question
up vote 5 down vote accepted


  • tcp and port 10000 means "tcp port 10000"
  • port 10000 means "tcp port 10000 or udp port 10000" and is a synonym for (tcp or udp) and port 10000

I would force TCP if I wanted, for example, to see only DNS packets that are being transported over TCP (as opposed to the default UDP).

(tcpdump should have been named packetdump or netdump since it can dump packet information as low as layer 2, rather than layer 4 which its name implies.)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.