数据链路层实验任务书
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
计算机网络实验一
任务一: Windows XP上的网络配置与操作实践
Windows XP网络配置
如何在Windows XP中配置IP地址
∙网络连接->属性->TCP/IP->属性
∙IP地址、子网掩码(subnet mask)、网关(default gateway)、DNS服务器
IPCONFIG
查看电脑IP地址、Mac地址等信息,需要在CMD命令窗口中执行。
USAGE:
ipconfig [/? | /all | /renew [adapter] | /release [adapter] |
/flushdns | /displaydns | /registerdns |
/showclassid adapter |
/setclassid adapter [classid] ]
Options:
/? Display this help message
/all Display full configuration information.
/release Release the IP address for the specified adapter. /renew Renew the IP address for the specified adapter.
/flushdns Purges the DNS Resolver cache.
/registerdns Refreshes all DHCP leases and re-registers DNS names
/displaydns Display the contents of the DNS Resolver Cache.
/showclassid Displays all the dhcp class IDs allowed for adapter.
/setclassid Modifies the dhcp class id.
说明:DOS命令的描述方法/格式
例子:
C:\>ipconfig
Windows IP Configuration
Ethernet adapter 本地连接 4:
Connection-specific DNS Suffix . : localdomain
IP Address. . . . . . . . . . . . : 192.168.176.128
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.176.2
>>>练习:在自己机器上运行此命令,尝试各种参数,解释结果。
PING
测试特定主机能否通过IP到达.
Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
[-r count] [-s count] [[-j host-list] | [-k host-list]] [-w timeout] target_name
Options:
-t Ping the specified host until stopped.
--to see statistics and continue - type Control-Break; --to stop - type Control-C.
-a Resolve addresses to hostnames.
-n count Number of echo requests to send.
-l size Send buffer size.
-f Set Don't Fragment flag in packet.
-i TTL Time To Live.
-v TOS Type Of Service.
-r count Record route for count hops.
-s count Timestamp for count hops.
-w timeout Timeout in milliseconds to wait for each reply.
在默认的情况下windows的ping发送的数据包大小为32byt,我们也可以用-l自己定义它的大小,但有一个大小的限制,就是最大只能发送65500byt,也许有人会问为什么要限制到65500byt,因为Windows系列的系统都有一个安全漏洞(也许还包括其他系统)就是当向对方一次发送的数据包大于或等于65532时,对方就很有可能宕机。
例子:
C:\>ping
Pinging [221.236.31.145] with 32 bytes of data: Reply from 221.236.31.145: bytes=32 time=12ms TTL=128
Reply from 221.236.31.145: bytes=32 time=13ms TTL=128
Reply from 221.236.31.145: bytes=32 time=10ms TTL=128
Reply from 221.236.31.145: bytes=32 time=11ms TTL=128
Ping statistics for 221.236.31.145:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 13ms, Average = 11ms
1. 大家同时ping本网网关IP地址, -t参数,查看返回时间
2. 用-l 65500 改数据包大小,看返回时间的变化
3. ping –i 30 测试连通性,将30改为1,3,5,7分别测试
>>>练习:在自己机器上运行此命令.目标地址分别为(但不限于):
∙127.0.0.1;
∙;
∙;
∙;
尝试各种参数,解释结果。
TRACERT
路由跟踪:显示分组数据包在IP网络经过的路由器的IP地址
Usage: tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name