Windows Vista includes many tools for
troubleshooting and testing TCP/IP connectivity. This section looks at
automated diagnostics, basic tests that you should perform whenever you
install or modify a computer's network settings, and techniques for
resolving difficult networking problems involving DHCP and DNS.
Diagnosing and Resolving Local Area Connection Problems
Occasionally network cables can get unplugged or
the network adapter might experience a problem that temporarily
prevents it from working. After you plug the cable back in, or solve
the adapter problem, the connection should automatically reconnect. You
can diagnose local area connection problems by performing the following
steps:
-
Click Start and then click Network. In Network Explorer, click Network And Sharing Center on the toolbar.
-
In Network And Sharing Center, click Manage Network Connections.
-
Right-click the connection you want to work with and select Diagnose.
Windows Network Diagnostics will then try to identify the problem. As shown in Figure 1,
a list of possible solutions is provided if there are identifiable
configuration problems. Some solutions provide automated fixes that can
be executed by clicking the solution. Other solutions require manual
fixes, such as might be required if you need to reset a network router
or broadband modem. If your actions don't fix the problem, refer to
other appropriate parts of this troubleshooting section.
Diagnosing and Resolving Internet Connection Problems
Because
there are so many interdependencies between services, protocols, and
configuration settings, troubleshooting network problems can be
difficult. Fortunately, Windows Vista includes a powerful network
diagnostics tool for pinpointing problems that relate to the following:
-
General network connectivity problems
-
Internet service settings for e-mail, newsgroups, and proxies
-
Settings for modems, network clients, and network adapters
-
DNS, DHCP, and WINS configuration
-
Default gateways and IP addresses
To diagnose Internet connection problems, follow these steps:
-
Click Start and then click Network. In Network Explorer, click Network And Sharing Center on the toolbar.
-
Click Diagnose And Repair.
Windows
Network Diagnostics will then try to identify the problem. If
identifiable configuration problems exist, a list of possible solutions
is provided. Some solutions provide automated fixes that can be
executed by clicking the solution. Other solutions require manual
fixes, such as might be required if you need to reset a network router
or broadband modem. If your actions don't fix the problem, refer to
other appropriate parts of this troubleshooting section.
Performing Basic Network Tests
Whenever you install a new computer or make
configuration changes to the computer's network settings, you should
test the configuration. The most basic TCP/IP test is to use the PING command to test the computer's connection to the network. PING is a command-line command. To use it, type ping
at the command prompt, where is either the computer name
or the IP address of the host computer you're trying to reach.
With Windows Vista, you can use the following methods to test the configuration using PING:
-
Try to PING IP addresses If the computer is configured correctly and the host you're trying to reach is accessible to the network, PING should receive a reply, as long as pinging is allowed by the computer's firewall. If PING can't reach the host or is blocked by a firewall, PING times out.
-
On domains that use WINS, try to PING NetBIOS computer names If NetBIOS computer names are resolved correctly by PING, the NetBIOS facilities, such as WINS, are correctly configured for the computer.
-
On domains that use DNS, try to PING DNS host names If fully qualified DNS host names are resolved correctly by PING, DNS name resolution is configured properly.
You might also want to test network browsing for the
computer. If the computer is a member of a Windows Vista domain and
computer browsing is enabled throughout the domain, log on to the
computer and then use Windows Explorer or Network Explorer to browse
other computers in the domain. Afterward, log on to a different
computer in the domain and try to browse the computer you just
configured. These tests tell you if the DNS resolution is being handled
properly in the local environment. If you can't browse, check the
configuration of the DNS services and protocols.
| Real World |
Access to network resources in Network Explorer
is dependent on the Computer Browser service and the network discovery
settings. The Computer Browser service is responsible for maintaining a
list of computers on a network. If the service is stopped or isn't
working properly, a computer won't see available resources in Network
Explorer. You can check the status of the Computer Browser service in
Computer Management. Expand Services And Applications and then select
Services in the left pane. The status of the Computer Browser service
should be Started. If the status is blank, the service isn't running
and should be started.
|
In some cases, the Computer Browser service might be
running normally, but there might not be an updated list of resources
in Network Explorer. This can happen because the service performs
periodic updates of the resource list rather than checking continuously
for updates. If a resource you want to use isn't listed, you can either
wait for it to become available (which should take less than 15 minutes
in most cases), or you can connect to the resource directly using the
Universal Naming Convention (UNC) name or IP address of the resource .
In some cases, discovering and sharing might be set to
block discovery. You'll need to allow discovery to resolve this by
following these steps:
-
Click Start and then click Network.
-
In Network Explorer, click Network And Sharing Center on the toolbar.
-
If network discovery is turned off, expand the Network And Discovery panel and then click Turn On Network Discovery.
Resolving IP Addressing Problems
The current IP address settings of a computer can be obtained . If a computer is having problems accessing
network resources or communicating with other computers, an IP
addressing problem might exist. Take a close look at the IP address
currently assigned, as well as other IP address settings, and use these
pointers to help in your troubleshooting:
-
If the IPv4 address currently assigned to the
computer is in the range 169.254.0.1 to 169.254.255.254, the computer
is using Automatic Private IP Addressing (APIPA). An automatic private
IP address is assigned to a computer when it is configured to use DHCP
and its DHCP client cannot reach a DHCP server. When using APIPA,
Windows Vista will automatically periodically check for a DHCP server
to become available. If a computer doesn't eventually obtain a dynamic
IP address, it usually means the network connection has a problem.
Check the network cable, and if necessary trace the cable back to the
switch or hub into which it connects.
-
If the IPv4 address and the subnet mask of the
computer are currently set as 0.0.0.0, the network is either
disconnected or someone attempted to use a static IP address that
duplicated another IP address already in use on the network. In this
case, you should access Network Connections and determine the state of
the connection. If the connection is disabled or disconnected, this
should be shown. Rightclick the connection and select Enable or Repair
as appropriate. If the connection is already enabled, you will need to
modify the IP address settings for the connection.
-
If the IP address is dynamically assigned, check
to make sure that another computer on the network isn't using the same
IP address. You can do this by disconnecting the network cable for the
computer that you are working with and pinging the IP address in
question. If you receive a response from the PING
test, you know that another computer is using the IP address. This
computer probably has an improper static IP address or a reservation
that isn't set up properly.
-
If the IP address appears to be set correctly,
check the network mask, gateway DNS, and WINS settings by comparing the
network settings of the computer you are troubleshooting with those of
a computer that is known to have a good network configuration. One of
the biggest problem areas is the network mask. When subnetting is used,
the network mask used in one area of the network might look very
similar to that of another area of the network. For example, the
network mask in one IPv4 area might be 255.255.255.240, and it might be
255.255.255.248 in another IPv4 area.
Releasing and Renewing DHCP Settings
DHCP servers can assign many network
configuration settings automatically. These include IP addresses,
default gateways, primary and secondary DNS servers, primary and
secondary WINS servers, and more. When computers use dynamic
addressing, they are assigned a lease on a specific IP address. This
lease is good for a specific time period and must be renewed
periodically. When the lease needs to be renewed, the computer contacts
the DHCP server that provided the lease. If the server is available,
the lease is renewed and a new lease period is granted. You can also
renew leases manually as necessary on individual computers or by using
the DHCP server itself.
Problems can occur during the lease assignment and
renewal process that prevent network communications. If the server
isn't available and cannot be reached before a lease expires, the IP
address can become invalid. If this happens, the computer might use the
alternate IP address configuration to set an alternate address, which
in most cases has settings that are inappropriate and prevent proper
communications. To resolve this problem, you'll need to release and
then renew the DHCP lease.
Another type of problem occurs when users move around
to various offices and subnets within the organization. Although moving
from location to location, their computers might obtain DHCP settings
from the wrong server. When the users return to their offices, the
computers might seem sluggish or perform incorrectly due to the
settings assigned by the DHCP server at another location. If this
happens, you'll need to release and then renew the DHCP lease.
You can use the graphical interface to release and renew DHCP leases by completing the following tasks:
-
Click Start and then click Network. In Network Explorer, click Network And Sharing Center on the toolbar.
-
In Network And Sharing Center, click Manage Network Connections.
-
In Network Connections, right-click the connection you want to work with and then click Diagnose.
-
After Windows Network Diagnostics tries to
identify the problem, a list of possible solutions is provided. If the
computer has one or more dynamically assigned IP addresses, one of the
solutions should be Automatically Get New IP Settings. Click this
option.
You can also follow these steps to use the IPCONFIG command to renew and release settings:
-
Start an elevated command prompt.
-
To release the current settings for all network adapters, type ipconfig/release at the command line. Then renew the lease by typing ipconfig/renew.
-
To only renew a DHCP lease for all network adapters, type ipconfig/renew at the command line.
-
You can check the updated settings by typing ipconfig/all at the command line.
| Real World |
If a computer has multiple network adapters and
you only want to work with one or a subset of the adapters, you can do
this by specifying all or part of the connection name after the ipconfig/renew or ipconfig/release
command. Use the asterisk as a wildcard character to match any
characters in a connection's name. For example, if you wanted to renew
the lease for all connections with names starting with Loc, you could type the command ipconfig/renew Loc*. If you wanted to release the settings for all connections containing the word Network, you could type the command ipconfig/release *Network*.
|
Registering and Flushing DNS
The DNS resolver cache maintains a history of DNS
lookups that have been performed when a user accesses network resources
using TCP/IP. This cache contains forward lookups, which provide host
name to IP address resolution, and reverse lookups, which provide IP
address to host name resolution. Once a DNS entry is stored in the
resolver cache for a particular DNS host, the local computer no longer
has to query external servers for DNS information on that host. This
enables the computer to resolve DNS requests locally, which provides a
quicker response.
How long entries are stored in the resolver cache
depends on the Time to Live (TTL) value assigned to the record by the
originating server. To view current records and see the remaining TTL
value for each record, in an elevated command prompt, type ipconfig/displaydns.
These values are given as the number of seconds that a particular
record can remain in the cache before it expires. These values are
continually being counted down by the local computer. When the TTL
value reaches zero, the record expires and is removed from the resolver
cache. Occasionally,
you'll find that the resolver cache needs to be cleared out to remove
old entries and enable computers to check for updated DNS entries
before the normal expiration and purging process takes place.
Typically, this happens because server IP addresses have changed and
the current entries in the resolver cache point to the old addresses
rather than the new ones. Sometimes the resolver cache itself can get
out of sync, particularly when DHCP has been misconfigured.
| Real World |
Skilled administrators know that several weeks in
advance of the actual change, they should start to decrease the TTL
values for DNS records that are going to be changed. Typically, this
means reducing the TTL from a number of days (or weeks) to a number of
hours, which allows for quicker propagation of the changes to computers
that have cached the related DNS records. Once the change is completed,
administrators should restore the original TTL value to reduce renewal
requests.
|
In most cases, you can resolve problems with the DNS
resolver cache by either flushing the cache or reregistering DNS. When
you flush the resolver cache, all DNS entries are cleared out of the
cache and new entries are not created until the next time the computer
performs a DNS lookup on a particular host or IP address. When you
reregister DNS, Windows Vista attempts to refresh all current DHCP
leases and then performs a lookup on each DNS entry in the resolver
cache. By looking up each host or IP address again, the entries are
renewed and reregistered in the resolver cache. You'll generally want
to flush the cache completely and allow the computer to perform lookups
as needed. Reregister DNS only when you suspect that there are problems
with DHCP and the DNS resolver cache.
You can use the IPCONFIG command to flush and reregister entries in the DNS resolver cache by following these steps:
-
Start an elevated command prompt.
-
To clear out the resolver cache, type ipconfig/flushdns at the command line.
-
To renew DHCP leases and reregister DNS entries, type ipconfig/registerdns at the command line.
-
When the tasks are complete, you can check your work by typing ipconfig/displaydns at the command line.
|