当前位置:文档之家› 网络常用测试工具的应用实验报告

网络常用测试工具的应用实验报告

常用网络工具的应用一、实验目的:1.了解系统网络命令及其所代表的含义,以及所能对网络进行的操作。

2.通过网络命令了解运行系统网络状态,并利用网络命令对网络进行简单的操作。

二、二、实验仪器设备及器材Window XP 局域网三、实验相关理论1.PING命令是检查网络连接状况的网络工具,可以用它来检测数据包到达目的主机的可能性。

2.Win98:winipcfg或Win2000以上:Ipconfig/all命令显示DNS服务器地址、IP地址、子网掩码地址、默认网关的IP地址。

3.Netstat是显示网络连接和有关协议的统计信息的工具。

Netstat主要用于:网络接口的状况;程序表的状况;协议类的统计信息的显示三个方面。

4.ARP:地址解析协议命令,用于将IP地址解析为MAC地址。

四、实验要求:验前认真预习TCP/IP协议内容,尤其应认真理解WINDOWS网络相关原理;在进行实验时,应注意爱护机器,按照试验指导书的要求的内容和步骤完成实验,尤其应注意认真观察试验结果,做好记录;实验完成后应认真撰写实验报告。

五、实验原理六、实验步骤1、最常用的网络测试工具-PING.EXE(1)判断本地的TCP/IP协议栈是否已安装成功C:\Documents and Settings\student>ping 127.0.0.1Pinging 127.0.0.1 with 32 bytes of data:用32个数据字节验证本机与计算机的连接Reply from 127.0.0.1: bytes=32 time<10ms TTL=128Reply from 127.0.0.1: bytes=32 time<10ms TTL=128Reply from 127.0.0.1: bytes=32 time<10ms TTL=128Reply from 127.0.0.1: bytes=32 time<10ms TTL=128返回本机:字节为32个时间小于10 毫秒生存时间为128 Ping statistics for 127.0.0.1:统计本机的数据:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),包数:发送为4,接收为4,丢失为0(丢失率为0%)Approximate round trip times in milli-seconds:大概回路行程时间在毫秒Minimum = 0ms, Maximum = 0ms, Average = 0ms最小为0毫秒,最大为0毫秒,平均为0毫秒(2)判断能否到达指定IP地址的远程计算机C:\Documents and Settings\student>ping 10.64.42.1Pinging 10.64.42.1 with 32 bytes of data:用32个数据字节验证网关与计算机的连接Reply from 10.64.42.1: bytes=32 time<10ms TTL=64返回网关:字节为32个时间小于10 毫秒生存时间为64 Reply from 10.64.42.1: bytes=32 time<10ms TTL=64Reply from 10.64.42.1: bytes=32 time=34ms TTL=64Reply from 10.64.42.1: bytes=32 time<10ms TTL=64Ping statistics for 10.64.42.1:统计网关的数据:用32个数据字节验证网络与计算机的连接Reply from 127.0.0.1: bytes=32 time<10ms TTL=128Reply from 127.0.0.1: bytes=32 time<10ms TTL=128Reply from 127.0.0.1: bytes=32 time<10ms TTL=128Reply from 127.0.0.1: bytes=32 time<10ms TTL=128返回网络:字节为32 时间小于10毫秒生存时间为128 Ping statistics for 127.0.0.1:统计腾讯网的数据:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),包数:发送为4,收回为4,丢失为0(丢失率为0%)Approximate round trip times in milli-seconds:大概循环时间在毫秒:Minimum = 0ms, Maximum = 0ms, Average = 0ms最小值01毫秒,最大值为0毫秒,平均值为0毫秒(6)Ping指定的IP地址30次C:\Documents and Settings\student>ping -n 30 202.205.107.58 Pinging 202.205.107.58 with 32 bytes of data:用32个数据字节验证网络与计算机的连接Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126 Reply from 202.205.107.58: bytes=32 time<10ms TTL=126Reply from 202.205.107.58: bytes=32 time<10ms TTL=126Reply from 202.205.107.58: bytes=32 time<10ms TTL=126Reply from 202.205.107.58: bytes=32 time<10ms TTL=126Reply from 202.205.107.58: bytes=32 time<10ms TTL=126返回网络:字节为32 时间小于10毫秒生存时间为126Ping statistics for 202.205.107.58:统计网络的数据:Packets: Sent = 30, Received = 30, Lost = 0 (0% loss),包数:发送为30,收回为30,丢失为0(丢失率为0%)Approximate round trip times in milli-seconds:大概循环时间在毫秒:Minimum = 0ms, Maximum = 0ms, Average = 0ms最小值为10毫秒,最大值为0毫秒,平均值为0毫秒(7)用400字节长的包Ping指定的IP地址C:\Documents and Settings\student>ping -l 400 202.205.107.10Pinging 202.205.107.10 with 400 bytes of data:用400个数据字节验证网络与计算机的连接Reply from 202.205.107.10: bytes=400 time<10ms TTL=62Reply from 202.205.107.10: bytes=400 time<10ms TTL=62Reply from 202.205.107.10: bytes=400 time<10ms TTL=62Reply from 202.205.107.10: bytes=400 time<10ms TTL=62返回网络:字节为400 时间小于10毫秒生存时间为62Ping statistics for 202.205.107.10:统计网络的数据:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),包数:发送为4,收回为4,丢失为0(丢失率为0%)Approximate round trip times in milli-seconds:大概循环时间在毫秒:Minimum = 0ms, Maximum = 0ms, Average = 0ms最小值为0毫秒,最大值为0毫秒,平均值为0毫秒2、网络配置查看程序-IPCONFIG.EXE(1)查看所有配置信息:Winipcfg 或Ipconfig /allC:\Documents and Settings\Administrator>Ipconfig/allWindows IP ConfigurationHost Name . . . . . . . . . . . . : r5-045Primary Dns Suffix . . . . . . . :Node Type . . . . . . . . . . . . : UnknownIP Routing Enabled. . . . . . . . : NoWINS Proxy Enabled. . . . . . . . : NoEthernet adapter 本地连接:Connection-specific DNS Suffix . :Description . . . . . . . . . . . : Realtek RTL8139 Family PCI Fast Ethe rnet NICPhysical Address. . . . . . . . . : 00-E0-4C-4C-A9-DBDhcp Enabled. . . . . . . . . . . : NoIP Address. . . . . . . . . . . . : 10.64.5.45Subnet Mask . . . . . . . . . . . : 255.255.255.0Default Gateway . . . . . . . . . : 10.64.5.254DNS Servers . . . . . . . . . . . : 202.205.107.103、网络连接统计工具-NETSTAT.EXE(1)显示所有连接C:\Documents and Settings\Administrator>netstat -aActive ConnectionsProto Local Address Foreign Address StateTCP r5-045:epmap r5-045:0 LISTENING TCP r5-045:microsoft-ds r5-045:0 LISTENING TCP r5-045:1161 r5-045:0 LISTENING TCP r5-045:8177 r5-045:0 LISTENING TCP r5-045:10019 r5-045:0 LISTENING TCP r5-045:netbios-ssn r5-045:0 LISTENING TCP r5-045:1028 10.64.7.199:10018 ESTABLISHED TCP r5-045:1045 r5-045:10019 ESTABLISHED TCP r5-045:1681 221.7.91.31:http SYN_SENT TCP r5-045:1682 10.64.7.122:7211 SYN_SENT TCP r5-045:10019 r5-045:1027 CLOSE_W AIT TCP r5-045:10019 r5-045:1045 ESTABLISHED TCP r5-045:1031 r5-045:0 LISTENING UDP r5-045:microsoft-ds *:*UDP r5-045:isakmp *:*UDP r5-045:ms-sql-m *:*UDP r5-045:4500 *:*UDP r5-045:5412 *:*UDP r5-045:5999 *:*UDP r5-045:6000 *:*UDP r5-045:6002 *:*UDP r5-045:ntp *:*UDP r5-045:netbios-ns *:*UDP r5-045:netbios-dgm *:*UDP r5-045:1900 *:*UDP r5-045:ntp *:*UDP r5-045:1099 *:*UDP r5-045:1900 *:*(2)显示所有协议的统计信息C:\Documents and Settings\Administrator>netstat -sIPv4 StatisticsPackets Received = 142692Received Header Errors = 0Received Address Errors = 94Datagrams Forwarded = 0 Unknown Protocols Received = 0 Received Packets Discarded = 21591 Received Packets Delivered = 121098 Output Requests = 137681 Routing Discards = 0 Discarded Output Packets = 12 Output Packet No Route = 0 Reassembly Required = 0 Reassembly Successful = 0 Reassembly Failures = 0 Datagrams Successfully Fragmented = 0 Datagrams Failing Fragmentation = 0 Fragments Created = 0 ICMPv4 StatisticsReceived Sent Messages 805 811 Errors 0 0 Destination Unreachable 0 6Time Exceeded 0 0 Parameter Problems 0 0 Source Quenches 0 0 Redirects 0 0 Echos 758 47 Echo Replies 47 758 Timestamps 0 0 Timestamp Replies 0 0 Address Masks 0 0 Address Mask Replies 0 0TCP Statistics for IPv4Active Opens = 17741 Passive Opens = 12445 Failed Connection Attempts = 13063 Reset Connections = 171 Current Connections = 4 Segments Received = 110285 Segments Sent = 120741 Segments Retransmitted = 9516 UDP Statistics for IPv4Datagrams Received = 10002No Ports = 59Receive Errors = 0Datagrams Sent = 66084、操纵网络路由表的工具-ROUTE.EXE(1)显示全部路由信息:C:\Documents and Settings\Administrator>route print====================================================================== =====Interface List0x1 ........................... MS TCP Loopback interface0x2 ...00 e0 4c 4c a9 db ...... Realtek RTL8139 Family PCI Fast Ethernet NIC -数据包计划程序微型端口====================================================================== =========================================================================== =====Active Routes:Network Destination Netmask Gateway Interface Metric0.0.0.0 0.0.0.0 10.64.5.254 10.64.5.45 2010.64.5.0 255.255.255.0 10.64.5.45 10.64.5.45 2010.64.5.45 255.255.255.255 127.0.0.1 127.0.0.1 2010.255.255.255 255.255.255.255 10.64.5.45 10.64.5.45 20127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1224.0.0.0 240.0.0.0 10.64.5.45 10.64.5.45 20255.255.255.255 255.255.255.255 10.64.5.45 10.64.5.45 1Default Gateway: 10.64.5.254====================================================================== =====Persistent Routes:None(2)添加一个路由C:\Documents and Settings\Administrator>route ADD157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2Manipulates network routing tables.ROUTE [-f] [-p] [command [destination][MASK netmask] [gateway] [METRIC metric] [IF interface]-f Clears the routing tables of all gateway entries. If this isused in conjunction with one of the commands, the tables arecleared prior to running the command.-p When used with the ADD command, makes a route persistent acrossboots of the system. By default, routes are not preservedwhen the system is restarted. Ignored for all other commands,which always affect the appropriate persistent routes. Thisoption is not supported in Windows 95.command One of these:PRINT Prints a routeADD Adds a routeDELETE Deletes a routeCHANGE Modifies an existing routedestination Specifies the host.MASK Specifies that the next parameter is the 'netmask' value. netmask Specifies a subnet mask value for this route entry.If not specified, it defaults to 255.255.255.255.gateway Specifies gateway.interface the interface number for the specified route.METRIC specifies the metric, ie. cost for the destination.All symbolic names used for destination are looked up in the network databasefile NETWORKS. The symbolic names for gateway are looked up in the host name database file HOSTS.If the command is PRINT or DELETE. Destination or gateway can be a wildcard, (wildcard is specified as a star '*'), or the gateway argument may be omitted.If Dest contains a * or ?, it is treated as a shell pattern, and onlymatching destination routes are printed. The '*' matches any string,and '?' matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*. Diagnostic Notes:Invalid MASK generates an error, that is when (DEST & MASK) != DEST.Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1The route addition failed: The specified mask parameter is invalid. (Destination & Mask) != Destination.Examples:> route PRINT> route ADD 157.0.0.0 MASK 255.0.0.0 157.55.80.1 METRIC 3 IF 2destination^ ^mask ^gateway metric^ ^Interface^ If IF is not given, it tries to find the best interface for a givengateway.> route PRINT> route PRINT 157* .... Only prints those matching 157*> route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2CHANGE is used to modify gateway and/or metric only.> route PRINT> route DELETE 157.0.0.0> route PRINT5、地址解析工具-ARP.EXE(1)显示当前ARP 项C:\Documents and Settings\Administrator>route DELETE 157.0.0.0The route specified was not found.C:\Documents and Settings\Administrator>arp -aInterface: 10.64.5.45 --- 0x2Internet Address Physical Address Type10.64.5.42 00-e0-4c-75-22-3a dynamic10.64.5.57 00-e0-4c-75-22-5d dynamic10.64.5.254 00-19-aa-e7-0a-46 dynamic(2)添加一个静态入口C:\Documents and Settings\Administrator>arp -s 157.55.85.212 00-aa-00-62-c6-09 C:\Documents and Settings\Administrator>arp -s 157.55.85.212 00-aa-20-a2-25-58- aeC:\Documents and Settings\Administrator>arp -aInterface: 10.64.5.45 --- 0x2Internet Address Physical Address Type10.64.5.42 00-e0-4c-75-22-3a dynamic10.64.5.57 00-e0-4c-75-22-5d dynamic10.64.5.71 00-e0-4c-4c-a9-e7 dynamic10.64.5.254 00-19-aa-e7-0a-46 dynamic157.55.85.212 00-aa-20-a2-25-58 static6、NetBios专用工具-NBTSTAT.EXE(1)根据IP地址查对方的机器名和MAC地址:C:\Documents and Settings\Administrator>nbtstat -A 202.205.107.58本地连接:Node IpAddress: [10.64.5.45] Scope Id: []NetBIOS Remote Machine Name TableName Type Status---------------------------------------------USER-WFXE76QAZE<00> UNIQUE RegisteredWORKGROUP <00> GROUP RegisteredUSER-WFXE76QAZE<20> UNIQUE RegisteredWORKGROUP <1E> GROUP RegisteredMAC Address = 00-11-25-3E-2D-F6(2)列出本地所有NetBios名:C:\Documents and Settings\Administrator>nbtstat -n本地连接:Node IpAddress: [10.64.5.45] Scope Id: []NetBIOS Local Name TableName Type Status---------------------------------------------R5-045 <00> UNIQUE RegisteredROOM5 <00> GROUP RegisteredR5-045 <20> UNIQUE RegisteredROOM5 <1E> GROUP Registered。

相关主题