tcpdump无数据显示
[root@JinSili-AAA+IBS ~]# tcpdump host 222.****
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
然后就没有任何数据,是什么原因?
谢谢各位,这个机器事一个日志机,我一直在向里面注入数据以保证,有数据,作为抓包学习!
谢谢!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
你确认有 222.*** 的 IP 出现在网络中吗?
如果没有,那当然抓不到包了
你用 tcpdump -n -i eth0 直接抓一下所有数据试试,看能抓到什么 IP
然后用 tcpdump -n -i eth0 host IP 来抓你之前看到的 IP 再试试
我感觉这是一个低级错误
我确认有这个ip,因为这是2台同样配置的机器,我均可远程登陆,这两台机器在同一局域网中,我用syslog的远程,和开放了ftp,telnet进行测试。均没有效果,
[root@Yuexiu-AAAback ~]# ping 222.128.****
PING 56(84) bytes of data.
64 bytes from 222.128. : icmp_seq=0 ttl=61 time=2.21 ms
64 bytes from 222.128. : icmp_seq=1 ttl=61 time=1.35 ms
--- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 1.355/1.786/2.218/0.433 ms, pipe 2
[root@Yuexiu-AAAback ~]# telnet 222.128.
Trying 222.128.
Connected to 222.128.
Escape character is '^]'.
ogin: Lad
Password: ********
configuration - Display NSE setup configuration menu
network info - Display networking information menu
port-location - Display port-location mapping menu
subscribers - Display subscriber management menu
system - Display advanced system configuration menu
logout - End command line interface session
Telnet session closing
Connection closed by foreign host.
[root@Jinrongjie-AAA+IBS ~]# tcpdump -n -i eth0 host 222.128 and port 23
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
无任何数据,我换了很多台机器发现是同样的问题,不知道哪里做错了,麻烦各位指点一下!
我知道你的网络里有 222 那个 IP
我也知道呢和 222 这个 IP 之间可以通信
但你能保证在抓包的时候 222 这个 IP 会出现吗?
你为什么不先排除一下是 tcpdump 的用法问题还是 tcpdump 本身的问题呢?!
你为什么就不试一下抓所有的包呢?!
感觉和你沟通太累了!
不好意思,本人初学,还麻烦你,多指教。
我抓包结果简单呈现出来,
[root@Jinrongjie-AAA+IBS ~]# tcpdump -n -i eth0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
22:25:13.593095 00:0f:e2:40:47:5b > Broadcast, ethertype Unknown (0x9001), length 60:
0x0000: 1901 0000 0000 0000 0000 0000 0000 0000 ................
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 0000 ..............
22:25:16.546356 00:0f:e2:40:4f:9f > Broadcast, ethertype Unknown (0x9001), length 60:
0x0000: 1901 0000 0000 0000 0000 0000 0000 0000 ................
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 0000 ..............
22:25:17.574177 arp who-has 222.128. tell 222.128.
22:25:21.099292 00:0f:e2:40:47:60 > Broadcast, ethertype Unknown (0x9001), length 60:
0x0000: 1801 0000 0000 0000 0000 0000 0000 0000 ................
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 0000 ..............
22:25:22.390007 00:0f:e2:30:db:20 > Broadcast, ethertype Unknown (0x9001), length 60:
0x0000: 000f e230 db20 0000 0013 0000 0000 0044 ...0...........D
0x0010: 4444 5555 5555 007b 6666 6666 6666 7777 DDUUUU.{ffffffww
0x0020: 7777 7777 8888 8888 8888 9999 9999 wwww..........
22:25:26.979935 00:e0:fc:09:bc:f9 > 01:80:c2:00:00:0a, ethertype Unknown (0x88a7), length 153:
0x0000: 0003 0000 01b4 8bbe 0001 000e 0000 0000 ................
0x0010: 000f e230 db20 0007 0012 5175 6964 7761 ...0......Quidwa
0x0020: 7920 5333 3532 3847 000e 000b 3030 3235 y.S3528G....0025
0x0030: 5030 3300 1100 1756 3130 3052 3030 3142 P03....V100R001B
0x0040: 3132 4430 3230 5350 3031 0010 0007 3230 12D020SP01....20
0x0050: 3200 2.
22:25:27.618420 00:0f:e2:40:47:45 > Broadcast, ethertype Unknown (0x9001), length 60:
0x0000: 1901 0000 0000 0000 0000 0000 0000 0000 ................
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 0000 ..............
22:25:32.376416 00:0f:e2:40:47:62 > Broadcast, ethertype Unknown (0x9001), length 60:
0x0000: 1901 0000 0000 0000 0000 0000 0000 0000 ................
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 0000 ..............
22:25:32.439633 00:0f:e2:40:4f:a2 > Broadcast, ethertype Unknown (0x9001), length 60:
0x0000: 1901 0000 0000 0000 0000 0000 0000 0000 ................
0x0010: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0020: 0000 0000 0000 0000 0000 0000 0000 ..............
9 packets captured
9 packets received by filter
0 packets dropped by kernel
[root@Jinrongjie-AAA+IBS ~]#
tcpdump使用还有什么环境要求吗?不是可以像windows下sniffer那样随意监控整个局域网吗?
网口对吗?有关于 222.**** 的 IP 通过吗?
如果用是 eth0 接口,且 tcpdump -n 也没有数据,那就不是 tcpdump 的用法问题了
[root@ ]# tcpdump -n -i eth0 host 222.****
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
18:21:16.464996 arp who-has 222.****** tell 222.*********
1 packets captured
1 packets received by filter
0 packets dropped by kernel
只有这么一个arp包,iptables是关闭掉的。
[root@ ]# uname -a
Linux JinSili-AAA+IBS 2.6.9-42.0.10.ELsmp #1 SMP Tue Feb 27 10:11:19 EST 2007 i686 i686 i386 GNU/Linux
[root@ ]# lsb_release -a
LSB Version: :core-3.0-ia32:core-3.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: CentOS
Description: CentOS release 4.4 (Final)
Release: 4.4
Codename: Final
我使用的系统安装的时候,默认带的tcpdump,应该与这个没有关系吧。
交换机没有做任何限制,以及策略!
Aug 5 18:18:23 JinSili-AAA+IBS kernel: eth0: Promiscuous mode enabled.
Aug 5 18:18:23 JinSili-AAA+IBS kernel: device eth0 entered promiscuous mode
Aug 5 18:18:48 JinSili-AAA+IBS kernel: device eth0 left promiscuous mode
Aug 5 18:20:31 JinSili-AAA+IBS kernel: eth0: Promiscuous mode enabled.
Aug 5 18:20:31 JinSili-AAA+IBS kernel: device eth0 entered promiscuous mode
Aug 5 18:20:33 JinSili-AAA+IBS kernel: device eth0 left promiscuous mode
Aug 5 18:20:37 JinSili-AAA+IBS kernel: eth0: Promiscuous mode enabled.
Aug 5 18:20:37 JinSili-AAA+IBS kernel: device eth0 entered promiscuous mode
Aug 5 18:20:44 JinSili-AAA+IBS kernel: device eth0 left promiscuous mode
Aug 5 18:20:49 JinSili-AAA+IBS kernel: eth0: Promiscuous mode enabled.
Aug 5 18:20:49 JinSili-AAA+IBS kernel: device eth0 entered promiscuous mode
Aug 5 18:21:32 JinSili-AAA+IBS kernel: device eth0 left promiscuous mode