??xml version="1.0" encoding="utf-8" standalone="yes"?> Windows|络命o行程? 使用 ipconfig /all 查看配置 注意
对于 Windows 95 ?Windows 98 的客hQ请使用 winipcfg 命o而不?ipconfi 例如Q如果计机配置?IP 地址与现有的 IP 地址重复Q则子网掩码昄?0.0.0 下面的范例是 ipconfig /all 命o输出Q该计算机配|成使用 DHCP 服务器动态配|? Windows 2000 IP Configuration
Node Type.. . . . . . . . : Hybrid Ethernet adapter Local Area Connection:
Host Name.. . . . . . . . : corp1.microsoft.com 使用 ipconfig /renew h配置 使用 ipconfig /renew Ӟ使用 DHCP 的计机上的所有网卡(除了那些手动配置? 也可以用带 /release 选项?ipconfig 命o立即释放L的当?DHCP 配置。有 注意
对于启用 DHCP ?Windows 95 ?Windows 98 客户Q请使用 winipcfg 命o?rel 昄或重|?DNS ~存? h已注册的 DNS 名称? 昄适配器的 DHCP cd ID? 讄适配器的 DHCP cd ID? 使用 Ping 试q接 通常最好先?Ping 命o验证本地计算机和|络L之间的\由是否存在,以及要连 ping IP_address
使用 Ping 时应该执行以下步骤:
Ping 环回地址验证是否在本地计机上安?TCP/IP 以及配置是否正确? Ping 本地计算机的 IP 地址验证是否正确地添加到|络? Ping 默认|关?IP 地址验证默认|关是否q行以及能否与本地网l上的本C机? Ping q程L?IP 地址验证能否通过路由器通讯? Ping 命o?Windows 套接字样式的名称解析计机名解析成 IP 地址Q所以如? 如果在Q何点上都无法成功C?PingQ请认Q?
安装和配|?TCP/IP 之后重新启动计算机? 下例说明如何?IP 地址 172.16.48.10 发送两?PingQ每个都?1,450 字节Q?
C:\>ping -n 2 -l 1450 172.16.48.10 Reply from 172.16.48.10:bytes=1450 time<10ms TTL=32 Ping statistics for 157.59.8.1: 使用 Arp 解决g地址问题 可以使用 arp 命o查看和修Ҏ地计机上的 ARP 表项。arp 命o对于查看 ARP ~? 详细信息Q请参阅查看“地址解析协议 (ARP)”~存和添加静?ARP ~存目?
使用 nbtstat 解决 NetBIOS 名称问题 Nbtstat 是解?NetBIOS 名称解析问题的有用工兗可以?nbtstat 命o删除? nbtstat -n 昄由服务器或重定向器之cȝE序在系l上本地注册的名U? Local name State In/out Remote Host Input Output C:\>netstat -e Received Sent C:\>netstat -a
Active Connections
Proto Local Address Foreign Address State C:\>netstat -s Packets Received = 5378528 ICMP Statistics TCP Statistics
Active Opens = 597 UDP Statistics
Datagrams Received = 4157136 使用 tracert 跟踪|络q接 Tracert 工作原理 Tracert 先发?TTL ?1 的回应数据包Qƈ在随后的每次发送过E将 TTL 递增 1Q? Tracert 命o按顺序打印出q回“ICMP 已超?#8221;消息的\径中的近端\由器接口列表 在下例中Q数据包必须通过两个路由器(10.0.0.1 ?192.168.0.1Q才能到达主? C:\>tracert 172.16.0.99 -d C:\>tracert 192.168.10.99
Tracing route to 192.168.10.99 over a maximum of 30 hops
1 10.0.0.1 reports:Destination net unreachable.
Trace complete.
Tracert 实用E序对于解决大网l问题非常有用,此时可以采取几条路径到达同一? Tracert 命o行选项 tracert [-d] [-h maximum_hops] [-j host-list] [-w timeout] target_name
选项 描述 详细信息Q请参阅使用 tracert 命o跟踪路径?
使用 pathping 试路由? 选项 名称 功能 默认的跃Ҏ?30Qƈ且超时前的默认等待时间是 3 U。默认时间是 250 毫秒Qƈ 以下是典型的 pathping 报告。跃点列表后所~辑的统计信息表明在每个独立路由? Tracing route to msw [7.54.1.196] Computing statistics for 125 seconds... Trace complete.
当运?pathping Ӟ在测试问题时首先查看路由的结果。此路径?tracert 命o所 最双的两?This Node/Link Lost/Sent=Pct ?Address 包含的信息最有用?72 寚w接显C的丢失率(在最双的栏中标Cؓ |Q表明沿路径转发丢失的数据包。该
q部分包括:
使用 ipconfig /renew h配置
使用 ipconfig 理 DNS ?DHCP cd ID
使用 Ping 试q接
使用 Arp 解决g地址问题
使用 nbtstat 解决 NetBIOS 名称问题
使用 netstat 昄q接l计
使用 tracert 跟踪|络q接
使用 pathping 试路由?
使用 ipconfig /all 查看配置
发现和解?TCP/IP |络问题Ӟ先检查出现问题的计算Z?TCP/IP 配置。可?
使用 ipconfig 命o获得L配置信息Q包?IP 地址、子|掩码和默认|关?
g 命o?
使用?/all 选项?ipconfig 命oӞ给出所有接口的详细配置报告Q包括Q?
已配|的串行端口。?ipconfig /allQ可以将命o输出重定向到某个文gQƈ?
输出_脓到其他文中。也可以用该输出认|络上每台计机?TCP/IP 配置Q或
者进一步调?TCP/IP |络问题?
.0?
TCP/IPQƈ使用 WINS ?DNS 服务器解析名U?
IP Routing Enabled.. . . . : No
WINS Proxy Enabled.. . . . : No
DNS Servers . . . . . . . : 10.1.0.200
Description. . . . . . . : 3Com 3C90x Ethernet Adapter
Physical Address. . . . . : 00-60-08-3E-46-07
DHCP Enabled.. . . . . . . : Yes
Autoconfiguration Enabled.: Yes
IP Address. . . . . . . . . : 192.168.0.112
Subnet Mask. . . . . . . . : 255.255.0.0
Default Gateway. . . . . . : 192.168.0.1
DHCP Server. . . . . . . . : 10.1.0.50
Primary WINS Server. . . . : 10.1.0.101
Secondary WINS Server. . . : 10.1.0.102
Lease Obtained.. . . . . . : Wednesday, September 02, 1998 10:32:13 AM
Lease Expires.. . . . . . : Friday, September 18, 1998 10:32:13 AM
如果 TCP/IP 配置没有问题Q下一步测试能够连接到 TCP/IP |络上的其他L?
解决 TCP/IP |络问题Ӟ先检查遇到问题的计算Z?TCP/IP 配置。如果计机
启用 DHCP q?DHCP 服务器获得配|,请?ipconfig /renew 命o开始刷新租
U?
适配器)都尽量连接到 DHCP 服务器,更新现有配置或者获得新配置?
?DHCP 和租用过E的详细信息Q请参阅客户机如何获得配|?
ease ?renew 选项Q而不?ipconfig /release ?ipconfig /renew 命oQ手?
释放或更新客L IP 配置U约?
使用 ipconfig 理 DNS ?DHCP cd ID
也可以?ipconfig 命oQ?
详细信息Q请参阅使用 ipconfig 查看或重|客戯析程序缓存?
详细信息Q请参阅使用 ipconfig 更新 DNS 客户注册?
详细信息Q请参阅昄客户Z?DHCP cd ID 信息?
详细信息Q请参阅讄客户Z?DHCP cd ID 信息?
Ping 命o有助于验?IP U的q通性。发现和解决问题Ӟ可以使用 Ping 向目标主
机名?IP 地址发?ICMP 回应h。需要验证主否连接到 TCP/IP |络和网l?
资源Ӟ请?Ping。也可以使用 Ping 隔离|络g问题和不兼容配置?
接的|络L?IP 地址。Ping 目标L?IP 地址看它是否响应Q如下:
ping 127.0.0.1
ping IP_address_of_local_host
讯?
ping IP_address_of_default_gateway
ping IP_address_of_remote_host
用地址成功Q但是用名称 Ping p|Q则问题出在地址或名U解析上Q而不是网l连
通性的问题。详l信息,请参阅?Arp 解决g地址问题?
“Internet 协议 (TCP/IP) 属?#8221;对话?#8220;常规”选项卡上的本地计机?IP 地址
有效而且正确?
启用 IP 路由Qƈ且\由器之间的链路是可用的?
您可以?Ping 命o的不同选项来指定要使用的数据包大小、要发送多数据包?
是否记录用过的\由、要使用的生存时?(TTL) g及是否设|?#8220;不分D?#8221;标志。可
以键?ping -? 查看q些选项?
Pinging 172.16.48.10 with 1450 bytes of data:
Reply from 172.16.48.10:bytes=1450 time<10ms TTL=32
Packets:Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate roundtrip times in milli-seconds:
Minimum = 0ms, Maximum = 10ms, Average = 2ms
默认情况下,在显C?#8220;h时”之前QPing {待 1,000 毫秒Q? U)的时间让?
个响应返回。如果通过 Ping 探测的远E系l经q长旉延迟的链路,如卫星链路,
则响应可能会花更长的旉才能q回。可以?-w Q等待)选项指定更长旉的超
时?
“地址解析协议 (ARP)”允许L查找同一物理|络上的L的媒体访问控制地址Q?
如果l出后者的 IP 地址。ؓ?ARP 更加有效Q每个计机~存 IP 到媒体访问控?
地址映射消除重复?ARP q播h?
存和解决地址解析问题非常有用?
TCP/IP 上的 NetBIOS (NetBT) ?NetBIOS 名称解析?IP 地址。TCP/IP ?NetBI
OS 名称解析提供了很多选项Q包括本地缓存搜索、WINS 服务器查询、广播、DNS ?
务器查询以及 Lmhosts 和主机文件搜索?
更正预加载的目Q?
nbtstat -c 昄 NetBIOS 名称~存Q包含其他计机的名U对地址映射?
nbtstat -R 清除名称~存Q然后从 Lmhosts 文g重新加蝲?
nbtstat -RR 释放?WINS 服务器上注册?NetBIOS 名称Q然后刷新它们的注册?
nbtstat -a name ?name 指定的计机执行 NetBIOS 适配器状态命令。适配器状?
命o返回计机的本?NetBIOS 名称表,以及适配器的媒体讉K控制地址?
nbtstat -S 列出当前?NetBIOS 会话及其状态(包括l计Q,如下例所C:
NetBIOS connection table
------------------------------------------------------------------
CORP1 <00> Connected Out CORPSUP1<20> 6MB 5MB
CORP1 <00> Connected Out CORPPRINT<20> 108KB 116KB
CORP1 <00> Connected Out CORPSRC1<20> 299KB 19KB
CORP1 <00> Connected Out CORPEMAIL1<20> 324KB 19KB
CORP1 <03> Listening
使用 netstat 昄q接l计
可以使用 netstat 命o昄协议l计信息和当前的 TCP/IP q接。netstat -a 命o
显C所有连接,?netstat -r 昄路由表和zdq接。netstat -e 命o显C?
Ethernet l计信息Q?netstat -s 昄每个协议的统计信息。如果?netstat
-nQ则不能地址和端口号转换成名U。下面是 netstat 的输出示例:
Interface Statistics
Bytes 3995837940 47224622
Unicast packets 120099 131015
Non-unicast packets 7579544 3823
Discards 0 0
Errors 0 0
Unknown protocols 363054211
TCP CORP1:1572 172.16.48.10:nbsession ESTABLISHED
TCP CORP1:1589 172.16.48.10:nbsession ESTABLISHED
TCP CORP1:1606 172.16.105.245:nbsession ESTABLISHED
TCP CORP1:1632 172.16.48.213:nbsession ESTABLISHED
TCP CORP1:1659 172.16.48.169:nbsession ESTABLISHED
TCP CORP1:1714 172.16.48.203:nbsession ESTABLISHED
TCP CORP1:1719 172.16.48.36:nbsession ESTABLISHED
TCP CORP1:1241 172.16.48.101:nbsession ESTABLISHED
UDP CORP1:1025 *:*
UDP CORP1:snmp *:*
UDP CORP1:nbname *:*
UDP CORP1:nbdatagram *:*
UDP CORP1:nbname *:*
UDP CORP1:nbdatagram *:*
IP Statistics
Received Header Errors = 738854
Received Address Errors = 23150
Datagrams Forwarded = 0
Unknown Protocols Received = 0
Received Packets Discarded = 0
Received Packets Delivered = 4616524
Output Requests = 132702
Routing Discards = 157
Discarded Output Packets = 0
Output Packet No Route = 0
Reassembly Required = 0
Reassembly Successful = 0
Reassembly Failures =
Datagrams Successfully Fragmented = 0
Datagrams Failing Fragmentation = 0
Fragments Created = 0
Received Sent
Messages 693 4
Errors 0 0
Destination Unreachable 685 0
Time Exceeded 0 0
Parameter Problems 0 0
Source Quenches 0 0
Redirects 0 0
Echoes 4 0
Echo Replies 0 4
Timestamps 0 0
Timestamp Replies 0 0
Address Masks 0 0
Address Mask Replies 0 0
Passive Opens = 135
Failed Connection Attempts = 107
Reset Connections = 91
Current Connections = 8
Segments Received = 106770
Segments Sent = 118431
Segments Retransmitted = 461
No Ports = 351928
Receive Errors = 2
Datagrams Sent = 13809
TracertQ跟t\由)是\pt实用程序,用于定 IP 数据报访问目标所采取的\
径。Tracert 命o?IP 生存旉 (TTL) 字段?ICMP 错误消息来确定从一个主机到
|络上其他主机的路由?
通过向目标发送不?IP 生存旉 (TTL) 值的“Internet 控制消息协议 (ICMP)”?
应数据包QTracert 诊断E序定到目标所采取的\由。要求\径上的每个\由器?
转发数据包之前至将数据包上?TTL 递减 1。数据包上的 TTL 减ؓ 0 Ӟ路由?
应该?#8220;ICMP 已超?#8221;的消息发回源pȝ?
直到目标响应?TTL 辑ֈ最大|从而确定\由。通过查中间\由器发回?#8220;ICM
P 已超?#8221;的消息确定\由。某些\由器不经询问直接丢弃 TTL q期的数据包Q这?
Tracert 实用E序中看不到?
。如果?-d 选项Q则 Tracert 实用E序不在每个 IP 地址上查?DNS?
172.16.0.99。主机的默认|关?10.0.0.1Q?92.168.0.0 |络上的路由器的 IP ?
址?192.168.0.1?
Tracing route to 172.16.0.99 over a maximum of 30 hops
1 2s 3s 2s 10,0.0,1
2 75 ms 83 ms 88 ms 192.168.0.1
3 73 ms 79 ms 93 ms 172.16.0.99
Trace complete.
?tracert 解决问题
可以使用 tracert 命o定数据包在|络上的停止位置。下例中Q默认网关确?19
2.168.10.99 L没有有效路径。这可能是\由器配置的问题,或者是 192.168.10.
0 |络不存在(错误?IP 地址Q?
炏V?
Tracert 命o支持多种选项Q如下表所C?
-d 指定不将 IP 地址解析C机名U?
-h maximum_hops 指定跃点C跟踪到称?target_name 的主机的路由?
-j host-list 指定 Tracert 实用E序数据包所采用路径中的路由器接口列表?
-w timeout {待 timeout 为每ơ回复所指定的毫U数?
target_name 目标L的名U或 IP 地址?
pathping 命o是一个\pt工P它将 ping ?tracert 命o的功能和q两个工
h不提供的其他信息l合h。pathping 命o在一D|间内数据包发送到到达最
l目标的路径上的每个路由器,然后Z数据包的计算机结果从每个跃点q回。由?
命o昄数据包在Ml定路由器或链接上丢qE度Q因此可以很Ҏ地确定可?
D|络问题的\由器或链接。某些选项是可用的Q如下表所C?
-n Hostnames 不将地址解析成主机名?
-h Maximum hops 搜烦目标的最大跃Ҏ?
-g Host-list 沿着路由列表释放源\由?
-p Period ?ping 之间{待的毫U数?
-q Num_queries 每个跃点的查询数?
-w Time-out 为每ơ回复所{待的毫U数?
-T Layer 2 tag 第 2 层优先标记Q例如,对于 IEEE 802.1pQ连接到数据包ƈ
它发送到路径中的每个|络讑֤。这有助于标识没有正配|第 2 层优先的网l?
讑֤?T 开关用于测试服务质?(QoS) q通性?
-R RSVP test Che查以定路径中的每个路由器是否支?#8220;资源保留协议 (RSVP)”
Q此协议允许L为数据流保留一定量的带宽?-R 开关用于测试服务质?(QoS) q?
通性?
且沿着路径Ҏ个\由器q行查询的次数是 100?
上数据包丢失的情c?
D:\>pathping -n msw
over a maximum of 30 hops:
0 172.16.87.35
1 172.16.87.218
2 192.68.52.1
3 192.68.80.1
4 7.54.247.14
5 7.54.1.196
Source to Here This Node/Link
Hop RTT Lost/Sent = Pct Lost/Sent = Pct Address
0 172.16.87.35
0/ 100 = 0% |
1 41ms 0/ 100 = 0% 0/ 100 = 0% 172.16.87.218
13/ 100 = 13% |
2 22ms 16/ 100 = 16% 3/ 100 = 3% 192.68.52.1
0/ 100 = 0% |
3 24ms 13/ 100 = 13% 0/ 100 = 0% 192.68.80.1
0/ 100 = 0% |
4 21ms 14/ 100 = 14% 1/ 100 = 1% 10.54.247.14
0/ 100 = 0% |
5 24ms 13/ 100 = 13% 0/ 100 = 0% 10.54.1.196
昄的\径相同。然?pathping 命o对下一?125 毫秒昄忙消息(此时间根据跃
点计数变化)。在此期_pathping 从以前列出的所有\由器和它们之间的链接之间
攉信息。在此期间结束时Q它昄试l果?
.16.87.218Q跃?1Q和 192.68.52.1Q跃?2Q丢?13% 的数据包?所有其他链
接工作正常。在跃点 2 ?4 中的路由器也丢失d到它们的数据包(?This Node
/Link 栏中所C)Q但是该丢失不会影响转发的\径?
丢失表明链接d。对路由器显C的丢失率(通过最双栏中?IP 地址昄Q表?
q些路由器的 CPU 可能负药行。这些阻塞的路由器可能也是端对端问题的一个因
素,其是在软g路由器{发数据包时?/p>
A. TRACERT
B. ROUTE
C. NBTSTAT
D. IPCONFIG
The TRACERT utility is Microsoft's own, used to trace a packet from its source ( your computer ) to a destination host ( a remote computer ).
Question 2. If you wanted to display all entries in the ARP cache, which of the following utilities would you use?
A . ARP - G
B. ARP - E
C. ARP - D
D. ARP - S
To display all entries in the ARP ( Address Resolution Protocol ) cache, you would use the ARP utility with the -G or - A switch. They are the same thing. To get the answer type "arp /?" at the command prompt.
ARP ( Address Resolution Protocol ) is used to obtain hardware ( MAC = Media Access Control ) addresses for communications with a destination host.
Question 3. You notice that the subnet mask is 0.0.0.0 on your Windows NT computer while using the IPCONFIG utility at the command prompt to check for IP address configuration. What does it mean when the IPCONFIG utility displays a subnet mask of 0.0.0.0?
A. The default gateway on your computer does not match the default gateway of the network.
B. Your computer has the same subnet mask as another computer on the network.
C. Your computer does not have the correct IP address class specified for it.
D. Your computer has the same IP address as another computer on the network.
The most likely cause in this scenario is that your computer has the same IP address as another computer in the network. When this happens, running IPCONFIG will yield an IP address of 0.0.0.0.
Question 4. If you want to copy files from one Windows NT computer to another, what TCP / IP utility would you use?
A . RCP
B. REXEC
C. TELNET
D. TRACERT
The RCP ( Remote Copy ) is Microsoft's own TCP / IP utility. It is used to copy files from a source Windows NT computer to a destination ( remote ) Windows NT computer, or vice-versa. Type "rcp /?" at the command prompt to get the command's full syntax.
Question 5. Use the following diagram to answer this question :
You are working on your Windows NT workstation, SMALLNT, and you would like to communicate with another Windows NT computer, BIGNT. If both computers are on the same local subnet , where does SMALLNT look for the hardware address of the destination host? ( BIGNT in this case )
A. In its own ARP cache.
B. In the ARP cache of the destination host, BIGNT in this case.
C. If there is a DHCP server present , then in the ARP cache of the DHCP server.
D. In the LMHOSTS or HOSTS file of the source computer.
The ARP protocol ( and NOT the ARP command ) is used to map IP addresses to hardware addresses ( MAC addresses ). Anytime you communicate with a destination host that is on the same subnet ( locally ), then the hardware address of the destination host is obtained from the source host's LOCAL ARP cache. In this scenario, BIGNT's hardware address is obtained from SMALLNT's own ARP cache since both computers are on the same network.
Question 6. You have a print device connected to a server running the LPD service. From your Windows NT computer, you would like to obtain the status of the print device. What utility would you use to achieve the task?
A. LPD
B. NET USE
C. LPQ
D. GETDAEMON
The LPD ( Line Printer Daemon ) is a TCP / IP printing service. A print server that has a TCP / IP print device connected to it must have the LPD service installed on it. However, to obtain the status of a TCP / IP print device ( or print queue as it is often called in the TCP / IP circle ), you would use the LPQ command.
Type "lpq /?" at the command prompt to get the proper syntax. Pay close attention to the "-S" and "-P" switches. For the "-S" switch, you can specify the NAME or IP address of the print server running the LPD service.
Question : Under Windows NT Server 4.0, how do you install the LPD service?
Answer : Under Windows NT, the LPD service is known as "Microsoft TCP / IP Printing" ===> right-click Network Neighborhood | Properties | Services tab | Add... | "Microsoft TCP / IP Printing" service.
Question 7. Let's say that you want to run a process on a remote host that is using the REXEC service, what Microsoft TCP / IP utility would you use?
A. RCP
B. REXEC
C. TELNET
D. FTP
The REXEC ( Remote Execute ) command is Microsoft's home-grown utility used to run processes on a remote computer that is also running the REXEC service. Type "rexec /?" at the command prompt to get the full syntax.
Question 8. If you want to retrieve system information from a remote host running the Finger service, what TCP / IP utility would you use?
A. REXEC
B. PING
C. RCP
D. FINGER
The FINGER utility is used to obtain system information from a remote host that is using the Finger service. To get the proper syntax, type "finger" at the command prompt.
Question 9. Let's say that you want a DHCP client to give up its lease with a DHCP server, what command would you use to accomplish the task?
A. ipconfig / endlease
B. ipconfig / release
C. route / release
D. route / endlease
The IPCONFIG / RELEASE command is used to send a DHCPRELEASE message from a DHCP client to a DHCP server. The DHCPRELEASE message specifies that a client wishes to give up its current lease with the DHCP server. Type, "ipconfig /?" at the command prompt to display all the switches of the utility.
Question 10. You would like to see a list of NetBIOS computer names that have been resolved into IP addresses on your Windows NT computer. Which of the following utilities would you use?
A. ARP
B. NetBIOS
C. NETSTAT
D. NBTSTAT
You can use the "nbtstat" utitliy to view all NetBIOS computer names that have been resolved into IP addresses. To see the NetBIOS local name table of your workstation, use "nbtstat -n."