计网实验DNS, Data Encapsulation and Frame Examination

合集下载

网络实验--分析HTTP,DNS协议

网络实验--分析HTTP,DNS协议

实验七利用分组嗅探器(ethereal)分析协议HTTP和DNS一、实验目的1、分析HTTP协议2、分析DNS协议二、实验环境与因特网连接的计算机网络系统;主机操作系统为windows;Ethereal、IE等软件。

三、实验步骤1、HTTP GET/response交互首先通过下载一个非常简单的HTML文件(该文件非常短,并且不嵌入任何对象)。

(1)启动Web browser。

(2)启动Ethereal分组嗅探器。

在窗口的显示过滤说明处输入“http”,分组列表子窗口中将只显示所俘获到的HTTP报文。

(3)一分钟以后,开始Ethereal分组俘获。

(4)在打开的Web browser窗口中输入一下地址(浏览器中将显示一个只有一行文字的非常简单的HTML文件):/ethereal-labs/HTTP-ethereal-file1.html(5)停止分组俘获。

窗口如图1所示。

根据俘获窗口内容,回答“四、实验报告内容”中的1-6题。

图1分组俘获窗口2、HTTP 条件GET/response交互(1)启动浏览器,清空浏览器的缓存(在浏览器中,选择“工具”菜单中的“Internet 选项”命令,在出现的对话框中,选择“删除文件”)。

(2)启动Ethereal分组俘获器。

开始Ethereal分组俘获。

(3)在浏览器的地址栏中输入以下URL: /ethereal-labs/HTTP-ethereal-file2.html,你的浏览器中将显示一个具有五行的非常简单的HTML文件。

(4)在你的浏览器中重新输入相同的URL或单击浏览器中的“刷新”按钮。

(5)停止Ethereal分组俘获,在显示过滤筛选说明处输入“http”,分组列表子窗口中将只显示所俘获到的HTTP报文。

根据操作回答“四、实验报告内容”中的7-10题。

3、获取长文件(1)启动浏览器,将浏览器的缓存清空。

(2)启动Ethereal分组俘获器。

开始Ethereal分组俘获。

DNS协议分析实验

DNS协议分析实验

DNS协议分析实验DNS(Domain Name System)是互联网中负责域名解析的协议,通过将人类可读的域名转换为计算机可识别的IP地址,实现了互联网上不同计算机之间的通信。

在本实验中,我们将对DNS协议进行深入分析,了解其工作原理和数据包结构。

实验环境:在本实验中,我们将使用Wireshark作为数据包捕获工具,通过观察和分析DNS请求和响应数据包来了解DNS协议的工作原理。

实验所需的系统环境为Windows或Linux操作系统,需要安装最新版本的Wireshark软件。

实验步骤:1. 打开Wireshark软件,并选择要抓取数据包的网络接口。

2. 在过滤器中输入“dns”,以过滤出DNS协议相关的数据包。

3. 进行一系列的DNS请求和响应操作,如访问一个网站、ping一个域名等。

4. 观察Wireshark中捕获到的数据包,分析其中DNS请求和响应的数据结构。

5.获取一个真实的DNS数据包,对其进行深入分析,包括报头和数据部分的结构。

6.总结实验过程中获得的知识,对DNS协议的工作原理和数据包结构进行总结和分析。

实验结果:在实验过程中,我们可以清晰地观察到DNS请求和响应数据包的结构。

一个典型的DNS请求数据包包括报头和问题部分,而DNS响应数据包包括报头、问题部分、回答部分、授权部分和附加部分。

通过分析这些数据包,我们可以了解DNS协议是如何解析域名的,以及实现域名解析时所涉及的相关参数和信息。

在DNS请求数据包中,最重要的部分是问题部分,其中包含了要查询的域名和查询类型(A记录或AAAA记录)。

而在DNS响应数据包中,回答部分则包含了查询结果的IP地址信息,授权部分和附加部分则包含了其他相关的信息,如授权服务器和附加信息等。

通过分析实验中捕获到的真实数据包,我们可以更加深入地了解DNS协议的工作原理。

在DNS数据包的报头部分,包括了一些重要的字段信息,如标识符、查询/响应标志、授权回答标志等,这些信息对于解析数据包和理解DNS协议非常重要。

计算机网络原理实验实验二

计算机网络原理实验实验二

计算机网络原理实验实验二-CAL-FENGHAI.-(YICAI)-Company One1实验二利用Wireshark分析DNS协议一、实验目的分析DNS协议了解GNS3的基本操作二、实验环境与因特网连接的计算机,操作系统为Windows,安装有Wireshark、IE、GNS3等软件。

三、实验步骤nslookup工具允许运行该工具的主机向指定的DNS服务器查询某个DNS记录。

如果没有指明DNS服务器,nslookup将把查询请求发向默认的DNS服务器。

1、打开命令提示符(Command Prompt),输入nslookup命令。

图中显示三条命令,第一条命令:nslookup “提出一个问题”即:“将主机的IP地址告诉我”。

屏幕上出现了两条信息:(1)“回答这一问题”DNS服务器的名字和IP地址;(2)主机名字和IP地址。

第二条命令:nslookup –type=NS 在这个例子中,我们提供了选项“-type=NS”,域为。

执行这条命令后,屏幕上显示了DNS服务器的名字和地址。

接着下面是三个USST DNS服务器,每一个服务器是USST校园里缺省的DNS服务器。

第三条命令:nslookup 在这个例子中,我们请求返回 DNS server 而不是默认的DNS服务器。

此例中,DNS 服务器提供主机的IP地址。

2、ipconfigipconfig用来显示TCP/IP 信息, 你的主机地址、DNS服务器地址,适配器等信息。

如果你想看到所有关于你所在主机的信息,可在命令行键入:ipconfig /allipconfig在管理主机所储存的DNS信息非常有用。

如果查看DNS缓存中的记录用命令:ipconfig /displaydns要清空DNS缓存,用命令:ipconfig /flushdns3、利用Wireshark捕获DNS信息(1)利用ipconfig命令清空你的主机上的DNS缓存。

(2)启动浏览器,将浏览器的缓存清空。

计算机网络实验指导书(附部分答案)..

计算机网络实验指导书(附部分答案)..

计算机网络实验指导书湖南工业大学计算机与通信学院网络工程系目录实验一 802.3协议分析和以太网 (3)一、实验目的 (3)二、预备知识 (3)三、实验环境 (4)四、实验步骤 (5)五、实验报告内容 (6)实验二 IP层协议分析 (7)一、实验目的 (7)二、实验环境 (7)三、实验步骤 (7)四、实验报告内容 (8)实验三 TCP协议分析 (9)一、实验目的及任务 (9)二、实验环境 (9)三、实验步骤 (9)四、实验报告内容 (10)实验四 HTTP和DNS分析 (11)一、实验目的及任务 (11)二、实验环境 (11)三、实验步骤 (11)四、实验报告内容 (12)实验一802.3协议分析和以太网一、实验目的1.分析802.3协议2.熟悉以太网帧的格式3.熟悉ARP报文的格式二、预备知识要深入理解网络协议,需要仔细观察协议实体之间交换的报文序列。

为探究协议操作细节,可使协议实体执行某些动作,观察这些动作及其影响。

这些任务可以在仿真环境下或在如因特网这样的真实网络环境中完成。

观察在正在运行协议实体间交换报文的基本工具被称为分组嗅探器(packet sniffer)。

顾名思义,一个分组嗅探器捕获(嗅探)计算机发送和接收的报文。

一般情况下,分组嗅探器将存储和显示出被捕获报文的各协议头部字段内容。

图1为一个分组嗅探器的结构。

图1右边是计算机上正常运行的协议(在这里是因特网协议)和应用程序(如:Web浏览器和ftp客户端)。

分组嗅探器(虚线框中的部分)是附加计算机普通软件上的,主要有两部分组成。

分组捕获库接收计算机发送和接收的每一个链路层帧的拷贝。

高层协议(如:HTTP、FTP、TCP、UDP、DNS、IP等)交换的报文都被封装在链路层帧(Frame)中,并沿着物理介质(如以太网的电缆)传输。

图1假设所使用的物理媒体是以太网,上层协议的报文最终封装在以太网帧中。

分组嗅探器的第二个组成部分是分析器。

网络通信协议分析实验

网络通信协议分析实验

网络通信协议分析实验在学习了计算机网络的基本工作原理之后,可以对网络协议的执行过程、网络服务的实现技术作进一步的探讨。

由于网络中的数据通常是以包的方式传送的,在对网络协议、网络的安全和可靠性等进行分析时,网络管理员常采用网络协议分析器捕获数据包的方式,对传输的数据包进行侦听和分析。

目前,Internet中流行的数据包侦听与分析工具比较多,在本专题实验中,选用Ethereal开放源代码工具包,通过捕获的数据包考察分析网络通信协议,以加深对协议、协议封装,以及协议数据单元格式的理解。

网络体系结构的考查分析1.实验目的计算机网络体系结构是分层的。

本实验的目的是通过Ethereal捕获数据包,进一步理解计算机网络分层的体系结构,初步了解Web交互中的各层是如何协同工作的。

2.实验任务1)了解网络协议分析器的基本特点。

2)使用网络协议分析器Ethereal捕获数据包序列,查看分析网络协议的分层结构。

3.实验设备及环境本实验设备及环境十分简单,可在某局域网或家庭网络环境中进行。

只要将一台正常接入Internet的计算机运行网络协议分析器Ethereal即可。

在Internet上免费的数据包捕获软件很多,如Sniffer Pro、Ethereal、Netxray、Iris,以及Windows 自带的网络监视器等。

这些软件的使用非常简单。

本专题实验以Windows环境下的数据包捕获与分析软件Ethereal为例。

4.实验方法与操作(1)安装软件并捕获数据包从Ethereal网页下载其最新版本,在客户端主机上安装Ethereal软件。

在连入Internet的个人计算机上启动Ethereal,并开始捕获跟踪记录。

在Web浏览器中,打开URL(如),将所得到的跟踪记录存放在example1.cap文件中。

(2)Ethereal层次化的数据包(也称为分组)协议分析方法根据五层协议模型,协议数据是从上到下封装后发送的。

对于协议分析需要从下至上进行。

计算机网络实验报告(DNS协议分析)

计算机网络实验报告(DNS协议分析)

实验DNS 协议分析 实验步骤1.打开wireshark ,设置好过滤器。

2.在命令提示符后键入nslookup .wireshark 捕获dns 的数据包。

结果如下: 表示本地域名服务器的名字;219.229.240.19表示本地域名服务器的IP 地址 表示 的真实域名;119.75.217.56和119.75.218.45为百度的IP 地址;3.设置好过滤器后按enter 键,开始抓包.4. 分析wireshark捕获的数据包.分析前四帧:首先通过反向查询获得本地DNS 服务器的域名域名,其次通过正向查询获得查询域名的IP 地址:4.具体分析捕获的数据包的DNS 报文格式:第一帧是192.168.1.102发送给本地DNS 服务器219.229.240.19的反向查询取得报文,用于获得本地DNS 服务器的名字。

具体协议说明如下:前两帧:通过反向查询获得本地DNS 服务器的名字 后两帧:通过正向查询获得查询域名对应的IP 地址帧数应用层存活时间网络层递归请求版本,表示的是 IP 規格版本标头长度识别码封包总长 。

通常以 byte 做单位來表示该封包的总长度,此数值包括标头和数据的总和。

第二帧是本地DNS服务器返回的响应帧,包含查询结果,即本地DNS 服务器的名字:存活时间反向查询的域名,即查询结果权威DNS本地服务器的域名第三帧是客户端发过给本地DNS服务器的DNS请求报文,用于请求对应的IP 地址请求的资源记录RR第四帧是本地DNS服务器发给客户端的响应报文,包含了对应的真正的域名和IP地址.是对应的真正域名,也是的最初的名字对应的IP是119.75.217.56和119.75.218.45。

网络与信息安全实验报告

网络与信息安全实验报告

网络与信息安全实验报告一、实验目的通过本次实验,对网络与信息安全领域中常见的攻击手段进行学习和实践,了解网络安全的重要性,提高网络安全意识和技能,加强信息安全保护能力。

二、实验工具1. Wireshark:用于网络流量的抓取和分析;2. Burp Suite:用于网络应用的漏洞扫描和攻击。

三、实验内容1.ARP欺骗攻击在实验环境中,使用ARP欺骗攻击工具发送伪造的ARP响应包,将网关的MAC地址欺骗为攻击者的MAC地址,使得目标主机发送的数据包会通过攻击者的机器。

2.DNS欺骗攻击在实验环境中,使用DNS欺骗攻击工具发送伪造的DNS响应包,将合法的域名解析到攻击者控制的IP地址上,使得用户访问合法网站时会被重定向到攻击者的网站。

3.DOS攻击在实验环境中,使用DOS攻击工具发送大量无效的数据包或占用大量资源的请求,使得目标系统的服务不可用。

四、实验结果与分析1.ARP欺骗攻击在实验中,通过发送ARP欺骗攻击工具生成的ARP响应包,成功将网关的MAC地址欺骗为攻击者的MAC地址。

在Wireshark中可以看到目标主机发送的数据包会通过攻击者的机器。

2.DNS欺骗攻击在实验中,通过发送DNS欺骗攻击工具生成的DNS响应包,成功将合法的域名解析到攻击者控制的IP地址上。

在Wireshark中可以看到用户访问合法网站时会被重定向到攻击者的网站。

3.DOS攻击在实验中,通过发送DOS攻击工具生成的大量无效数据包或占用大量资源的请求,成功使得目标系统的服务不可用。

通过对目标系统的网络流量进行分析,可以观察到网络流量骤增,且大部分请求无效,导致网络拥堵和服务不可用。

五、总结与建议通过本次实验,深入了解了网络与信息安全领域中常见的攻击手段,了解到网络安全的重要性。

在实践过程中,能够观察到攻击者是如何利用这些手段进行攻击和入侵的。

在进行网络与信息安全保护时,需要加强对网络设备和应用程序的安全配置,及时更新补丁和防火墙规则,加密敏感信息传输,使用强密码并定期更换,定期备份重要数据,加强对员工的安全教育和培训等,以提高网络安全保护能力。

网络简单观察实验_计网_实验报告

网络简单观察实验_计网_实验报告

实验一、网络简单观察实验一、实验目的1.观察了解网卡、线缆、集线器等设备;2.了解WINDOWS中的网络组成及参数;3.了解通过TCP/IP协议连接上网的方法;4.了解Ethereal软件的作用,以及利用Ethereal软件捕获、查看网络数据包的方法。

二、原理概述Ethereal是一个免费的网络协议分析软件,支持Linux、Windows等多种平台。

由于网络上产生的数据包很多,通常我们只对其中一部分数据包感兴趣,因此在捕捉具体的数据包之前需要定义一个过滤器(filter),以滤除不需要的信息。

一个过滤器实质上是一组规则,只有收到的数据满足规则时才保存,否则丢弃。

过滤器通常可以是多个规则的逻辑组合。

在Ethereal中捕捉数据包前,首先要选择要监听的接口。

点击菜单中“Capture” “Interface”,此处选择接口“NDIS5 Driver”。

在捕捉前还要设置一些参数,如过滤器。

点击“prepare”,出现设置窗口,在“Capture Filter”一栏中填写感兴趣的数据包对应规则(见使用手册)。

点击“Start”按钮开始捕捉。

打开浏览器访问一些站点后,然后关闭浏览器,最后点击“Stop”按钮,结束数据包的捕捉。

所有捕捉的数据包都显示在主窗口中。

窗口中上面的列表框为所有捕获数据包(帧)的列表,记录了这些数据包的捕获时间、来源、目的地、协议等信息。

中间的文本框为当前选中的捕获帧经Ethereal解释后的协议信息。

屏幕最下面的窗口中以二进制形式显示当前选中的数据包的原始内容。

如果需要保存所捕获的数据,可选择菜单“File”中的“Save as…”进行保存。

Ethereal支持多种文件格式。

三、实验内容1.了解网卡的配置情况;2.了解对等网的相关数据;3.了解TCP/IP协议的相关参数配置;4.阅读Ethereal软件的相关使用手册。

四、实验方法1.实验原理本实验是是在实验室的基于WINDOWS的网络上,观察网络的硬件软件,和相关的网络参数,并可以进行进一步的上网和共享硬盘等网络应用。

计网实验DNS--Data-Encapsulation-and-Frame-Examination

计网实验DNS--Data-Encapsulation-and-Frame-Examination

Computer netowrks LabsDNS, Data Encapsulation and FrameExaminationDNS, Data Encapsulation and FrameExaminationLearning ObjectivesAt completion of this lab, you will be able to:e Wireshark to capture and analyze DNS message2.Understand how DNS workse nslookup and ipconfig commands4.Explain the header fields in an Ethernet II frame.5.understand data encapsulation6. Report and Feedback on this labA nswer all questions with supporting screenshots. Please fill in the following feedback form and append it to the report. Your feedback is valuable to us so that we can improve this lab, and make the course welcome.For each task, please rate the following in the scale of 1 through 5: •The degree of difficulty: 1 = too easy; 5 = too difficult•The learning experience: 1 = learned nothing; 5 = learned a lot •Your interest: 1 = no interest; 5= high interest•Time used for the task: in minutesTask Difficulty(1—5) Learning (1—5)Interest(1—5)Time ( min)Task 0Task 1Task 2Task 3Task 4Your suggestion/comment:BackgroundWhen upper layer protocols communicate with each other, data at the sending host flows down the TCP/IP protocol layers and is encapsulated into aprotocol data unit at lower layer, and finally encapsulated in a Layer 2 frame. For example, DNS message is often transported by UDP protocol onlayer 4. So DNS message at the sending host is encapsulated in a UDP segment; the UDP segment is then encapsulated in an IP packet, and the IP packet is encapsulated finally in a layer 2 frame. The frame composition is dependent on the media access type, or the network. For example, if themedia access is Ethernet, then the Layer 2 frame encapsulation will be Ethernet II.When learning about data encapsulation and protocol operations, it ishelpful to analyze the header information found in the protocol data units. The DNS protocol operation, ipconfig command, and Ethernet II frame headerwill be examined in this lab. Ethernet II frames can support various upper layer protocols.For more background information, please read the lectures 02, 04-05, 10, 11. TasksTask 0 Protocol Layers and Data EncapsulationAs we have discussed in Lecture 02, Internet is inter-connected networks based on TCP/IP protocols. Read the slides or textbook to learn how datagoes through protocol layers and how data is encapsulated in the protocoldata units. There are conventional names for the protocol data units for different layer protocols.Question 1. What are names for the protocol data units (PDUs) for layer4, layer 3, and layer 2 protocols in TCP/IP reference model by filling the follow form:name for PDU of layer 4protocols: segmentname for PDU of layer 3protocol: packetname for PDU of layer 2protocol: frameTask 1 DNS and nslookupAs we discussed, IP address is used to identify a host uniquely on the Internet. But IP address is not user-friendly and that is why domain namewas introduced. The Domain Name System (DNS) translates host names to IP addresses, providing a critical role in the Internet infrastructure.In this task, we practice the nslookup tool, which is available both in Linux/Unix and MS Windows. To run nslookup in MS Windows, you need to open the command line window by starting the command "cmd.exe". With nslookup, you can query any specified DNS server (by default, your local configured DNS server) for a DNS record. To accomplish this task, nslookup sends a DNS query to the specified DNS server, receives a DNS reply from that same DNS server, and displays the result.Type the command "nslookup ", and capture the output, as I did and showed below:Question 2: What is the DNS server IP address that is used to query and find IP address for ? And IP address for ?Type the command “nslookup -type=NS ”, and capture the output, as I did and showed below:Question 3: What are domain name servers for and their IP addresses?Type the command “nslookup ”, and capture the output, as I did and showed below:Question 4: Which DNS server is used to query and for name resolution?You can also use nslookup to find the mapping from IP addresses to the host names. Type the commands “nslookup 192.168.156.101” and “nslookup ”, and capture the output, as I did and showed below:Question 5: Can a host have multiple host names? What is the IP address for moodle.tec.hkr.se? How many names do you find for this IP address?Task 2 DNS and ipconfigipconfig (for Windows) and ifconfig (for Linux/Unix, i nter f aceconfiguration) are among the most useful tools for debugging network issues. ipconfig can be used to show your current TCP/IP information, includingyour address, DNS server addresses, adapter (network interface card) typeand so on. For example, if you want to find all this information about your host, simply enter the command “ipconfig /all” in the command line.Read more on “using ipconfig” at support.microsoft./kb/314850.Question 6: What is the IP address for your computer, and what is thelocal DNS server IP address?答:IP:192.168.1.143DNS: 210.32.32.10 210.32.32.11ipconfig is also very useful for managing the DNS information stored inyour host. To improve the networking performance, a host can cache DNSrecords it recently obtained. To view these cached records, you can use the command “ipconfig /displaydns”. Each entry shows the remaining Time to Live (TTL) in seconds. To clear the cache, enter the command “ipconfig /flushdns”. Flushing the DNS cache clears all entries and reloads the entries from the hosts file.Task 3 DNS Protocol Analysis with WireSharkNow it is time to capture DNS protocol data and do the analysis with WireShark. Follow the steps to capture the DNS packets:•close all other Internet applications to reduce the captured data•start a web browser•use ipconfig to empty the DNS cache in your computer•start WireShark program, and enter the display filter“ip.addr==192.168.0.100 and dns”, where the IP address192.168.0.100 should be the IP address for your computer. You find it in question 6.•Start packet capture in WireShark•Enter the url address to your web browser to view the page.•Stop the packet capture.I got the following screenshot for this operation:Answer the following questions:Question 7: Locate the DNS query and response for resolving . Are they sent over UDP or TCP?UDPQuestion 8: What is the destination port for the DNS query message? What is the source portof DNS response message?Destination:210.32.32.10Source:192.168.1.143Question 9: To what IP address is the DNS query message sent? Use ipconfig to determine the IP address of your local DNS server. Are these two IP addresses the same?IP:210.32.32.10sameQuestion 10: Examine the D NS query message. What “Type” of DNS query is it? Does thequery message contain any “answers”?(1) The “Type”of DNS query is A。

计算机网络实验报告实验3

计算机网络实验报告实验3

计算机网络实验报告实验3一、实验目的本次计算机网络实验 3 的主要目的是深入理解和掌握计算机网络中的相关技术和概念,通过实际操作和观察,增强对网络通信原理、协议分析以及网络配置的实际应用能力。

二、实验环境本次实验在计算机网络实验室进行,使用的设备包括计算机、网络交换机、路由器等。

操作系统为 Windows 10,实验中使用的软件工具包括 Wireshark 网络协议分析工具、Cisco Packet Tracer 网络模拟软件等。

三、实验内容与步骤(一)网络拓扑结构的搭建使用 Cisco Packet Tracer 软件,构建一个包含多个子网的复杂网络拓扑结构。

在这个拓扑结构中,包括了不同类型的网络设备,如交换机、路由器等,并配置了相应的 IP 地址和子网掩码。

(二)网络协议分析启动 Wireshark 工具,捕获网络中的数据包。

通过对捕获到的数据包进行分析,了解常见的网络协议,如 TCP、IP、UDP 等的格式和工作原理。

观察数据包中的源地址、目的地址、协议类型、端口号等关键信息,并分析它们在网络通信中的作用。

(三)网络配置与管理在实际的网络环境中,对计算机的网络参数进行配置,包括 IP 地址、子网掩码、网关、DNS 服务器等。

通过命令行工具(如 Windows 中的 ipconfig 命令)查看和验证配置的正确性。

(四)网络故障排查与解决设置一些网络故障,如 IP 地址冲突、网络连接中断等,然后通过相关的工具和技术手段进行故障排查和解决。

学习使用 ping 命令、tracert 命令等网络诊断工具,分析故障产生的原因,并采取相应的解决措施。

四、实验结果与分析(一)网络拓扑结构搭建结果成功构建了包含多个子网的网络拓扑结构,各个设备之间能够正常通信。

通过查看设备的状态指示灯和配置信息,验证了网络连接的正确性。

(二)网络协议分析结果通过 Wireshark 捕获到的数据包,清晰地看到了 TCP 三次握手的过程,以及 IP 数据包的分片和重组。

DNS协议分析实验

DNS协议分析实验

DNS协议分析实验DNS(Domain Name System,域名系统)是互联网中用于将域名解析为IP地址的一种协议。

在进行DNS协议分析实验时,我们将深入了解其工作原理,并通过实验来了解其具体实施过程。

首先,DNS协议的主要作用是将用户输入的域名转换为相应的IP地址,从而使得用户能够通过域名来访问网站和其他网络服务。

DNS协议通过多级的树状结构来组织域名,并通过域名解析服务器来查找和返回相应的IP地址。

为了进行DNS协议分析实验,我们需要使用一些工具来观察和分析DNS请求和响应的过程。

常用的工具包括Wireshark和nslookup等。

实验中,我们可以首先使用Wireshark来捕获和分析DNS数据包。

Wireshark是一款网络分析工具,可以监听和捕获网络数据流量,并提供详细的协议分析。

通过Wireshark,我们可以实时监测网络中的DNS请求和响应,并分析其协议头部的各个字段。

比如,我们可以观察到DNS请求中的查询类型(A记录、AAAA记录等)和查询域名,以及DNS响应中的查询结果(IP 地址)等。

另外,我们还可以使用nslookup命令来进行DNS查询。

nslookup是一种常用的网络工具,它可以通过输入域名来获得相应的IP地址。

通过使用nslookup命令,我们可以手动模拟DNS查询过程,并观察DNS服务器的响应结果。

通过这些工具,我们可以进行一些具体的实验来深入了解DNS协议的工作原理。

下面是一些可能的实验方向:1. DNS查询过程分析:使用Wireshark捕获DNS数据包,观察并分析DNS查询和响应过程。

可以关注查询类型、查询域名和响应结果等。

2. DNS响应时间分析:通过Wireshark中的时间戳功能,可以计算DNS响应的延迟时间。

可以通过对比不同DNS服务器的响应时间,来评估其性能。

3. DNS缓存分析:通过Wireshark分析DNS缓存的使用情况,了解DNS缓存对查询性能的影响。

计算机网络实验报告 DNS

计算机网络实验报告  DNS

陕西师范大学计算机网络实验报告实验四 DNS一、实验目的1.熟悉并掌握 wireshark的操作。

2.分析DNS协议。

二、实验器材1.PC机电脑一台。

2.下载wireshark软件并安装三、实验内容及问题回答1.练习使用nslookup程序发送DNS查询1. Run nslookup to obtain the IP address of a Web server in Asia.2. Run nslookup to determine the authoritative DNS servers for a university in Europe.3. Run nslookup so that one of the DNS servers obtained in Question 2 is queried for the mail servers for Yahoo! Mail 德国德累斯顿工业大学2.练习使用ipconfig (1)ipconfig/all(2).Ipconfig/displaydns(3).ipconfig/flushdns清除缓存3. Tracing DNS with Wireshark实验1过程:1.使用ipconfig清空DNS缓冲存储;2.清空浏览器的缓存;3.启动Wireshark,在filter中输入“ip.addr==10.2.136.26”;4.开始抓包;5.访问;6.页面打开后,停止抓包。

4. Locate the DNS query and response messages. Are they sent over UDP or TCP?答:用的是UDP5. What is the destination port for the DNS query message? What is the source port of DNS response message?答:Src Port :domain(53), Dst Port: domain(53)6. To what IP address is the DNS query message sent? Use ipconfig to determine the IP address of your local DNS server. Are these two IP addresses the same?答:Destination:202.117.144..2(202.117.144.2) 与用本地DNS 服务器的IP 地址相同。

网络解析协议实验报告(3篇)

网络解析协议实验报告(3篇)

第1篇一、实验目的1. 理解网络解析协议的基本概念和工作原理。

2. 掌握DNS、ARP等网络解析协议的报文格式和报文分析。

3. 学会使用抓包工具分析网络解析协议的报文传输过程。

4. 提高网络故障排查能力。

二、实验环境1. 硬件设备:PC机、网线、路由器。

2. 软件环境:Wireshark抓包软件、网络解析协议实验平台。

三、实验内容1. DNS协议分析(1)实验目的:了解DNS协议的工作原理,掌握DNS报文格式。

(2)实验步骤:① 在实验平台上配置好DNS服务器和客户端。

② 使用nslookup命令进行域名解析,并观察DNS服务器返回的结果。

③ 使用Wireshark抓包工具,捕获DNS查询和响应报文。

④ 分析DNS查询和响应报文的格式,包括报文类型、报文长度、域名、IP地址等信息。

2. ARP协议分析(1)实验目的:了解ARP协议的工作原理,掌握ARP报文格式。

(2)实验步骤:① 在实验平台上配置好主机A和主机B。

② 在主机A上使用ping命令ping主机B的IP地址,观察ARP请求和响应报文。

③ 使用Wireshark抓包工具,捕获ARP请求和响应报文。

④分析ARP请求和响应报文的格式,包括硬件类型、协议类型、硬件地址、协议地址等信息。

3. IP协议分析(1)实验目的:了解IP协议的工作原理,掌握IP数据报格式。

(2)实验步骤:① 在实验平台上配置好主机A和主机B。

② 在主机A上使用ping命令ping主机B的IP地址,观察IP数据报传输过程。

③ 使用Wireshark抓包工具,捕获IP数据报。

④ 分析IP数据报的格式,包括版本、头部长度、服务类型、总长度、生存时间、头部校验和、源IP地址、目的IP地址等信息。

四、实验结果与分析1. DNS协议分析结果:通过实验,我们了解到DNS协议在域名解析过程中的作用,以及DNS查询和响应报文的格式。

DNS协议通过查询和响应报文,实现域名到IP地址的转换,从而实现网络设备之间的通信。

DNS协议分析实验报告

DNS协议分析实验报告

DNS协议分析实验报告工程类实验报告系:计算机与信息学院专业:网络工程年级:09级姓名:学号:实验课程:实验室号:___ 实验设备号:实验时间:指导教师签字:成绩:实验四DNS 协议分析实验1.实验原理DNS 是域名系统(Domain Name System)的缩写,是一种分层次的、基于域的命名方案,主要用来将主机名映射成IP 地址。

当用户在应用程序中输入域名时,DNS 通过一个分布式数据库系统将域名解析为相对应的IP 地址。

(1)域名服务器和域名解析在互联网中,域名解析是通过域名服务器实现的。

域名服务器构成对应的层次结构,每个域名服务器保存着它所管辖区域内的主机名和IP 地址的对照表。

这组域名服务器是域名解析的核心。

域名解析方式有两种:递归解析和迭代解析。

(2)域名解析递归解析就是本地域名服务器系统一次性地完成域名到IP 地址的转换,即使它没有所要查询的域名信息,它也会查询别的域名服务器。

迭代解析则是当本地域名服务器中没有被查询的主机域名的信息时,它就会将一个可能有该域名信息的DNS 服务器的地址返回给请求域名解析的DNS 客户,DNS 客户再向指定的DNS 服务器查询。

在实际应用中通常是将两种解析方式结合起来进行域名解析。

当本地域名服务器没有所要查询的域名信息时,就请求根域名服务器,根域名服务器将有可能查到该域名信息的域名服务器地址返回给要求域名解析的本地域名服务器,本地域名服务器再到指定的域名服务器上查询,如指定域名服务器上还没有该域名信息,它再将它的子域名服务器的IP 地址返回给要求域名解析的本地域名服务器,这样直到查询到待解析的域名的IP 地址为止(没有注册的主机域名除外),本地域名服务器再将查询结果返回给DNS 客户,完成域名解析。

(3)DNS 高速缓存每个域名服务器都维护着一个高速缓存,存放最近用到过的域名信息和此记录的Simple DNS Plus 软件安装完成后,其内部已经存储了一些根域名服务器的IP 地址,当收到DNS 请求时,如果在本地缓存中找不到相应的记录,DNS 服务器则向这些根域名服务器发出域名解析请求,并逐步完成解析过程。

《计算机网络》实验指导书步骤及答案

《计算机网络》实验指导书步骤及答案

目录实验1 实验环境熟悉 (1)实验2 网络协议仿真软件的熟悉 (2)实验3 编辑并发送LLC帧 (3)实验4 编辑并发送MAC帧 (4)实验5 (5)实验6 网际协议IP (6)实验7 Internet控制报文协议icmp (8)实验8 用户数据报协议UDP (10)实验9 传输控制协议TCP (11)实验一:实验环境的熟悉实验目的:1.掌握实验系统的软硬件组成2.熟悉实验系统软件界面实验设备:N台计算机,中软吉大的协议仿真软件实验步骤:1.由教师引领,观察实验室硬件布局、网线连接、主要设备等相关情况;2.打开中软吉大的协议仿真软件,了解软件的组成模块(包括仿真编辑器和协议分析器);2.了解实验中要用到的3种网络拓扑结构图;3.了解每种拓扑图中计算机的连接方法和ip地址的设置方法;主服务器IP设为172.16.1.100;其它机器设为172.16.1.*mask:255.255.255.0Gateway:172.16.1.1Dns:172.16.1.1004.打开中软吉大网络协议仿真教学系统(通用版)课件,熟悉9个实验的名称,有关实验的说明。

实验二:网络协议仿真软件的熟悉实验目的:1.熟悉仿真编辑器界面的操作2.熟悉协议分析器界面的操作实验设备:N台计算机,中软吉大的协议仿真软件实验步骤:打开中软吉大的协议仿真软件,浏览界面,尝试使用界面上的工具按钮。

(1)打开仿真编辑器。

该系统的初始界面分为5个部分:多帧编辑区、单帧编辑区、协议模型区、地址本和十六进制显示区a.多帧编辑区b.单帧编辑区c.协议模型区d.地址本e.十六进制显示区(2)应用实例a.编辑MAC层b.编辑IP层c.编辑TCP层(3)协议分析器使用简介a.会话分析b.协议解析(4)应用实例a.在单帧编辑区中编辑一个ICMP帧b.在协议分析器捕获该帧并分析实验三: 编辑并发送LLC帧实验目的:1.掌握以太网报文格式;2.掌握LLC帧报文格式;3.掌握仿真编辑器和协议分析器的使用方法;实验设备:集线器,N台计算机,N条双绞线,协议仿真系统实验步骤:1.将服务器和工作站用双绞线和HUB连通并加载协议仿真模块2.将主机A和B作为一组,主机A启动仿真编辑器,并编写一个LLC 帧。

计算机网络实验-DNS、SMTP、POP3协议分析

计算机网络实验-DNS、SMTP、POP3协议分析

实验三DNS、SMTP、POP3协议分析【实验目的】了解DNS解析的过程;掌握DNS报文格式, 学习DNS协议的原理和实现方法掌握nslookup命令和ipconfig命令的使用;理解SMTP, POP3协议的基本原理及其与传输层协议的关系。

【实验内容】一、DNS协议分析使用nslookup工具解析域名,捕获数据包并进行分析1、在实验主机上启动网络协议分析仪进行数据捕获并设置过滤条件,在工具栏点击“过滤器”按钮,会弹出“设置&过滤器”对话框,在“过滤器类型”中选择“类型过滤器”,类型值中选择“DNS协议”,点击“设置参数”按钮后“确定”,开始进行数据包的捕获:图5- 1 设置DNS协议过滤器2、使用nslookup工具进行域名的解析。

nslookup命令是查询域名对应IP的工具,其用法可以直接在Windows系统的命令提示符下运行命令:nslookup域名来进行域名解析,例如:图5- 2 使用nslookup工具(一)也可以仅仅运行nslookup命令(不需任何参数),进入nslookup的交互界面,在“>”提示符后可以多次输入不同的域名,以实现多次的查询,例如可以在一次nslookup的交互过程中,进行图5- 3 使用nslookup工具(二)最后,可用“exit”命令退出nslookup的交互状态。

3、分析捕获到的数据报文。

图5- 4 是一个DNS的查询报文,从中可以看到,报文的标识为10,问题数是1,答案数、权威答案数、附加答案数都是0,而要查询的域名是图5- 4 DNS的查询报文图5- 5 则是相应的响应报文,报文标识同样为10,指明这个响应是针对哪一个查询报文的,问题数是1,答案数是2,权威答案数和附加答案数都是0,并且对域名 的查询结果是209.131.36.158图5- 5 DNS的响应报文1、继续使用协议分析仪进行数据的捕获,同时打开IE浏览器,访问、、 ,观察此时是否还有DNS请求?2、关闭IE浏览器后再重新打开,访问一个尚未访问过的网站,例如,观察此时是否有DNS请求?为什么?3、在Windows系统的命令提示符下运行:ipconfig /displaydns显示本机缓冲区中的DNS解析内容,如图5- 6所示:图5- 6 显示本机的DNS缓存4、在Windows系统的命令提示符下运行:ipconfig /flushdns,则可以清除本机的DNS缓存记录,如图5- 7所示:图5- 7 清除本机的DNS缓存二、SMTP协议分析说明:实验室收发邮件服务器为192.168.2.24并且能够支持SMTP和POP3协议,实验室主机安装有Outlook Express软件,学生可以进行账号的配置,并利用其进行收发邮件的的操作:邮箱为nxx@netlab.ie ,(注意其中xx=01-40,每位同学取与自己的机器号相同的数字)密码为123,配置完成后可看到的邮件帐户属性(帐户名一定要写完整:nxx@netlab.ie)在Outlook中创建一封邮件,发送出去。

计算机网络实验报告实验内容-

计算机网络实验报告实验内容-

物电学院电子信息工程计算机网络实验报告实验一、以太网帧的构成(4学时),拓扑结构一实验二、网际协议IP(4学时),拓扑结构一实验三、Internet控制报文协议ICMP(2学时),拓扑结构二实验四、域名服务协议DNS(2学时),拓扑结构一实验五、动态主机配置协议DHCP(2学时),拓扑结构一实验六、传输控制协议TCP(4学时),拓扑结构一指导老师:年级班级:学号:姓名:实验一以太网帧的构成一、实验目的1. 掌握以太网的报文格式2. 掌握MAC地址的作用3. 掌握MAC广播地址的作用4. 掌握LLC帧报文格式5. 掌握仿真编辑器和协议分析器的使用方法二、实验原理(一)、两种不同的MAC帧格式常用的以太网MAC帧格式有两种标准,一种是DIX Ethernet V2标准;另一种是IEEE的802.3标准。

目前MAC帧最常用的是以太网V2的格式。

下图画出了两种不同的MAC帧格式。

(二)、MAC层的硬件地址1、在局域网中,硬件地址又称物理地址或MAC地址,它是数据帧在MAC层传输的一个非常重要的标识符。

2、网卡从网络上收到一个 MAC 帧后,首先检查其MAC 地址,如果是发往本站的帧就收下;否则就将此帧丢弃。

这里“发往本站的帧”包括以下三种帧:单播(unicast)帧(一对一),即一个站点发送给另一个站点的帧。

广播(broadcast)帧(一对全体),即发送给所有站点的帧(全1地址)。

多播(multicast)帧(一对多),即发送给一部分站点的帧。

三、网络结构四、实验步骤练习一:编辑并发送LLC 帧本练习将主机A 和B 作为一组,主机C 和D 作为一组,主机E 和F 作为一组。

现仅以主机A 和B 为例,说明实验步骤。

1、主机A 启动仿真编辑器,并编写一个LLC 帧。

目的MAC 地址:主机B 的MAC 地址。

源MAC 地址:主机A 的MAC 地址。

协议类型和数据长度:可以填写001F 。

类型和长度:可以填写001F 。

计网实验DNS, Data Encapsulation and Frame Examination

计网实验DNS, Data Encapsulation and Frame Examination

Computer netowrks Labs DNS, Data Encapsulation and Frame Examination DNS, Data Encapsulation and FrameExaminationLearning ObjectivesAt completion of this lab, you will be able to:e Wireshark to capture and analyze DNS message2.Understand how DNS workse nslookup and ipconfig commands4.Explain the header fields in an Ethernet II frame.5.understand data encapsulation6. Report and Feedback on this labA nswer all questions with supporting screenshots. Please fill in the following feedbackform and append it to the report. Your feedback is valuable to us so that we can improve this lab, and make the course welcome.For each task, please rate the following in the scale of 1 through 5:∙The degree of difficulty: 1 = too easy; 5 = too difficult∙The learning experience: 1 = learned nothing; 5 = learned a lot∙Your interest: 1 = no interest; 5= high interest∙Time used for the task: in minutesTask Difficulty (1—5) Learning (1—5) Interest (1—5) Time ( min) Task 0Task 1Task 2Task 3Task 4Your suggestion/comment:BackgroundWhen upper layer protocols communicate with each other, data at the sending host flows down the TCP/IP protocol layers and is encapsulated into a protocol data unit at lower layer, and finally encapsulated in a Layer 2 frame. For example, DNS message is often transported by UDP protocol on layer 4. So DNS message at the sending host is encapsulated in a UDP segment; the UDP segment is then encapsulated in an IP packet, and the IP packet is encapsulated finally in a layer 2 frame. The frame composition is dependent on the media access type, or the network. For example, if the media access is Ethernet, then the Layer 2 frame encapsulation will be Ethernet II.When learning about data encapsulation and protocol operations, it is helpful to analyze the header information found in the protocol data units. The DNS protocol operation, ipconfig command, and Ethernet II frame header will be examined in this lab. Ethernet II frames can support various upper layer protocols.For more background information, please read the lectures 02, 04-05, 10, 11.TasksTask 0 Protocol Layers and Data EncapsulationAs we have discussed in Lecture 02, Internet is inter-connected networks based on TCP/IP protocols. Read the slides or textbook to learn how data goes through protocol layers and how data is encapsulated in the protocol data units. There are conventional names for the protocol data units for different layer protocols.Question 1. What are names for the protocol data units (PDUs) for layer 4, layer 3, and layer 2 protocols in TCP/IP reference model by filling the follow form:name for PDU of layer 4 protocols: segmentname for PDU of layer 3 protocol: packetname for PDU of layer 2 protocol: frameTask 1 DNS and nslookupAs we discussed, IP address is used to identify a host uniquely on the Internet. But IP address is not user-friendly and that is why domain name was introduced. The Domain Name System (DNS) translates host names to IP addresses, providing a critical role in the Internet infrastructure.In this task, we practice the nslookup tool, which is available both in Linux/Unix and MS Windows. To run nslookup in MS Windows, you need to open the command line window by starting the command "cmd.exe". With nslookup, you can query any specified DNS server (by default, your local configured DNS server) for a DNS record. To accomplish this task, nslookup sends a DNS query to the specified DNS server, receives a DNS reply from that same DNS server, and displays the result.Type the command "nslookup ", and capture the output, as I did and showed below:Question 2: What is the DNS server IP address that is used to query and find IP address for ? And IP address for ?Type the command “nslookup -type=NS ”, and capture the output, as I did and showed below:Question 3: What are domain name servers for and their IP addresses?Type the command “nslookup ”, and capture the output, as I did and showed below:Question 4: Which DNS server is used to query and for name resolution?You can also use nslookup to find the mapping from IP addresses to the host names. Type the commands “nslookup 192.168.156.101” and “nslookup ”, and capture the output, as I did and showed below:Question 5: Can a host have multiple host names? What is the IP address formoodle.tec.hkr.se? How many names do you find for this IP address?Task 2 DNS and ipconfigipconfig (for Windows) and ifconfig (for Linux/Unix, i nter f ace configuration) are among the most useful tools for debugging network issues.ipconfig can be used to show your current TCP/IP information, including your address, DNS server addresses, adapter (network interface card) type and so on. For example, if you want to find all this information about your host, simply enter the command “ipconfig /all” in the command line.Read more on “using ipconfig” at /kb/314850.Question 6: What is the IP address for your computer, and what is the local DNS server IP address?答:IP:192.168.1.143DNS: 210.32.32.10 210.32.32.11ipconfig is also very useful for managing the DNS information stored in your host. To improve the networking performance, a host can cache DNS records it recently obtained. To view these cached record s, you can use the command “ipconfig /displaydns”. Each entry shows the remaining Time to Live (TTL) in seconds. To clear the cache, enter the command “ipconfig /flushdns”. Flushing the DNS cache clears all entries and reloads the entries from the hosts fi le. Task 3 DNS Protocol Analysis with WireSharkNow it is time to capture DNS protocol data and do the analysis with WireShark. Follow the steps to capture the DNS packets:∙close all other Internet applications to reduce the captured data∙start a web browser∙use ipconfig to empty the DNS cache in your computer∙start WireShark program, and enter the display filter “ip.addr==192.168.0.100 and dns”, where the IP address 192.168.0.100 should be the IP address for your computer.You find it in question 6.∙Start packet capture in WireShark∙Enter the url address to your web browser to view the page.∙Stop the packet capture.I got the following screenshot for this operation:Answer the following questions:Question 7:Locate the DNS query and response for resolving . Are they sent over UDP or TCP?UDPQuestion 8: What is the destination port for the DNS query message? What is the source port of DNS response message?Destination:210.32.32.10Source:192.168.1.143Question 9: To what IP address is the DNS query message sent? Use ipconfig to determine the IP address of your local DNS server. Are these two IP addresses the same?IP:210.32.32.10sameQuestion 10:Examine the DNS query message. What “Type” of DNS query is it? Does the query message contain any “answers”?(1) The “Type”of DNS query is A。

计算机网络DNS以及HTTP协议实验报告

计算机网络DNS以及HTTP协议实验报告

学生实验报告姓名:学号:班级:指导老师:内容摘要该实验报告介绍了DNS协议分析实验和http的相关分析。

DNS协议分析是通过nslookup进行域名解析并通过协议分析软件来分析DNS协议的报文格式,如:DNS中RR格式的具体内容,以及DNS报文中事物标号,报文类型,问题的个数,回答RR个数,权威域名RR数,附加RR数,问题具体RR数,回答具体RR数,域名对应的权威域名服务器的相关RR和附加的具体RR数;http 协议分析主要有获取网页的流程,其次是分析http请求报文和响应报文的格式并进行简单的报文分析,和对于网页中用户登录时的密码是为明文的分析,WEB缓存的验证,以及对http1.0和1.1之间的区别分析一、DNS协议分析:实验目的1.学会客户端使用nslookup命令进行域名解析2.通过协议分析软件掌握DNS协议的报文格式实验原理连上internet的PC机,并且安装有协议分析软件Wireshark。

实验原理及概况1.DNS解析过程:(1)当客户机提出查询请求时,首先在本地计算机的缓存中查找,如果在本地无法查询信息,则将查询请求发给DNS服务器(2)首先客户机将域名查询请求发送到本地DNS服务器,当本地DNS服务器接到查询后,首先在该服务器管理的区域的记录中查找,如果找到该记录,则进行此记录进行解析,如果没有区域信息可以满足查询要求,服务器在本地缓存中查找(3)如果本地服务器不能在本地找到客户机查询的信息,将客户机请求发送到根域名DNS服务器(4)根域名服务器负责解析客户机请求的根域名部分,它将包含下一级域名信息的DNS服务器地址地址返回给客户机的DNS服务器地址(5)客户机的DNS服务器利用根域名服务器解析的地址访问下一级DNS服务器,得到再下一级域名的DNS服务器地址(6)按照上述递归方法逐级接近查询目标,最后在有目标域名的DNS服务器上找到相应IP地址信息(7)客户机的本地DNS服务器将递归查询结构返回客户机(8)客户机利用从本地DNS服务器查询得到的IP访问目标主机,就完成了一个解析过程(9)同时客户机本地DNS服务器更新其缓存表,客户机也更新期缓存表,方便以后查询 3. DNS处于IP分层结构的应用层,是一种应用层协议,DNS协议数据单元封装在UDP数据报文中,DNS服务器端使用公用端口号为53(使用UDP协议0x11)2.DNS报文协议结构;标识标志问题数资源记录数授权资源记录数额外资源记录数查询问题回答(资源记录数可变)授权(资源记录数可变)额外资源记录数(资源记录数可变)该报文是由12字节的首部和4个长度可变的字节组成标识字段:占用两个字节,由客户程序设置,并由服务器返回结果标志字段:该字段占两个字节长,被细分成8个字段:QR 1 Opcode 4 AA 1 TC 1 RD 1 RA 1 Zero 3 Rcode 4QR:1bits字段,0表示查询报文,1表示响应报文 Opcode:4bits字段,通常值为0(标准查询),其他值为1(反向查询)和2(服务器状态请求)AA:1bits标志表示授权回答(authoritive answer),该名字服务器是授权于该领域的 TC:1bits 字段,表示可截(truncated),使用UDP时,它表示当应答的总长度超过512字节时,只返回前512个字节RD:1bits字段,表示期望递归,该比特能在一个查询中设置,并在一个响应中返回,这个标志告诉名字服务器必须处理这个查询,也称为一个递归查询,如果该位为0,且被请求的名字服务器没有一个授权回答,它就返回一个能解答该查询的其他名字服务器列表,这称为迭代查询(期望递归)RA:1bits字段,表示可用递归,如果名字服务器支持递归查询,则在响应中将该bit置为1(可用递归)zero:必须为0rcode:是一个4bit的返回码字段,通常值为0(没有差错)和3(名字差错),名字差错只有从一个授权名字服务器上返回,它表示在查询中指定的域名不存在随后的4个bit字段说明最后4个变长字段中包含的条目数,对于查询报文,问题数通常是1,其他三项为0,类似的,对于应答报文,回答数至少是1,剩余两项可以使0或非0 5. DNS 查询报文中每个查询问题的格式0 16 31查询名查询类型查询类查询名:要查找的名字查询类:通常值为1,表示是互联网的地址,也就是IP协议族的地址查询类型:有很多种查询类型,一般最常用的查询类型是A类型(表示查找域名对应的IP 地址)和PTR类型(表示查找IP地址对应的域名)查询名为要查找的名字,它由一个或者多个标示符序列组成,每个标示符已首字符字节数的计数值来说明该表示符长度,每个名字以0结束,计数字节数必须是0~63之间,该字段无需填充字节,如:实验步骤1.打开Wireshark,设置好过滤器(1).打开后选择capture,后选择interfaces;(2).接着选择有数据变动的网络连接,后选option;(3)在Filter里输入udp port 53;2.使用命令提示符输入nslookup查找的IP地址,分析Wireshark捕获的数据包;具体分析如下:1.第一帧:由本地PC机IP地址为182.1.63.149发送报文给本地DNS服务器219.229.240.19的反向查询,用于查询本地服务器的名字,具体协议如下:报文标识为1;标志为1;问题数1;回答数0;权威RR 为0;附加RR 为0;询问IP 地址为219.229.240.19的权威域名,type 类型为PTR ;第二帧是本地DNS 服务器响应报文,包含了查询结果,即本地DNS 服务器的名字:权威回答数1;本地DNS 服务器的名字为附加RR 回答了本地域名服务器域名对应的IP 地址;第三帧用于客户端发送给本地DNS 服务器的请求报文,用于请求 的IP 地址 查询结果回复的帧数第四帧是本地DNS域名服务器的响应报文,包含了回答的IP地址其中,权威RR回答了IP地址,别名等信息;二、Http协议分析:生存时间别名实验目的1.分析http1.0和1.1之间的区别(持续连接和非持续连接,流水线和非流水线)。

计算机网络课程设计DNS服务器实验报告(共5篇)

计算机网络课程设计DNS服务器实验报告(共5篇)

计算机网络课程设计DNS服务器实验报告(共5篇)第一篇:计算机网络课程设计 DNS 服务器实验报告DNS中继服务器实验报告07415林珅(13)071401 07415刘磊(18)071406 07415李鸿(19)071407一、系统概述1)运行环境:windows XP2)编译:Microsoft visual C++ 6.0 3)使用方法:a)使用ipconfig/all,记下当前DNS服务器,例如为211.68.71.4b)使用下页的配置界面,将DNS设置为127.0.0.1(本地主机)c)运行你的dnsrelay程序(在你的程序中把外部dns服务器设为前面记下的211.68.71.4)d)正常使用ping,ftp,IE等,名字解析工作正常二、系统的功能设计设计一个DNS服务器程序,读入“域名-IP地址”对照表,当客户端查询域名对应的IP地址时,用域名检索该对照表,三种检索结果:1)检索结果为ip地址0.0.0.0,则向客户端返回“域名不存在”的报错消息(不良网站拦截功能)2)检索结果为普通IP地址,则向客户返回这个地址(服务器功能)3)表中未检到该域名,则向因特网DNS服务器发出查询,并将结果返给客户端(中继功能)•考虑多个计算机上的客户端会同时查询,需要进行消息ID的转换三、模块划分DNS服务器主模块包含三个子模块,分别如下:1)命令行参数处理模块:该模块用来处理通过命令行提示符来启动这个DNS服务器时所输入的命令行参数,管理员通过设置不同的参数可以使DNS服务器显示不同程度的提示和调试信息。

所以这模块主要是依照输入的参数设置标志数据,以控制最后的各种信息的输出。

2)本地解析模块:本模块是在本DNS服务器本地保存的曾经解析过的或者需要屏蔽额域名和其对应IP信息文件中查找从应用程序来的请求解析的域名,在这个文件中查到需要的域名后取出对应的IP地址,并构造DNS应答数据包返回给发送此DNS域名解析请求的应用程序。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Computer netowrks Labs DNS, Data Encapsulation and Frame Examination DNS, Data Encapsulation and FrameExaminationLearning ObjectivesAt completion of this lab, you will be able to:e Wireshark to capture and analyze DNS message2.Understand how DNS workse nslookup and ipconfig commands4.Explain the header fields in an Ethernet II frame.5.understand data encapsulation6. Report and Feedback on this labA nswer all questions with supporting screenshots. Please fill in the following feedbackform and append it to the report. Your feedback is valuable to us so that we can improve this lab, and make the course welcome.For each task, please rate the following in the scale of 1 through 5:∙The degree of difficulty: 1 = too easy; 5 = too difficult∙The learning experience: 1 = learned nothing; 5 = learned a lot∙Your interest: 1 = no interest; 5= high interest∙Time used for the task: in minutesTask Difficulty (1—5) Learning (1—5) Interest (1—5) Time ( min) Task 0Task 1Task 2Task 3Task 4Your suggestion/comment:BackgroundWhen upper layer protocols communicate with each other, data at the sending host flows down the TCP/IP protocol layers and is encapsulated into a protocol data unit at lower layer, and finally encapsulated in a Layer 2 frame. For example, DNS message is often transported by UDP protocol on layer 4. So DNS message at the sending host is encapsulated in a UDP segment; the UDP segment is then encapsulated in an IP packet, and the IP packet is encapsulated finally in a layer 2 frame. The frame composition is dependent on the media access type, or the network. For example, if the media access is Ethernet, then the Layer 2 frame encapsulation will be Ethernet II.When learning about data encapsulation and protocol operations, it is helpful to analyze the header information found in the protocol data units. The DNS protocol operation, ipconfig command, and Ethernet II frame header will be examined in this lab. Ethernet II frames can support various upper layer protocols.For more background information, please read the lectures 02, 04-05, 10, 11.TasksTask 0 Protocol Layers and Data EncapsulationAs we have discussed in Lecture 02, Internet is inter-connected networks based on TCP/IP protocols. Read the slides or textbook to learn how data goes through protocol layers and how data is encapsulated in the protocol data units. There are conventional names for the protocol data units for different layer protocols.Question 1. What are names for the protocol data units (PDUs) for layer 4, layer 3, and layer 2 protocols in TCP/IP reference model by filling the follow form:name for PDU of layer 4 protocols: segmentname for PDU of layer 3 protocol: packetname for PDU of layer 2 protocol: frameTask 1 DNS and nslookupAs we discussed, IP address is used to identify a host uniquely on the Internet. But IP address is not user-friendly and that is why domain name was introduced. The Domain Name System (DNS) translates host names to IP addresses, providing a critical role in the Internet infrastructure.In this task, we practice the nslookup tool, which is available both in Linux/Unix and MS Windows. To run nslookup in MS Windows, you need to open the command line window by starting the command "cmd.exe". With nslookup, you can query any specified DNS server (by default, your local configured DNS server) for a DNS record. To accomplish this task, nslookup sends a DNS query to the specified DNS server, receives a DNS reply from that same DNS server, and displays the result.Type the command "nslookup ", and capture the output, as I did and showed below:Question 2: What is the DNS server IP address that is used to query and find IP address for ? And IP address for ?Type the command “nslookup -type=NS ”, and capture the output, as I did and showed below:Question 3: What are domain name servers for and their IP addresses?Type the command “nslookup ”, and capture the output, as I did and showed below:Question 4: Which DNS server is used to query and for name resolution?You can also use nslookup to find the mapping from IP addresses to the host names. Type the commands “nslookup 192.168.156.101” and “nslookup ”, and capture the output, as I did and showed below:Question 5: Can a host have multiple host names? What is the IP address formoodle.tec.hkr.se? How many names do you find for this IP address?Task 2 DNS and ipconfigipconfig (for Windows) and ifconfig (for Linux/Unix, i nter f ace configuration) are among the most useful tools for debugging network issues.ipconfig can be used to show your current TCP/IP information, including your address, DNS server addresses, adapter (network interface card) type and so on. For example, if you want to find all this information about your host, simply enter the command “ipconfig /all” in the command line.Read more on “using ipconfig” at /kb/314850.Question 6: What is the IP address for your computer, and what is the local DNS server IP address?答:IP:192.168.1.143DNS: 210.32.32.10 210.32.32.11ipconfig is also very useful for managing the DNS information stored in your host. To improve the networking performance, a host can cache DNS records it recently obtained. To view these cached record s, you can use the command “ipconfig /displaydns”. Each entry shows the remaining Time to Live (TTL) in seconds. To clear the cache, enter the command “ipconfig /flushdns”. Flushing the DNS cache clears all entries and reloads the entries from the hosts fi le. Task 3 DNS Protocol Analysis with WireSharkNow it is time to capture DNS protocol data and do the analysis with WireShark. Follow the steps to capture the DNS packets:∙close all other Internet applications to reduce the captured data∙start a web browser∙use ipconfig to empty the DNS cache in your computer∙start WireShark program, and enter the display filter “ip.addr==192.168.0.100 and dns”, where the IP address 192.168.0.100 should be the IP address for your computer.You find it in question 6.∙Start packet capture in WireShark∙Enter the url address to your web browser to view the page.∙Stop the packet capture.I got the following screenshot for this operation:Answer the following questions:Question 7:Locate the DNS query and response for resolving . Are they sent over UDP or TCP?UDPQuestion 8: What is the destination port for the DNS query message? What is the source port of DNS response message?Destination:210.32.32.10Source:192.168.1.143Question 9: To what IP address is the DNS query message sent? Use ipconfig to determine the IP address of your local DNS server. Are these two IP addresses the same?IP:210.32.32.10sameQuestion 10:Examine the DNS query message. What “Type” of DNS query is it? Does the query message contain any “answers”?(1) The “Type”of DNS query is A。

相关文档
最新文档