通信网原理实验报告Ethernet-and-ARP
精简版实验四:Ethereal Lab — Ethernet and ARP

实验四:Ethereal Lab —Ethernet and ARP一、实验目的(1)研究Ethernet的帧格式(2)ARP协议的请求应答机制(3)ARP缓存的管理二、实验原理以太网技术在当前局域网领域占据主流的地位,是最近三十年来最成功的网络技术之一。
不同格式的以太网帧各字段定义各不相同,彼此也不兼容。
Ethernet II以太网标准帧格式是以太网的事实标准,其各字段的定义如下图.ARP协议是一种用于将各种协议地址解析为物理地址的协议. ARP报文分为两种,一种为ARP请求报文,另一种是ARP响应报文.为了提高ARP的效率,在主机内开辟一块内存,存放最近获得的IP地址到以太网地址的映射.主机在发送IP 报文时,首先检查缓存,若找不到匹配的映射,再利用ARP请求地址解析.三、实验步骤与实验问题探讨【注:实验步骤应用(x),问题用[x]】1. 捕获并分析Ethernet帧执行下列操作以捕获一组以太网帧进行研究:(1)首先确保你的浏览器缓存为空(对于Internet Explorer,选Tools->Internet Options->Delete Files)(2)启动Ethereal分组嗅探器(3)输入下列URL到浏览器:/ethereal-labs/ HTTP-ethereal-lab-file3.html,浏览器将显示相当长的美国的权利法案.(4)停止Ethereal分组捕获。
首先,找到从你主机发往 的HTTP GET报文的分组序号和从发向你主机的HTTP响应报文开始的分组序号(在Ethereal上部窗口的最左列),你可以看到一个类似于下图的屏幕(其中10号分组包含HTTP GET消息)。
(注:可从/ethereal-labs/ethereal-traces.zip 中解压出ethernet-ethereal-trace-1文件来回答下列问题)为了回答下列问题,你需要研究一下分组细节窗口和分组内容窗口(在Ethereal中间和靠下的显示窗口)。
arp实验报告

arp实验报告ARP实验报告一、引言ARP(Address Resolution Protocol)是一种用于将IP地址转换为MAC地址的协议。
在计算机网络中,IP地址用于标识网络上的设备,而MAC地址则用于标识网络设备的物理地址。
ARP协议的作用是通过在本地网络中广播请求,获取目标设备的MAC地址,以便进行数据通信。
本实验旨在通过实际操作和观察ARP协议的工作原理和过程。
二、实验目的1. 了解ARP协议的工作原理和过程;2. 掌握使用ARP协议进行地址解析的方法;3. 分析并理解ARP协议的优缺点。
三、实验环境本实验使用了一台Windows操作系统的计算机和一台路由器,通过局域网连接。
四、实验步骤1. 打开命令提示符窗口,输入ipconfig命令查看本机的IP地址和MAC地址;2. 在命令提示符窗口中,输入arp -a命令查看本机的ARP缓存表;3. 在命令提示符窗口中,输入ping命令向目标IP地址发送一个数据包;4. 在命令提示符窗口中,再次输入arp -a命令查看ARP缓存表是否有更新。
五、实验结果与分析通过实验步骤中的操作,我们可以观察到以下结果和现象:1. 在输入ipconfig命令后,命令提示符窗口会显示本机的IP地址和MAC地址。
IP地址通常是由网络管理员或DHCP服务器分配的,而MAC地址是网络设备的唯一标识;2. 在输入arp -a命令后,命令提示符窗口会显示本机的ARP缓存表。
ARP缓存表中列出了本机已经解析过的IP地址和对应的MAC地址;3. 在输入ping命令后,命令提示符窗口会显示与目标IP地址的通信状态。
如果目标IP地址在本机的ARP缓存表中不存在,本机会向局域网广播ARP请求,以获取目标设备的MAC地址;4. 在再次输入arp -a命令后,我们可以观察到ARP缓存表中新增了目标IP地址和对应的MAC地址。
通过以上实验结果和现象,我们可以得出以下结论和分析:1. ARP协议通过将IP地址转换为MAC地址,实现了在局域网中的设备通信。
网络协议分析实验报告

f、HTTP: 超文本传输协议(HTTP,HyperText Transfer Protocol)是互联网上应用最为广泛的一种网络协议。所有的WWW文件都必须遵守这个标准。设计HTTP最初的目的是为了提供一种发布和接收HTML页面的方法。
图1
2、分析数据链路层协议
(1)、在:PC1的“运行”对话框中输入命令“91.1,单击“Enter”按钮;
如下图2所示:
图2
(2)、在本机上运行wireshark截获报文,为了只截获和实验内容有关的报文,将Ethereal的Captrue Filter设置为“No Broadcast and no Multicast”;如下图3所示:
(1)在PC1 两台计算机上执行如下命令,清除ARP 缓存:
ARP –d
(2)在PC1 两台计算机上执行如下命令,查看高速缓存中的ARP 地址映射表
的内容:
ARP –a
(3)在PC1 上运行 Ethereal 截获报文,为了截获和实验内容有关的报文, Ethereal 的Captrue Filter 设置为默认方式;
答:这个帧由6 字节的目的 MAC 地址、6 字节的源 MAC 地址、2 字节的类型、 46~1500 字节的数据字段组成。缺少了7 字节的前导符、1 字节的帧首定界和4 字节的帧尾校验字段。因为7字节的前导符,其作用是用来使接收端的适配器在接受MAC帧时能迅速调整其时钟频率,使它和发送端实现位同步。1字节的帧首定界前六位的作用和前同步码一样,后两个1表示数据就要来了。还有4字节的FCS用来快速检验帧有没出现比特差错。这三部分用过后都会在适配器上被丢弃,不会提交给上一层。因此我们抓的包中没有这些信息。
arp实验报告总结

arp实验报告总结本次ARP实验旨在深入理解和掌握ARP协议的工作原理及其在局域网中的应用。
在实验中,我们通过使用Wireshark抓包工具进行观察和分析ARP报文的发送和接收过程,并进行了相关的数据分析和实验总结。
首先,我们了解到ARP(Address Resolution Protocol)是一种用于将IP地址映射到物理MAC地址的网络协议。
它通过在局域网中的ARP缓存表中查找目标IP 地址对应的MAC地址,从而实现通信。
如果ARP缓存表中没有所需的条目,则需要发送ARP请求广播以获取目标MAC地址。
在实验过程中,我们模拟了一个简化的局域网环境,并配置了多个主机和交换机。
我们首先发送ARP请求广播以获取某个主机的MAC地址,并观察到该主机收到了ARP请求,并回复了ARP应答报文,包含了其MAC地址。
通过分析抓包数据,我们确认了ARP协议的正常工作。
另外,我们还模拟了一个主机更换IP地址的场景,并在主机的ARP缓存表中观察到相关条目的变化。
我们发现,当主机更换IP地址后,其ARP缓存表中旧的IP地址对应的条目被删除,并添加了新的IP地址对应的条目。
这进一步验证了ARP协议在IP地址和MAC地址映射中的重要性。
通过本次实验,我们对ARP协议的工作原理有了更深入的了解。
我们掌握了ARP报文的格式及其在局域网中的使用方式,以及如何使用工具进行ARP数据的捕获和分析。
此外,我们还学会了如何通过发送ARP请求广播来获取目标主机的MAC地址,以及如何检查和验证ARP缓存表中的内容。
总之,本次ARP实验通过实际操作和数据分析,加深了我们对ARP协议的理解。
我们深入掌握了ARP的工作原理,包括ARP请求和应答的过程,以及IP地址和MAC地址的映射关系。
通过此次实验,我们进一步提高了对网络协议的认识和实践能力。
实验四:ARP分析报告及路由协议详情分析报告

计算机科学与技术学院计算机网络实验报告年级 2013 学号 2013434151汪凡成绩专业计算机科学与技术实验地点 C1-422 指导教师常卓实验项目实验3.3:ARP分析实验3.5:路由协议分析实验日期 2016/5/6实验3.3:ARP分析一、实验目的1.掌握根本的ARP命令。
2.熟悉ARP报文格式和数据封装方式。
3.理解ARP的工作原理。
二、实验原理(1)ARP简介1.什么是ARPARP,即地址解析协议。
TCP/IP网络使用ARP实现IP地址到MAC地址的动态解析。
网络层使用逻辑地址〔IP地址〕作为互联网的编址方案,但实际的物理网络〔以太网〕采用硬件地址〔MAC地址〕来唯一识别设备。
因此在实际网络的链路上传送数据帧时,最终还是必须使用硬件地址〔MAC地址)。
①ARP工作原理每个主机和路由器的存中都设有一个ARP高速缓存,用于存放其他设备的IP地址到物理地址的映射表。
当主机欲向本局域网上其他主机发送IP包时,先在本地ARP缓存中查看是否有对方的MAC地址信息。
如果没有,如此ARP会在网络中广播一个ARP请求,拥有该目标IP地址的设备将自动发回一个ARP 回应,对应的MAC地址将记录到主机的ARP缓存中。
考虑到一个网络可能经常有设备动态参加或者撤出,并且更换设备的网卡或IP地址也都会引起主机地址映射发生变化,因此,ARP缓存定时器将会删除在指定时间段未使用的ARP 条目,具体时间因设备而异。
例如,有些Windows操作系统存储ARP缓存条目的时间为2mim但如果该条目在这段时间被再次使用,其ARP定时器将延长至lOmin。
ARP缓存可以提高工作效率。
如果没有缓存,每当有数据帧进入网络时,ARP都必须不断请求地址转换,这样会延长通信时间,甚至造成网络拥塞。
反之,保存时间过长也可能导致离开网络或者更改第3层地址的设备出错。
ARP可解决同一个局域网上的主机或路由器的IP地址和硬件地址的映射问题。
如果所要找的主机和源主机不在同一个局域网上,那么就要通过ARP找到一个位于本局域网上的某个路由器的硬件地址,然后把分组发送给这个路由器,让这个路由器把分组转发给下一个网络。
internet技术实验报告 验证地址解析协议ARP工作过程

实验报告验证地址解析协议ARP工作过程操作系统:主机PC0:Windows XP主机PC1:Windows 7网络环境:主机PC0与主机PC1同属于一个局域网,同时都与Internet互联(校园网)(使用packet tracer软件绘制)PC1:2、用arp -d命令清除两台主机上的ARP表,然后在PC0与PC1上分别用ping 命令与对方通信PC0 清空ARP告诉缓存后先查看一下PC0的MAC地址:PC1 清空ARP告诉缓存后先查看一下PC1的MAC地址:在PC0上执行ping命令查看是否能够和PC1互通:结论:PC0和PC1成功ping通。
在PC1上执行ping命令查看是否能够和PC0互通:结论:PC1和PC0成功ping通。
3、用arp -a命令在两台PC上分别看到对方的MAC地址PC0主机上:PC1主机上:分析:PC0和PC1在设置时同属于一个局域网网段。
在执行ping命令的时候(此处以PC0 ping PC1为例),PC0先向整个网段中广播ARP包,询问IP为118.229.207.175(PC1)的主机的MAC地址;此时网段中的PC1收到包后比对自己的IP地址发现符合条件,于是给PC1回一个ARP包告诉PC0自己的MAC地址,这时候PC0就会向PC1发送4个ECHO报文完成ping命令。
PC1收到这样的ICMP 报文后广播一个ARP包询问PC0的(118.229.207.177)MAC地址,得到后会向PC0回复ECHO报文,完成整个通信过程。
4、将PC0的子网掩码设为255.255.255.0,如下图所示:PC0:5、用arp -d命令清除两台主机上的ARP表,然后在PC0上"ping"PC1,观察并分析结果。
用arp -a命令在两台PC上均不能看到对方的MAC地址PC0主机:结论:目标主机不可达,传输失败。
用arp –a查看MAC地址:6、接着在PC1上"ping"PC0,观察并分析结果结论:提示请求超时,传输失败。
arp协议实验报告

arp协议实验报告
ARP协议实验报告
实验目的:
本实验旨在通过对ARP协议的实验,加深对ARP协议的理解,掌握ARP协议
的工作原理和实际应用。
实验设备和材料:
1. 两台计算机
2. 一台路由器
3. 以太网交换机
4. 网线
5. ARP协议相关软件
实验步骤:
1. 搭建实验环境,将两台计算机连接到同一个局域网中,通过路由器和交换机
进行连接。
2. 在计算机A上,使用ARP协议相关软件发送ARP请求,获取计算机B的
MAC地址。
3. 在计算机B上,接收到ARP请求后,发送ARP应答,将自己的MAC地址发
送给计算机A。
4. 计算机A收到ARP应答后,将计算机B的IP地址和MAC地址建立映射关系,并保存在ARP缓存中。
5. 使用Wireshark等网络抓包工具,分析实验过程中的ARP请求和应答的数据包。
实验结果:
通过实验,我们成功地获取到了计算机B的MAC地址,并建立了IP地址和MAC地址的映射关系。
在抓包分析中,我们也可以清晰地看到ARP请求和应答的数据包,进一步加深了对ARP协议的理解。
实验总结:
ARP协议是解决IP地址和MAC地址之间映射关系的重要协议,在局域网中起着至关重要的作用。
通过本次实验,我们对ARP协议的工作原理有了更深入的了解,也掌握了ARP协议的实际应用方法。
希望通过这次实验,能够对同学们的网络协议学习有所帮助。
实验一 以太网帧和ARP协议分析实验

实验一、以太网帧和ARP协议实验一、实验目的1、理解以太帧格式。
2、理解ARP协议格式和ARP 协议的工作原理,理解ARP高速缓存的作用。
3、学会使用wireshark抓取数据包并分析。
二、实验学时建议2学时。
三、实验类型验证性实验。
四、实验原理1例如0x0800表示IP地址。
硬件长度指明硬件地址长度,单位是字节,MAC是48位,长度是6个字节。
协议长度表示高层协议地址的长度,对于IP地址,长度是4个字节。
操作字段共有二种操作类型,1表示ARP请求,2表示ARP应答。
发送方MAC,6个字节的发送方MAC地址。
发送方IP,4个字节的发送方IP地址。
目的MAC,6个字节的目的MAC地址。
目的IP,4个字节的目的IP地址。
2、ARP地址解析过程五、实验步骤1、运行wireshark-win32-1.4.1.exe,安装wireshark协议分析程序。
2、运行协议分析软件wireshark,打开捕获窗口进行数据捕获。
3、主机A在命令行下运行“arp –d”命令,清空ARP高速缓存。
4、主机A 上ping 主机B的IP地址。
5、主机A停止捕获数据,察看协议分析器中采集到的ARP报文。
找到ARP请求报文和ARP响应报文,分析两种报文的内容。
并以下列表格的形式分别写出ARP请求报文和ARP响应报文以及对应的以太帧格式的内容。
6、在命令行下运行“arp –a”命令察看ARP高速缓存。
回答ARP高速缓存表由哪几项组成?六、实验结果注:要写好实验报告。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实验一Ethernet and ARP一、实验目的1.加强对以太网帧格式的理解;2.理解ARP协议的工作原理。
二、实验环境1.PC机一台;2.WireShark软件。
三、实验内容1. Capturing and analyzing Ethernet frames2. The Address Resolution Protocol四、实验步骤及思考(一)Capturing and analyzing Ethernet framesHTTP GET Message(1)Based on the contents of the Ethernet frame containing the HTTP GET message1. What is the 48-bit Ethernet address of your computer?Answer:The 48-bit Ethernet address of my computer is:c8:0a:a9:db:9b:f3The Ethernet address of my computer2. What is the 48-bit destination address in the Ethernet frame? Is this the Ethernet address of ? (Hint: the answer is no). What device has this as its Ethernet address?[Note: this is an important question, and one that students sometimes get wrong. Re-read pages 468-469 in the text and make sure you understand the answer here.]Answer:1)The 48-bit destination address in the Ethernet frame is:00:23:89:8d:50:71The destination address in the Ethernet frame2)This is not the Ethernet address of .3)It is the address of my Linksys router, whick is the link used to get off the subnet.3.Give the hexadecimal value for the two-byte Frame type field. What do the bit(s) whose value is 1 mean within the flag field?Answer:1)The hexadecimal value for the two-byte Frame type field is:ox0800The hexadecimal value forthe two-byte Frame type2) The value is 1 within the flag field means the fragment has not been fragmented.Flag4.How many bytes from the very start of the Ethernet frame does the ASCII “G” in“GET” appear in the Ethernet frame?Answer:1)T he ASCII “G” appears 54 bytes from the very start of the Ethernet frame.2)Calculation process as follows:There are 14 bytes of Ethernet frame,20 bytes of IP header and 20 bytes of TCP header before HTTP data is encountered.5. What is the hexadecimal value of the CRC field in this Ethernet frame?Answer:1)There is no CRC field.2)Because the CRC calculated before the Wireshark packet sniffer start up.(2)Based on the contents of the Ethernet frame containing the first byte of the HTTP response message6. What is the value of the Ethernet source address? Is this the address of your computer, or of (Hint: the answer is no). What device has this as its Ethernet address?Answer :1)The value of the Ethernet source address is: 00:23:89:8d:50:712)This is neither the address of your computer,northe address of .3)It is the address of my Linksys router,which is the link used to get onto HTTP response messagemy subnet.7. What is the destination address in the Ethernet frame? Is this the Ethernet address of your computer?Answer:1)The destination address in the Ethernet frame is:c8:0a:a9:db:9b:f32)It is the address of my computer.(The 48-bit Ethernet address of my computer is:c8:0a:a9:db:9b:f3)8. Give the hexadecimal value for the two-byte Frame type field. What do the bit(s) whose value is 1 mean within the flag field?Answer:1)The hexadecimal value for the two-byte Frame type field is: 0x0800.2)The value is 1 within the flag field means the fragment has not been fragmented.Flag field9. How many bytes from the very start of the Ethernet frame does the ASCII “O” in“OK” (i.e., the HTTP response code) appear in the Ethernet frame?Answer:1)T he ASCII “O” appears 54 bytes from the very start of the Ethernet frame.2)Calculation process as follows:There are 14 bytes of Ethernet frame,20 bytes of IP header and 20 bytes of TCP header before HTTP data is encountered.10. What is the hexadecimal value of the CRC field in this Ethernet frame?Answer:1)There is no CRC field.2)The reason:Because the CRC calculated before the Wireshark packet sniffer start up.(二)The Address Resolution Protocol(1)ARP Caching11. Write down the contents of your computer’s ARP cache. What is the meaning of each column value?Answer:1)The Internet Address column contains the IP address,.2)The Physical Address column contains the MAC address, and the type indicates the protocol type.3)Observing ARP in action12. What are the hexadecimal values for the source and destination addresses in the Ethernet frame containing the ARP request message? Answer:1)The hexadecimal values for the source addresses in the Ethernet frame containing the ARP request message is: 00:23:89:8d:50:712)The destination addresses in the Ethernet frame containing the ARP request message is: ff:ff:ff:ff:ff:ff13. Give the hexadecimal value for the two-byte Ethernet Frame type field. What do the bit(s) whose value is 1 mean within the flag field? Answer:The hexadecimal value for the two-byte Ethernet Frame type field is:0x0806.14.Download the ARP specification from . A readable, detailed discussion of ARP is also at .a) How many bytes from the very beginning of the Ethernet frame does the ARP opcode field begin?Answer:The ARP opcode field begins 20 bytes from the very beginning ofthe Ethernet frame.b) What is the value of the opcode field within the ARP-payload part of the Ethernet frame in which an ARP request is made?Answer:The hex value for opcode field withing the ARP-payload of the request is 1.c) Does the ARP message contain the IP address of the sender? Answer:Yes, the ARP message containg the IP address 192.168.1.105 for the sender.d) Where in the ARP request does the “question” appear – the Ethernet address of the machine whose corresponding IP address is being queried?Answer:The field “Target MAC address” is set to 00:00:00:00:00:00 to question the machine whose corresponding IP address (192.168.1.105) is being queried.15.Now find the ARP reply that was sent in response to the ARP request.a) How many bytes from the very beginning of the Ethernet frame does the ARP opcode field begin?Answer:The ARP opcode field begins 20 bytes from the very beginning of the Ethernet frame.b) What is the value of the opcode field within the ARP-payload part of the Ethernet frame in which an ARP response is made?Answer:The hex value for opcode field withing the ARP-payload part of the Ethernet frame is 2.c) Where in the ARP message does the “answer” to the earlier ARP request appear –the IP address of the machine having the Ethernet address whose corresponding IP address is being queried?Answer:The answer to the earlier ARP request appears in the”Sender MAC address”field, which contains the Ethernet address 00:d0:59:a9:3d:68 for the sender with IP address 192.168.1.1.16. What are the hexadecimal values for the source and destination addresses in the Ethernet frame containing the ARP reply message? Answer:The hex value for the source address is 00:06:25:da:af:73 and for the destination is 00:d0:59:a9:3d:68 .17. Open the ethernet-ethereal-trace-1 trace. The first and second ARP packets in this trace correspond to an ARP request sent by the computer running Wireshark, and the ARP reply sent to the computer running Wireshark by the computer with the ARP-requested Ethernet address. But there is yet another computer on this network, as indiated by packet 6 –another ARP request. Why is there no ARP reply (sent in response to the ARP request in packet 6) in the packet trace?Answer:There is no reply in this trace, because we are not at the machinethat sent the request. The ARP request is broadcast, but the ARP reply is sent back directly to the sender’s Ethernet address.五、实验结论1.CRC在WireShark中是不能被抓到的,原因是CRC在抓包之前已经被计算好。