网络协议分析工具Ethereal的使用

这篇博客详细介绍了如何使用Ethereal进行网络协议分析,包括捕获ARP和ICMP协议的数据包、通过Tracert观察路由过程、TCP连接的建立与终止,以及DNS域名解析的过程。通过实例展示了Ethereal在各个网络通信环节中的应用。
摘要由CSDN通过智能技术生成


大学时计算机网络课的实验报告,当时提不起兴趣,今天看来还挺有用的。可以学习下怎样抓数据包,然后分析程序的通信协议。


一:学习使用网络协议分析工具Ethereal的方法,并用它来分析一些协议。

实验步骤:

1.  用“ipconfig”命令获得本机的MAC地址和缺省路由器的IP地址;(注:缺省路由器即 ”Default Gateway”)
命令行:Start->Run->CMD->ipconfig /all >C:\Mac.txt(在命令行中把ipconfig命令保存在文本文档里面备用)
结果:本机Mac地址:00.09.73.4B.8A.D7  缺省路由器IP:192.168.8.254

步骤截图:


1(本机网络信息:Mac.txt


2.  用“arp”命令清空本机的缓存:
命令行:Start->Run->CMD->arp –d


2arp命令 –d参数的帮助说明)

 

3.  运行Ethereal,开始捕获所有属于

Ethereal is a GUI network protocol analyzer. It lets you interactively browse packet data from a live network or from a previously saved capture file. See: http://www.ethereal.com for new versions, documentation, ... Ethereal's native capture file format is libpcap format, which is also the format used by tcpdump and various other tools. So Ethereal can read capture files from: -libpcap/WinPcap, tcpdump and various other tools using tcpdump's capture format -snoop and atmsnoop -Shomiti/Finisar Surveyor captures -Novell LANalyzer captures -Microsoft Network Monitor captures -AIX's iptrace captures -Cinco Networks NetXRay captures -Network Associates Windows-based Sniffer captures -Network General/Network Associates DOS-based Sniffer (compressed or uncompressed) captures -AG Group/WildPackets EtherPeek/TokenPeek/AiroPeek/EtherHelp/PacketGrabber captures -RADCOM's WAN/LAN analyzer captures -Network Instruments Observer version 9 captures -Lucent/Ascend router debug output -files from HP-UX's nettl -Toshiba's ISDN routers dump output -the output from i4btrace from the ISDN4BSD project -traces from the EyeSDN USB S0. -the output in IPLog format from the Cisco Secure Intrusion Detection System -pppd logs (pppdump format) -the output from VMS's TCPIPtrace/TCPtrace/UCX$TRACE utilities -the text output from the DBS Etherwatch VMS utility -Visual Networks' Visual UpTime traffic capture -the output from CoSine L2 debug -the output from Accellent's 5Views LAN agents -Endace Measurement Systems' ERF format captures -Linux Bluez Bluetooth stack hcidump -w traces There is no need to tell Ethereal what type of file you are reading; it will determine the file type by itself. Ethereal is also capable of reading any of these file formats if they are compressed using gzip. Ethereal recognizes this directly from the file; the '.gz' extension is not required for this purpose.
Ethereal是一个开放源码的网络分析系统,也是是目前最好的开放源码的网络协议分析器,支持Linux和windows平台。Ethereal起初由Gerald Combs开发,随后由一个松散的Etheral团队组织进行维护开发。它目前所提供的强大的协议分析功能完全可以媲美商业的网络分析系统,自从1998年发布最早的0.2版本至今,大量的志愿者为Ethereal添加新的协议解析器,如今Ethereal已经支持五百多种协议解析。很难想象如此多的人开发的代码可以很好的融入系统中;并且在系统中加入一个新的协议解析器很简单,一个不了解系统的结构的新手也可以根据留出的接口进行自己的协议开发。这都归功于Ehereal良好的设计结构。事实上由于网络上各种协议种类繁多,各种新的协议层出不穷。一个好的协议分析器必需有很好的可扩展性和结构。这样才能适应网络发展的需要不断加入新的协议解析器。 1 Ethereal的捕包平台 网络分析系统首先依赖于一套捕捉网络数据包的函数库。这套函数库工作在在网络分析系统模块的最底层。作用是从网卡取得数据包或者根据过滤规则取出数据包的子集,再转交给上层分析模块。从协议上说,这套函数库将一个数据包从链路层接收,至少将其还原至传输层以上,以供上层分析。 在Linux系统中, 1992年Lawrence Berkeley Lab的Steven McCanne和Van Jacobson提出了包过滤器的一种的实现,BPF(BSD Packet Filter)。Libpcap是一个基于BPF的开放源码的捕包函数库。现有的大部分Linux捕包系统都是基于这套函数库或者是在它基础上做一些针对性的改进。 在window系统中,意大利人Fulvio Risso和Loris Degioanni提出并实现了Winpcap函数库,作者称之为NPF。由于NPF的主要思想就是来源于BPF,它的设计目标就是为windows系统提供一个功能强大的开发式数据包捕获平台,希望在Linux系统中的网络分析工具经过简单编译以后也可以移植到windows中,因此这两种捕包架构是非常相似的。就实现来说提供的函数调用接口也是一致的。 Ethereal网络分析系统也需要一个底层的抓包平台,在Linux中是采用Libpcap函数库抓包,在windows系统中采用winpcap函数库抓包。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值