# 监视eth1
tcpdump -i eth1
# 打印所有www.baidu.com相关的包
tcpdump host www.baidu.com
tcpdump host 192.168.0.1
# 打印 nn1和nn2或nn3 主机间通信的包,这里可以替换成ip
tcpdump host nn1 and \( nn2 or nn3 \)
# 打印nn1和非nn2之间的ip数据包
tcpdump ip host nn1 and not nn2
# 发送者是nn1的数据包
tcpdump -i eth0 src host nn1
# 接受者是nn1的数据包
tcpdump -i eth0 dst host nn1
# 指定tcp端口是23以及host是210.27.48.1数据包
tcpdump tcp port 23 and host 210.27.48.1
04-07
334
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
03-02
2405
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-03