计算机网络实验2实验指导

上传人:飞*** 文档编号:8026454 上传时间:2017-09-25 格式:DOC 页数:8 大小:91.50KB
返回 下载 相关 举报
计算机网络实验2实验指导_第1页
第1页 / 共8页
计算机网络实验2实验指导_第2页
第2页 / 共8页
计算机网络实验2实验指导_第3页
第3页 / 共8页
计算机网络实验2实验指导_第4页
第4页 / 共8页
计算机网络实验2实验指导_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《计算机网络实验2实验指导》由会员分享,可在线阅读,更多相关《计算机网络实验2实验指导(8页珍藏版)》请在金锄头文库上搜索。

1、实验 3 在 PC 机上熟悉常用网络命令3.1 常用命令1、 ARP 功能:显示和修改 IP 地址与物理地址之间的转换表 格式:ARP -s inet_addr eth_addr if_addrARP -d inet_addr if_addrARP -a inet_addr -N if_addr参数介绍:-a 显示当前的 ARP 信息,可以指定网络地址-g 跟 -a 一样.-d 删除由 inet_addr 指定的主机.可以使用* 来删除所有主机.-s 添加主机,并将网络地址跟物理地址相对应,这一项是永久生效的。Inet_addr 网络地址eth_addr 物理地址.if_addr If pre

2、sent, this specifies the Internet address of theinterface whose address translation table should be modified.If not present, the first applicable interface will be used.例子:-a -s -a -d -aC:Documents and SettingsAdministratorarp -aInterface: 10.12.26.111 - 0x2Internet Address Physical Address Type10.1

3、2.26.1 00-18-b9-42-f7-4c dynamicC:Documents and SettingsAdministratorarp -a 10.12.26.111No ARP Entries FoundC:Documents and SettingsAdministratorarp -a 10.12.26.1Interface: 10.12.26.111 - 0x2Internet Address Physical Address Type10.12.26.1 00-18-b9-42-f7-4c dynamicC:Documents and SettingsAdministrat

4、or arp -s 157.55.85.212 00-aa-00-62-c6-09C:Documents and SettingsAdministratorarp -aInterface: 10.12.26.111 - 0x2Internet Address Physical Address Type10.12.26.1 00-18-b9-42-f7-4c dynamic157.55.85.212 00-aa-00-62-c6-09 static2、Ipconfig功能:该诊断命令显示所有当前的 TCP/IP 网络配置值。该命令在运行 DHCP 系统上的特殊用途,允许用户决定 DHCP 配置的

5、 TCP/IP 配置值。格式:ipconfig /? | /all | /release adapter | /renew adapter | /flushdns | /registerdns| /showclassid adapter| /setclassid adapter classidtoset /all 产生完整显示。在没有该开关的情况下 ipconfig 只显示 IP 地址、子网掩码和每个网卡的默认网关值。例子:C:Documents and SettingsAdministratoripconfigWindows IP ConfigurationEthernet adapter

6、本地连接 2:Connection-specific DNS Suffix . :IP Address. . . . . . . . . . . . : 10.12.26.111Subnet Mask . . . . . . . . . . . : 255.255.255.0Default Gateway . . . . . . . . . : 10.12.26.1C:Documents and SettingsAdministratoripconfig/displaydnsWindows IP Configuration1.0.0.127.in-addr.arpaRecord Name .

7、. . . . : 1.0.0.127.in-addr.arpa.Record Type . . . . . : 12Time To Live . . . . : 601083Data Length . . . . . : 4Section . . . . . . . : AnswerPTR Record . . . . . : localhostRecord Type . . . . . : 1Time To Live . . . . : 601083Data Length . . . . . : 4Section . . . . . . . : AnswerA (Host) Record

8、. . . : 127.0.0.1C:Documents and SettingsAdministratoripconfig/flushdnsWindows IP ConfigurationSuccessfully flushed the DNS Resolver Cache.3、g.exe功能:验证与远程计算机的连接。该命令只有在安装了 TCP/IP 协议后才可以使用。格式:g -t -a -n count -l length -f -i ttl -v tos -r count -s count -j computer-list | -k computer-list -w timeout d

9、estination-list参数-t g 指定的计算机直到中断,结束连接用 Ctrl+C-a 将地址解析为计算机名。-n count 发送 count 指定的 ECHO 数据包数。默认值为 4。-l length 发送包含由 length 指定的数据量的 ECHO 数据包。默认为 32 字节;最大值是 65,527。-f 在数据包中发送“不要分段”标志。数据包就不会被路由上的网关分段。-i ttl 将“生存时间”字段设置为 ttl 指定的值。-v tos 将“服务类型”字段设置为 tos 指定的值。-r count 在“记录路由”字段中记录传出和返回数据包的路由。count 可以指定最少 1

10、 台,最多 9 台计算机。-s count 指定 count 指定的跃点数的时间戳。-j computer-list 利用 computer-list 指定的计算机列表路由数据包。连续计算机可以被中间网关分隔(路由稀疏源)IP 允许的最大数量为 9。-k computer-list 利用 computer-list 指定的计算机列表路由数据包。连续计算机不能被中间网关分隔(路由严格源)IP 允许的最大数量为 9。-w timeout 指定超时间隔,单位为毫秒。destination-list 指定要 g 的远程计算机 。较一般的用法是 g t 练:g 发送 6 个数据包(默认是 4 个) ,发

11、送数据包大小是 256(默认是 32)C:Documents and SettingsAdministratorg ging 220.189.211.184 with 32 bytes of data:Reply from 220.189.211.184: bytes=32 time=1ms TTL=61Reply from 220.189.211.184: bytes=32 time=1ms TTL=61Reply from 220.189.211.184: bytes=32 time=1ms TTL=61Reply from 220.189.211.184: bytes=32 time=

12、1ms TTL=61g statistics for 220.189.211.184:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds:Minimum = 1ms, Maximum = 1ms, Average = 1ms4、ftp 该命令只有在安装了 TCP/IP 协议之后才可用。Ftp 是一种服务,一旦启动,将创建在其中可以使用 ftp 命令的子环境,通过键入 quit 子命令可以从子环境返回到 Windows 2000 命令提示符。当 ftp

13、子环境运行时,它由 ftp 命令提示符代表。ftp -v -n -i -d -g -s:filename -a -w:windowsize computer参数:-v 禁止显示远程服务器响应。-n 禁止自动登录到初始连接。-I 多个文件传送时关闭交互提示。-d 启用调试、显示在客户端和服务器之间传递的所有 ftp 命令。-g 禁用文件名组,它允许在本地文件和路径名中使用通配符字符(* 和 ?) 。 (请参阅联机“命令参考”中的 glob 命令。 )-s: filename 指定包含 ftp 命令的文本文件;当 ftp 启动后,这些命令将自动运行。该参数中不允许有空格。使用该开关而不是重定向 (

14、)。-a 在捆绑数据连接时使用任何本地接口。-w:windowsize 替代默认大小为 4096 的传送缓冲区。Computer 指定要连接到远程计算机的计算机名或 IP 地址。如果指定,计算机必须是行的最后一个参数。下面是一些常用命令:!: 从 ftp 子系统退出到系统外壳?:显示 ftp 说明,跟 help 一样append: 添加文件,格式为:append 本地文件 远程文件cd: 更换远程目录lcd: 更换本地目录,若无参数,将显示当前目录open:与指定的 ftp 服务器连接 open computer portclose:结束与远程服务器的 FTP 会话并返回命令解释程序bye:结

15、束与远程计算机的 FTP 会话并退出 ftpdir: 结束与远程计算机的 FTP 会话并退出 ftpget 和 recv:使用当前文件转换类型将远程文件复制到本地计算机 get remote-file local-filesend 和 put:上传文件:send local-file remote-file其它命令请参考帮助文件。练:ftp open 10.12.31.3 下载上传文件C:Documents and SettingsAdministratorftpftp open 10.12.31.3Connected to 10.12.31.3.220 Serv-U FTP Server v6.4 for WinSock ready.User (10.12.31.3:(none): jf331 User name okay, need password.Password:230 User logged in, proceed.ftp

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 企业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号