实验1《常用网络命令使用》.docx

上传人:b****5 文档编号:8234532 上传时间:2023-01-30 格式:DOCX 页数:14 大小:285.50KB
下载 相关 举报
实验1《常用网络命令使用》.docx_第1页
第1页 / 共14页
实验1《常用网络命令使用》.docx_第2页
第2页 / 共14页
实验1《常用网络命令使用》.docx_第3页
第3页 / 共14页
实验1《常用网络命令使用》.docx_第4页
第4页 / 共14页
实验1《常用网络命令使用》.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

实验1《常用网络命令使用》.docx

《实验1《常用网络命令使用》.docx》由会员分享,可在线阅读,更多相关《实验1《常用网络命令使用》.docx(14页珍藏版)》请在冰豆网上搜索。

实验1《常用网络命令使用》.docx

实验1《常用网络命令使用》

五、实验步骤

1、记录本机的主机名,MAC地址,IP地址,DNS,网关等信息。

命令描述:

ipconfig–all

执行结果:

主机名............:

lenovo-73

主Dns后缀.......:

节点类型............:

Unknown

IP路由已启动.......:

No

WINS代理已启动........:

No

Ethernetadapter本地连接:

连接特定的DNS后缀......:

描述...........:

MarvellYukon88E8056PCI-EGigabitEthernetController

物理地址.........:

00-21-97-4E-92-64

DHCP已启用...........:

No

IP地址............:

192.168.215.73

子网掩码...........:

255.255.255.0

默认网关.........:

192.168.215.254

DNS服务器...........:

8.8.8.8

218.193.32.8

2、利用ping工具检测网络连通性

1)当一台计算机不能和网络中其他计算机进行通信时,可以按照如下步骤进行检测。

在DOS窗口下输入“ping127.0.0.1”命令,此命令用于检查本机的TCP/IP协议安装是否正确,注:

凡是以127开头的IP地址都代表本机。

命令描述:

ping127.0.0.1

执行结果:

_______________________________________________________

Pinging127.0.0.1with32bytesofdata:

Replyfrom127.0.0.1:

bytes=32time<1msTTL=128

Replyfrom127.0.0.1:

bytes=32time<1msTTL=128

Replyfrom127.0.0.1:

bytes=32time<1msTTL=128

Replyfrom127.0.0.1:

bytes=32time<1msTTL=128

Pingstatisticsfor127.0.0.1:

Packets:

Sent=4,Received=4,Lost=0(0%l

Approximateroundtriptimesinmilli-seconds:

Minimum=0ms,Maximum=0ms,Average=0ms

2)在DOS窗口下输入“ping本机IP地址”命令,此命令用于检查本机的服务和网络适配器的绑定是否正确。

注:

这里的服务一般是指“Microsoft网络客户端”和“Microsoft网络的文件和打印机共享”。

命令描述:

ping192.168.215.73

执行结果:

_______________________________________________________

Pinging192.168.215.73with32bytesofdata:

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Pingstatisticsfor192.168.215.73:

Packets:

Sent=4,Received=4,Lost=0(0%loss),

Approximateroundtriptimesinmilli-seconds:

Minimum=0ms,Maximum=0ms,Average=0ms

3)接下来在DOS窗口下输入“ping网关IP地址”命令,此命令用来检查本机和网关的连接是否正常。

命令描述:

ping192.168.215.254

执行结果:

_______________________________________________________

Pinging192.168.215.254with32bytesofdata:

Replyfrom192.168.215.254:

bytes=32time=1msTTL=255

Replyfrom192.168.215.254:

bytes=32time<1msTTL=255

Replyfrom192.168.215.254:

bytes=32time<1msTTL=255

Replyfrom192.168.215.254:

bytes=32time<1msTTL=255

Pingstatisticsfor192.168.215.254:

Packets:

Sent=4,Received=4,Lost=0(0%loss),

Approximateroundtriptimesinmilli-seconds:

Minimum=0ms,Maximum=1ms,Average=0ms

4)最后在DOS窗口下输入“ping远程主机IP地址”命令,此命令用来检查网关能否将数据包转发出去。

命令描述:

ping

执行结果:

_______________________________________________________

Pinging[220.181.111.147]with32bytesofdata:

Replyfrom220.181.111.147:

bytes=32time=46msTTL=53

Replyfrom220.181.111.147:

bytes=32time=47msTTL=53

Replyfrom220.181.111.147:

bytes=32time=46msTTL=53

Replyfrom220.181.111.147:

bytes=32time=46msTTL=53

Pingstatisticsfor220.181.111.147:

Packets:

Sent=4,Received=4,Lost=0(0%loss),

Approximateroundtriptimesinmilli-seconds:

Minimum=46ms,Maximum=47ms,Average=46ms

5)利用ping命令还可以来检测其他的一些配置是否正确。

在DOS窗口下输入“ping主机名”命令,此命令用来检测DNS服务器能否进行主机名称解析。

命令描述:

pinglenovo-73

执行结果:

_______________________________________________________

Pinginglenovo-73[192.168.215.73]with32bytesofdata:

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Pingstatisticsfor192.168.215.73:

Packets:

Sent=4,Received=4,Lost=0(0%loss),

Approximateroundtriptimesinmilli-seconds:

Minimum=0ms,Maximum=0ms,Average=0ms

6)在DOS窗口下输入“ping远程主机IP地址”命令,如果显示的信息为“Destinationhostunreachable”(目标主机不可达),说明这台计算机没有配置网关地址。

运行“ipconfig/all”命令进行查看,网关地址为空。

(若(4)可以,则不会出现此种情况)

7)在配置网关地址后再次运行同样命令,信息变为“Requesttimedout”(请求时间超时)。

此信息表示网关已经接到请求,只是找不到IP地址为远程主机的这台计算机。

命令描述:

ping192.168.1.108

执行结果:

_______________________________________________________

Pinging192.168.1.108with32bytesofdata:

Requesttimedout.

Requesttimedout.

Requesttimedout.

Requesttimedout.

Pingstatisticsfor192.168.1.108:

Packets:

Sent=4,Received=0,Lost=4(100%loss),

Ping命令的其它用法

8)连续发送ping探测报文:

如ping-t210.41.109.52(这个地址需要根据具体的实验环境来搭配)

Ctrl+Break查看统计信息,Ctrl+C结束命令

命令描述:

ping-t

执行结果:

_______________________________________________________

Pinging[220.181.111.147]with32bytesofdata:

Replyfrom220.181.111.147:

bytes=32time=46msTTL=53

Replyfrom220.181.111.147:

bytes=32time=46msTTL=53

Replyfrom220.181.111.147:

bytes=32time=46msTTL=53

Replyfrom220.181.111.147:

bytes=32time=47msTTL=53

Replyfrom220.181.111.147:

bytes=32time=47msTTL=53

Replyfrom220.181.111.147:

bytes=32time=47msTTL=53

Replyfrom220.181.111.147:

bytes=32time=47msTTL=53

Replyfrom220.181.111.147:

bytes=32time=47msTTL=53

Pingstatisticsfor220.181.111.147:

Packets:

Sent=8,Received=8,Lost=0(0%loss),

Approximateroundtriptimesinmilli-seconds:

Minimum=46ms,Maximum=47ms,Average=46ms

Control-C

^C

9)自选数据长度的ping探测报文:

ping目的主机IP地址-lsize

命令描述:

ping-l1450

执行结果:

_______________________________________________________

Pinging[220.181.111.147]with1450bytesofdata:

Replyfrom220.181.111.147:

bytes=1450time=47msTTL=53

Replyfrom220.181.111.147:

bytes=1450time=47msTTL=53

Replyfrom220.181.111.147:

bytes=1450time=48msTTL=53

Replyfrom220.181.111.147:

bytes=1450time=47msTTL=53

Pingstatisticsfor220.181.111.147:

Packets:

Sent=4,Received=4,Lost=0(0%loss),

Approximateroundtriptimesinmilli-seconds:

Minimum=47ms,Maximum=48ms,Average=47ms

10)不允许对ping探测报分片:

ping目的主机IP地址-f

命令描述:

ping-f-l2000192.168.215.73

执行结果:

_______________________________________________________

Pinging192.168.215.73with2000bytesofdata:

PacketneedstobefragmentedbutDFset.

PacketneedstobefragmentedbutDFset.

PacketneedstobefragmentedbutDFset.

PacketneedstobefragmentedbutDFset.

Pingstatisticsfor192.168.215.73:

Packets:

Sent=4,Received=0,Lost=4(100%loss),

11)修改“ping”命令的请求超时时间:

ping目的主机IP地址-wtime

指定等待每个回送应答的超时时间,单位为毫秒,默认值为1000毫秒

命令描述:

ping-w6000192.168.215.73

执行结果:

_______________________________________________________

Pinging192.168.215.73with32bytesofdata:

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Replyfrom192.168.215.73:

bytes=32time<1msTTL=128

Pingstatisticsfor192.168.215.73:

Packets:

Sent=4,Received=4,Lost=0(0%loss),

Approximateroundtriptimesinmilli-seconds:

Minimum=0ms,Maximum=0ms,Average=0ms

3、利用Arp工具检验MAC地址解析

1)输入“arp–a”命令,可以查看本机的arp缓存内容

命令描述:

arp-a192.168.215.73

执行结果:

_______________________________________________________

NoARPEntriesFound

2)如本机的ARP表是空的,则ping本组相邻机的IP地址(要能PING通),再查看本机的arp缓存内容,此时是否还是空的?

利用“ping”命令将一个站点的IP地址与MAC地址的映射关系加入ARP表

命令描述:

ping192.168.215.105

执行结果:

Pinging192.168.215.105with32bytesofdata:

Replyfrom192.168.215.105:

bytes=32time=1msTTL=128

Replyfrom192.168.215.105:

bytes=32time<1msTTL=128

Replyfrom192.168.215.105:

bytes=32time<1msTTL=128

Replyfrom192.168.215.105:

bytes=32time<1msTTL=128

Pingstatisticsfor192.168.215.105:

Packets:

Sent=4,Received=4,Lost=0(0%loss),

Approximateroundtriptimesinmilli-seconds:

Minimum=0ms,Maximum=1ms,Average=0ms

C:

\DocumentsandSettings\Administrator>arp-a

Interface:

192.168.215.73---0x10003

InternetAddressPhysicalAddressType

192.168.215.10500-21-97-4e-95-c5dynamic

 

3)将相邻机在本机ARP表中的表项删除。

arp-dip地址(删除由ip地址指定的项)

利用“arp-d”命令删除ARP表项

4)命令描述:

查看站点的IP地址与MAC地址的映射关系,加入ARP表。

arp-dip地址(删除由ip地址指定的项),使用将相邻机在本机ARP表中的表项删除。

能够人工删除一个项目。

_输入“arp–a”命令,可以查看本机的arp缓存内容

_________________________________________

执行结果:

_______________________________________________________

C:

\DocumentsandSettings\Administrator>arp-a

Interface:

192.168.215.73---0x10003

InternetAddressPhysicalAddressType

192.168.215.4500-21-97-48-4e-afdynamic

C:

\DocumentsandSettings\Administrator>arp-d192.168.215.105

C:

\DocumentsandSettings\Administrator>arp-a

Interface:

192.168.215.73---0x10003

InternetAddressPhysicalAddressType

192.168.215.4500-21-97-48-4e-afdynamic

C:

\DocumentsandSettings\Administrator>arp-d*

C:

\DocumentsandSettings\Administrator>arp-a

NoARPEntriesFound

5)给相邻机的IP添加一个静止的错误的MAC地址对应项,再PING相邻机,此时是否能PING通?

arp-sip地址MAC地址

在ARP缓存中添加项,将IP地址和物理地址关联。

例:

arp-s192.168.0.10000-d0-09-f0-33-71添加ip为192.168.0.100与其对应的MAC为00-d0-09-f0-33-71的表项

命令描述:

arp-s192.168.215.10500-21-97-4e-95-c5

_____________________________________________

执行结果:

_______________________________________________________

C:

\DocumentsandSettings\Administrator>arp-a

Interface:

192.168.215.73---0x10003

InternetAddressPhysicalAddressType

192.168.215.10500-21-97-4e-95-c5dynamic

C:

\DocumentsandSettings\Administrator>arp-s192.168.215.10500-21-97-4e-95-c

5

C:

\DocumentsandSettings\Administrator>arp-a

Interface:

192.168.215.73---0x10003

InternetAddressPhysicalAddressType

192.168.215.10500-21-97-4e-95-c5static

C:

\DocumentsandSettings\Administrator>ping192.168.215.105

Pinging192.168.215.105with32bytesofdata:

Replyfrom192.168.215.105:

bytes=32time<1msTTL=128

Replyfrom192.168.215.105:

bytes=32time<1msTTL=128

Replyfrom192.168.215.105:

bytes=32time<1msTTL=128

Replyfrom192.168.215.105:

bytes=32time<1msTTL=128

Pingstatisticsfor192.168.215.105:

Packets

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 表格模板 > 合同协议

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1