计算机网络基础实验报告实验一常用网络命令的使用
实验目的:
1、掌握几种常用网络命令,并能解释其显示内容的含义;
2、理解各命令的含义,并能使用这些命令检测常见网络故障;
实验要求:
1、按实验内容要求执行各命令,认真记录实验结果;
2、对实验结果能解释其意义。实验内容:
1、运行IPconfig命令
运行该命令,记录主机名、DNS服务器、适配器信息、主机物理地址、IP地址、子网掩码以及默认网关等。
实验结果:
C:\Documents and Settings\cydn>Ipconfig
Windows IP Configuration
: Ethernet adapter 本地连接
dns后缀//特定连接的. : Connection-specific DNS Suffix
:10.4.24.11
// IP地址IP Address. . . . . . . . . . . . : 10.4.24.11
子网掩码:255.255.255.192 // Subnet Mask . . . . . . . . . . . : 255.255.255.192
:10.4.24.62 默认网关// Default Gateway . . . . . . . . . : 10.4.24.62
地址的配置信息显示所有的有关IPC:\Documents and Settings\cydn>ipconfig/all
//网络配置窗口Windows IP Configuration
:1s11 //主机名Host Name . . . . . . . . . . . . : 1s11
DNS 后缀//主Primary Dns Suffix . . . . . . . :
未知//节点类型: Node Type . . . . . . . . . . . . : Unknown
否//IP 路由启用: IP Routing Enabled. . . . . . . . : No
否//WINS 代理启用: WINS Proxy Enabled. . . . . . . . : No
以太网适配器// Ethernet adapter 本地连接:
后缀特定连接的dns // Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Marvell Yukon 88E8056 PCI-E Gigabi
PCI - E千兆种类:马维尔育空河88e8056//
以太网控制器// Ethernet Controller
物理地址// Physical Address. . . . . . . . . : 00-21-97-2F-F0-06
Dhcp Enabled. . . . . . . . . . . : No //动态主机配置协议启用:否
IP Address. . . . . . . . . . . . : 10.4.24.11 //IP地址:10.4.24.11
Subnet Mask . . . . . . . . . . . : 255.255.255.192 //子网掩码:255.255.255.192
Default Gateway . . . . . . . . . : 10.4.24.62 // 默认网关:10.4.24.62
DNS Servers . . . . . . . . . . . : 10.1.0.40 //DNS 服务器:10.1.0.40
2、运行ping命令
运行该命令,分别ping 127.0.0.1,本机IP,网关IP,远程IP,本机名,远程域名。并使用一些常用参数,记录结果,解释其含义。
C:\Documents and Settings\cydn>ping 127.0.0.1
Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
解释为:
C:\Windows\System32>ping 127.0.0.1
正在Ping 127.0.0.1 具有32 字节的数据:
来自127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
来自127.0.0.1 的回复: 字节=32 时间<1ms TTL=128
127.0.0.1 的Ping 统计信息:
数据包: 已发送= 4,已接收= 4,丢失= 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短= 0ms,最长= 0ms,平均= 0ms
Ping 本机IP 这个命令被送到你计算机所配置的IP地址,你的计算机始终都应该对该ping命令作出应答,如果没有,则表示本地配置或安装存在问题。
C:\Documents and Settings\cydn>ping 10.4.24.11
Pinging 10.4.24.11 with 32 bytes of data:
Reply from 10.4.24.11: bytes=32 time<1ms TTL=128
Reply from 10.4.24.11: bytes=32 time<1ms TTL=128
Reply from 10.4.24.11: bytes=32 time<1ms TTL=128
Reply from 10.4.24.11: bytes=32 time<1ms TTL=128
Ping statistics for 10.4.24.11:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
解释为:
C:\Windows\System32>ping 10.4.24.11:
正在Ping 10.4.24.11: 具有32 字节的数据:
来自10.4.24.11: 的回复: 字节=32 时间<1ms TTL=128
来自10.4.24.11: 的回复: 字节=32 时间<1ms TTL=128
来自10.4.24.11: 的回复: 字节=32 时间<1ms TTL=128
<1ms TTL=128
时间=32 字节: 的回复10.4.24.11: 来自
10.4.24.11: 的Ping 统计信息:
数据包: 已发送= 4,已接收= 4,丢失= 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短= 0ms,最长= 0ms,平均= 0ms
3、运行netstat命令
运行该命令,使用其一些常用参数,记录实验结果,解释其含义。
C:\Windows\System32>netstat -A 117.81.160.156
活动连接
协议本地地址外部地址状态
TCP 0.0.0.0:21 jqq315:0 LISTENING
TCP 0.0.0.0:80 jqq315:0 LISTENING
TCP 0.0.0.0:135 jqq315:0 LISTENING
TCP 0.0.0.0:445 jqq315:0 LISTENING
TCP 0.0.0.0:912 jqq315:0 LISTENING
TCP 0.0.0.0:49152 jqq315:0 LISTENING
TCP 0.0.0.0:49153 jqq315:0 LISTENING
TCP 0.0.0.0:49154 jqq315:0 LISTENING
TCP 0.0.0.0:49155 jqq315:0 LISTENING
TCP 0.0.0.0:49156 jqq315:0 LISTENING
TCP 10.4.23.62:139 jqq315:0 LISTENING
TCP 127.0.0.1:49180 jqq315:0 LISTENING
TCP 192.168.150.1:139 jqq315:0 LISTENING
TCP 192.168.242.1:139 jqq315:0 LISTENING
TCP [::]:21 jqq315:0 LISTENING
TCP [::]:80 jqq315:0 LISTENING
4、运行arp命令
运行该命令,并通过使用其参数添加、删除高速缓存中的静态项目。记录实验结果,理解arp协议的工作原理。
C:\Documents and Settings\cydn>arp -a
Interface: 10.4.24.11 --- 0x2
Internet Address Physical Address Type
10.4.24.38 00-21-97-40-7d-a5 dynamic
10.4.24.62 00-0f-e2-2e-94-18 dynamic
解释为:
C:\Windows\System32>arp -a
:10.4.24.11 --- 0x2
接口.
类型Internet 地址物理地址
动态00-21-97-40-7d-a5 10.4.24.38
动态00-0f-e2-2e-94-18 10.4.24.62
命令、运行route5 命令结果相比较。命令,记录、解释结果。并与netstat –r运行route printC:\Documents and Settings\cydn>route print
================================================================== Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 21 97 2f f0 06 ...... Marvell Yukon 88E8056 PCI-E Gigabit Ethernet Con
数据包计划程序微型端口troller -
==================================================================
==================================================================
Active Routes:
Metric Interface Gateway Netmask Network Destination
20 10.4.24.11 0.0.0.0 10.4.24.62 0.0.0.0
20 10.4.24.11 255.255.255.192 10.4.24.11 10.4.24.0
20 127.0.0.1 127.0.0.1 10.4.24.11 255.255.255.255
20 10.4.24.11 10.4.24.11 10.255.255.255 255.255.255.255
1 127.0.0.1 127.0.0.1 127.0.0.0 255.0.0.0
20 10.4.24.11 224.0.0.0 240.0.0.0 10.4.24.11
1 10.4.24.11 255.255.255.255 255.255.255.255 10.4.24.11
10.4.24.62
Default Gateway:
================================================================== Persistent Routes:
None
解释为:C:\Windows\System32>route print
================================================================== 接口列表
微软网络环回接口0x1 ...........................0x2 ...00 21 97 2f f0 06 ...... 马维尔育空88e8056PCI - E千兆以太网控制
troller -数据包计划程序微型端口
================================================================== ================================================================== 活动路由:
网络目标网络掩码网关接口跃点数
0.0.0.0 0.0.0.0 10.4.24.62 10.4.24.11 20
10.4.24.0 255.255.255.192 10.4.24.11 10.4.24.11 20
20
127.0.0.1 127.0.0.1 255.255.255.255 10.4.24.11
10.255.255.255 255.255.255.255 10.4.24.11 10.4.24.11 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
224.0.0.0 240.0.0.0 10.4.24.11 10.4.24.11 20 255.255.255.255 255.255.255.255 10.4.24.11 10.4.24.11 1
默认网关:10.4.24.62
================================================================= 永久路由:
无
此结果和netstat –r 运行结果一样。
6、运行net命令
运行net view命令,记录结果。
C:\Documents and Settings\cydn>net view
服务器名称注释
-------------------------------------------------------------------------------
\\1S1
\\1S11
\\1S2
\\1S23
\\1S24
\\1S25
\\1S3
\\1S4
\\1S5
\\1S8
\\2S1
\\2S10
\\2S11
\\2S12
\\2S13
\\2S14
\\2S15
\\2S16
\\2S17
\\2S18
\\2S19
\\2S2
\\2S20
\\2S21
\\2S22
\\2S23
\\2S24
\\2S25
\\2S3
\\2S4
\\2S5
\\2S6
\\2S7
\\2S8
\\2S9
\\ZJG122
命令成功完成。
实验二:Cisco IOS 及静态路由
实验目的:
1、熟悉实验环境,了解实验室的拓扑结构
2、掌握访问相关设备的方法,掌握如何管理Cisco设备。
3、掌握Cisco IOS基本命令。
4、掌握静态路由的配置方法。
5、掌握默认路由的配置方法和路由总结。
实验环境:
实验室路由网络环境如下图所示,每个小组有5台路由器,并通过”本地连接”与其它小组相连。
由于设备数量众多,为方便管理及维护,统一使用telnet的方式访问设备。访问指定的设备请使用:telnet + 服务器IP +指定端口号。
一、Cisco IOS
实验拓扑图: