免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
1234下一页
最近访问板块 发新帖
查看: 14021 | 回复: 31
打印 上一主题 下一主题

tcpdump无数据显示 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-08-05 15:55 |只看该作者 |倒序浏览
[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
然后就没有任何数据,是什么原因?
谢谢各位,这个机器事一个日志机,我一直在向里面注入数据以保证,有数据,作为抓包学习!
谢谢!

论坛徽章:
0
2 [报告]
发表于 2009-08-05 17:28 |只看该作者
网口对吗?有关于 222.**** 的 IP 通过吗?
如果用是 eth0 接口,且 tcpdump -n 也没有数据,那就不是 tcpdump 的用法问题了

论坛徽章:
0
3 [报告]
发表于 2009-08-05 18:20 |只看该作者

回复 #2 platinum 的帖子

[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,应该与这个没有关系吧。

论坛徽章:
0
4 [报告]
发表于 2009-08-05 18:22 |只看该作者
交换机没有做任何限制,以及策略!

论坛徽章:
0
5 [报告]
发表于 2009-08-05 18:24 |只看该作者
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

论坛徽章:
0
6 [报告]
发表于 2009-08-05 20:21 |只看该作者
你确认有 222.*** 的 IP 出现在网络中吗?
如果没有,那当然抓不到包了
你用 tcpdump -n  -i eth0 直接抓一下所有数据试试,看能抓到什么 IP
然后用 tcpdump -n  -i eth0 host IP 来抓你之前看到的 IP 再试试
我感觉这是一个低级错误

论坛徽章:
0
7 [报告]
发表于 2009-08-05 21:30 |只看该作者

回复 #6 platinum 的帖子

我确认有这个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

无任何数据,我换了很多台机器发现是同样的问题,不知道哪里做错了,麻烦各位指点一下!

论坛徽章:
0
8 [报告]
发表于 2009-08-05 22:30 |只看该作者
我知道你的网络里有 222 那个 IP
我也知道呢和 222 这个 IP 之间可以通信
但你能保证在抓包的时候 222 这个 IP 会出现吗?
你为什么不先排除一下是 tcpdump 的用法问题还是 tcpdump 本身的问题呢?!
你为什么就不试一下抓所有的包呢?!

感觉和你沟通太累了!

论坛徽章:
0
9 [报告]
发表于 2009-08-05 22:41 |只看该作者

回复 #8 platinum 的帖子

不好意思,本人初学,还麻烦你,多指教。
我抓包结果简单呈现出来,
[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 ~]#

论坛徽章:
0
10 [报告]
发表于 2009-08-05 22:42 |只看该作者
tcpdump使用还有什么环境要求吗?不是可以像windows下sniffer那样随意监控整个局域网吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP