TCPDUMP使用教程.docx
Packet Analyzer: 15 TCPDUMP Command Examples
by Sasikala on August 25, 2010
HYPERLINK /share Tweet
tcpdump command is also called as packet analyzer.
tcpdump command will work on most flavors of unix operating system. tcpdump allows us to save the packets that are captured, so that we can use it for future analysis. The saved file can be viewed by the same tcpdump command. We can also use open source software like wireshark to read the tcpdump pcap files.
In this tcpdump tutorial, let us discuss some practical examples on how to use the tcpdump command.
1. Capture packets from a particular ethernet interface using tcpdump -i
When you execute tcpdump command without any option, it will capture all the packets flowing through all the interfaces. -i option with tcpdump command, allows you to filter on a particular ethernet interface.
$ tcpdump -i eth1
14:59:26.608728 IP .52497 .ssh: . ack 540 win 16554
14:59:26.610602 IP .domain .24151: 4278 1/0/0 (73)
14:59:26.611262 IP .38527 .domain: 26364+ PTR? 0.. (45)
In this example, tcpdump captured all the packets flows in the interface eth1 and displays in the standard output.
Note: HYPERLINK /2009/02/editcap-guide-11-examples-to-handle-network-packet-dumps-effectively/ Editcap utility is used to select or remove specific packets from dump file and translate them into a given format.
2. Capture only N number of packets using tcpdump -c
When you execute tcpdump command it gives packets until you cancel the tcpdump command. Using -c option you can specify the number of packets to capture.
$ tcpdump -c 2 -i eth0
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
14:38:38.184913 IP .ssh .11006: P 1457255642:1457255758(116) ack 1561463966 win 63652
14:38:38.690919 IP .ssh .11006: P 116:232(116) ack 1 win 63652
2 packets captured
13 packets received by filter
0 packets dropped by kernel
The above tcpdump command captured only 2 packets from interface eth0.
Note: HYPERLINK /2009/03/mergecap-and-tshark-
您可能关注的文档
- PE文件格式详解一基础知识.doc
- 复件 个人简介:工作经历有用词汇.doc
- photoshop使用技巧[整理版,超全面].doc
- 复件 人格测量课件.ppt
- 复件 新精神分析.ppt
- 复合胶凝材料配制溷凝土技术.doc
- 1、《全员绩效考核》-12H-大纲120305.doc
- 1《管理学原理》大纲.ppt
- PRO-E-建模.doc
- 1很权威的利润表分析教程.ppt
- 三年级下册语文1-8单元默写通关训练(含答案)(2).docx
- 2026年及未来5年市场数据中国金属钒市场发展规划及投资战略可行性预测报告.docx
- 2026年及未来5年市场数据中国金属工艺品行业全景调研及投资可行性报告.docx
- 2026年及未来5年市场数据中国金属家具市场分析及投资战略研究预测可行性报告.docx
- 2026年及未来5年市场数据中国金属膜电阻器行业市场需求预测与投资战略规划分析报告.docx
- 2026年及未来5年市场数据中国金银花行业市场发展战略分析及投资前景专项预测报告.docx
- 2026年及未来5年市场数据中国金银花行业市场研究及投资战略预测报告.docx
- 2026年及未来5年市场数据中国抗氧化剂市场专项调查分析及投资前景预测报告.docx
- 2026年及未来5年市场数据中国救护车市场运行格局及投资战略研究报告.docx
- 2026年及未来5年市场数据中国精细化工行业发展前景预测及投资分析报告.docx
最近下载
- 霉菌毒素的污染及控制 测试题-《烹饪营养与安全》(后附答案).doc VIP
- 2025-2026学年湘教版数学八(上)期末素养综合测试卷基础卷(含答案).docx VIP
- 现代农业经济学第三版.pptx VIP
- 寄生虫污染及控制 测试题-《烹饪营养与安全》(后附答案).doc VIP
- 西华大学2019-2020学年第一学期《管理经济学》期末试卷2021.pdf VIP
- 武汉纺织大学历史系2020级《中国近现代史纲要》期末试卷(一).docx VIP
- 《护理用药安全与管理》业务学习试卷.docx VIP
- 男性公民兵役登记表PDF打印.pdf VIP
- 食物中毒概述 测试题-《烹饪营养与安全》(后附答案).doc VIP
- 2026年北京大学强基计划招生语文试卷试题(含答案详解).docx
原创力文档

文档评论(0)