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
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityNo.
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.)