Networking Tools
Windows 2000 provides a large collection of networking client tools to optimize and troubleshoot network performance. Several of the most useful tools, shown in Table 31.21, are discussed in this section.Table 31.21 Networking Troubleshooting Tools
Tool | Overview | Location |
---|---|---|
Network Diagnostics(Netdiag.exe) | Helps isolate networking and connectivity problems by performing a series of tests to determine the state of your network client and whether it is functional. | Support Tools on the Windows 2000 operating system CD |
IP Configuration(Ipconfig.exe) | Displays the current configuration of the installed IP stack on a networked computer using TCP/IP. | %SystemRoot%System32 |
NetBT Statistics(Nbtstat.exe) | Displays protocol statistics and current TCP/IP connections using NetBIOS over TCP/IP (NetBT), including NetBIOS name resolution to IP addresses. | %SystemRoot%System32 |
Path Ping(Pathping.exe) | A route tracing tool that sends packets to each router, and then computes results based on the packets returned from each hop. | %SystemRoot%System32 |
IP Security Monitor(Ipsecmon.exe) | Confirms whether your secured communications are successful by displaying the active security associations on local or remote computers. | %SystemRoot%System32 |
NetDiag
NetDiag is a command-line, diagnostic tool that helps isolate networking and connectivity problems by performing a series of tests to determine the state of your network client and whether it is functional. These tests and the network status information they expose help network administrators and support personnel identify and isolate network problems. Moreover, because this tool does not require parameters or switches, you can focus on analyzing the output, rather than training users on tool usage.NetDiag diagnoses network problems by checking all aspects of a client computer's network configuration and connections. Beyond troubleshooting TCP/IP issues, it also examines a client computer's Internet Packet Exchange (IPX) and NetWare configurations.NetDiag is part of the Support Tools collection on the Windows 2000 operating system CD. For information about NetDiag, see Windows 2000 Support Tools Help. For information about installing and using the Windows 2000 Support Tools and Support Tools Help, see the file Sreadme.doc in the SupportTools folder of the Windows 2000 operating system CD. Run NetDiag from a command prompt rather than from Windows Explorer to see the results upon completion of the tests. Because the results fill more than one normal command prompt screen, use the /l switch to log the results to the text file NetDiag.log. The tests take a few minutes to complete.
NetDiag Syntax
The command-line syntax for NetDiag is as follows:
netdiag [[/q|/v|/debug][/l][/d:DomainName][/fix][/dcaccountenum] |
No switches or syntax need to be specified, but several are available, primarily to increase or decrease the level of detail in NetDiag reports. These switches are shown in the Table 31.22.Table 31.22 NetDiag Switches
Switch | Name | Function |
---|---|---|
/q | Quiet output | Lists only tests that return errors. |
/v | Verbose output | Lists more detail from test data as tests are performed. |
/debug | Most verbose output | Lists the most detail from of test data with reasons for success or failure. |
/l | Log output | Stores output in NetDiag.log, in the current folder. |
/d:DomainName | Find DC | Finds a domain controller in the specified domain. |
/fix | Fix DNS problems | Only applies to domain controllers. |
/DCAccountEnum | Domain Controller Account Enumeration | Enumerates domain controller computer accounts. |
/test: | Perform single test | Runs only the specified test. |
/skip: | Skip one test | Skips the specified test. |
TestName | Test name | Test specified. For a complete list, see Table 31.23. |
/? | Help | Displays this list. |
NetDiag prints the string [FATAL] when it detects a condition that needs to be fixed immediately. The string [WARNING] signals a failure condition that does not require immediate attention.
NetDiag Tests
Run NetDiag whenever a computer is having network problems. The tool tries to diagnose the problem and can even flag problem areas for closer inspection.NetDiag examines DLL files, output from other tools, and the system registry to find potential problem spots. It checks which network services or functions are enabled and then runs the network configuration tests listed in Table 31.23, in the order presented.
NOTETable 31.23 NetDiag Tests
If the computer is not running one of the network troubleshooting tools listed in Table 31.23, that test is skipped and no results are displayed, not even an acknowledgement that the test was skipped.
Test Name | Function | Details |
---|---|---|
NDIS | Network Adapter Status | Lists the network adapter configuration details, including the adapter name, configuration, media, globally unique identifier (GUID), and statistics. If this test shows an unresponsive network adapter, the remaining tests are aborted. |
IPConfig | IP Configuration | Provides most of the TCP/IP information normally obtained from carrying out the ipconfig /all command, pings the DHCP and WINS servers, and checks that the default gateway is on the same subnet as the local computer's IP address. |
Member | Domain Membership | Confirms details of the primary domain, including computer role, domain name, domain GUID. Checks that NetLogon service is started, adds the primary domain to the domain list, and queries the primary domain security identifier (SID). |
NetBTTransports | Transports Test | Lists NetBT transports managed by the redirector. Prints error information if no NetBT transports are found. |
Autonet | Autonet Address | Checks whether any interface is using Automatic Private IP Addressing (APIPA). |
IPLoopBk | IP Loopback Ping | Pings the IP loopback address of 127.0.0.1. |
DefGw | Default Gateway | Pings all the default gateways for each interface. |
NbtNm | NetBT Name Test | Similar to the nbtstat -n command. It checks that the workstation service name <00> equals the computer name. It also checks that the messenger service name <03>, and server service name <20> are present on all interfaces and are not in conflict. |
WINS | WINS Service Test | Sends NetBT name queries to all the configured WINS servers. |
Winsock | Winsock Test | Uses Windows Sockets WSAEnumProtocols() function to retrieve available transport protocols. |
DNS | DNS Test | Checks whether DNS cache service is running, and whether the computer is correctly registered on the configured DNS servers. If the computer is a domain controller, DNS Test checks to see whether all the DNS entries in Netlogon.dns are registered on the DNS server. If the entries are incorrect and the /fix option is on, it tries to reregister the domain controller record on a DNS server. |
Browser | Redirector and Browser Test | Checks whether the workstation service is running. Retrieves the transport lists from the redirector and the browser. Checks whether the NetBT transports are in the list from NetBT transports test. Checks whether the browser is bound to all the NetBT transports and whether the computer can send mailslot messages. Tests both via browser and redirector. |
DsGetDc | DC Discovery Test | Finds a generic domain controller from directory service, finds the primary domain controller, and then finds a Windows 2000 domain controller. If the tested domain is the primary domain, checks whether the domain GUID stored in Local Security Authority (LSA) is the same as the domain GUID stored in the domain controller. If not, the test returns a fatal error; if the /fix option is used, DsGetDC tries to fix the GUID in LSA. |
DcList | DC List Test | Gets a list of domain controllers in the domain from the directory service on an active domain controller. If there is no domain controller information for this domain, tries to get an active domain controller from the directory service (similar to DsGetDc test). Gets the domain controller list from the target domain controller and checks the status of each domain controller. Adds them all the to the list of the tested domain. If the preceding sequence fails, uses the browser to obtain the domain controllers, checks their status, and adds them to the list. If the DcAccountEnum registry entry option is enabled, NetDiag tries to get a domain controller list from Security Accounts Manager (SAM) on the discovered domain controller. |
Trust | Trust Relationship Test | Tests trust relationships to the primary domain only if the computer is a member workstation, member server, or domain controller. Checks that the primary domain SID is correct and contacts an active domain controller. Connects to the SAM server on the domain controller and uses the domain SID to open the domain to verify that the domain SID is correct. Queries information of the secure channel for the primary domain. If the computer is a backup domain controller, reconnects to the primary domain controller. If the computer is a member workstation or server, sets a secure channel to each domain controller listed for this domain. |
Kerberos | Kerberos Test | Tests Kerberos protocols only if the computer is a member computer or domain controller and the user is not logged on to a Windows 2000 domain account and not logged on to a local account. Connects to LSA and looks up the Kerberos package. Gets the ticket cache of the Kerberos package and checks whether the Kerberos package has a ticket for the primary domain and the local computer. |
LDAP | Lightweight Directory Access Protocol (LDAP) Test | Run only if the domain controller is running directory services and the computer is a member or domain controller. Tests LDAP on all the active domain controllers found in the domain and creates an LDAP connection block to the domain controller, then searches in the LDAP directory with three types of authentication: "unauthenticated," NTLM, and "Negotiate." If the /v (verbose) switch is on, prints the details of each entry retrieved. |
Route | Route test | Prints the static and persistent entries in the routing table, including a Destination Address, Subnet Mask, Gateway Address, Interface, and Metric. |
NetStat | NetStat test | Similar to NetStat tool. Displays statistics of protocols and current TCP/IP network connections. |
Bindings | Bindings test | Lists all bindings, including interface name, lower module name, upper module name, whether the binding is currently enabled, and the owner of the binding. |
WAN | WAN test | Displays the settings and status of current active remote access connections. |
Modem | Modem test | Retrieves all available line devices. Displays the configuration of each line device. |
NetWare | NetWare test | Determines whether NetWare is using the directory tree or bindery logon process, determines the default context if NetWare is using the directory tree logon process, and finds the server to which the host attaches itself at startup. |
IPX | IPX test | Examines the network's IPX configuration, including frame type, Network ID, RouterMTU, and whether packet burst or source routing are enabled. |
IPSec | IP Security test | Checks the current status of the IP Security Policy Agent service. It also reports which IPSec policy (if any) is currently active for the computer. |
IPConfig
IPConfig is a command-line tool that displays the current configuration of the installed IP stack on a networked computer using TCP/IP. Run IPConfig from a command prompt rather than from Windows Explorer to see the resulting display.
IPConfig Syntax
The command-line syntax for IPConfig is as follows:
ipconfig [/?|/all|/release [adapter]|/renew [adapter] |
IPConfig Switches
Table 31.24 lists the IPConfig command-line switches.Table 31.24 IPConfig Switches
Switch | Effect |
---|---|
/all | Produces a detailed configuration report for all interfaces. |
/release <adapter> | Releases the IP address for a specified adapter. If no adapter name is specified, releases the DHCP leases for all adapters bound to TCP/IP. |
/renew <adapter> | Renews the IP address for the specified adapter. If no adapter name is specified, renews the DHCP leases for all adapters bound to TCP/IP. |
/flushdns | Removes all entries from the DNS Resolver Cache. |
/registerdns | Refreshes all DHCP leases and reregisters DNS names. |
/displaydns | Displays the contents of the DNS Resolver Cache. |
/showclassid adapter | Displays all the DHCP class IDs allowed for the specified adapter. |
/setclassid adapter | Modifies the DHCP class ID for the specified adapter. |
/? | Displays this list. |
CAUTIONRun IPConfig to check the status of a computer's TCP/IP configuration. When used with the /all switch, it displays a detailed configuration report for all interfaces, including any configured WAN miniports (typically used for remote access or virtual private network [VPN] connections). The following is a sample report:
It is recommended that only a network administrator or support personnel use many of the advanced features of IPConfig. Using these commands incorrectly can cause problems with the client system's connection to the server.
Windows 2000 IP Configuration |
NBTStat
NBTStat is a command-line tool for troubleshooting NetBIOS name over TCP/IP (NetBT) resolution problems. It displays protocol statistics and current TCP/IP connections using NetBT. When a network is functioning normally, NetBT resolves NetBIOS names to IP addresses. It uses several options for NetBIOS name resolution, including local cache lookup, WINS server query, broadcast, Lmhosts lookup, Hosts lookup, and DNS server query. Run NBTStat from a command prompt rather than from Windows Explorer to see the resulting display.
NBTStat Syntax
The command-line syntax for NBTStat is as follows:
nbtstat [-a RemoteName] [-A IP address] [-c] [-n] |
NBTStat Switches
NBTStat removes and corrects preloaded entries using case-sensitive switches as shown in Table 31.25. Table 31.25 NBTStat Switches
Switch | Name | Function |
---|---|---|
-a <NetBIOS name> | Adapter status by NetBIOS name | Returns the NetBIOS name table and media access control (MAC) address of the address card for the specified computer name. |
-A <IP address> | Adapter status by IP address | Lists the same information as -a when given the target's IP address. |
-c | Cache | Lists the contents of the NetBIOS name cache. |
-n | Names | Displays the names registered locally by NetBIOS applications such as the server and redirector. |
-r | Resolved | Displays a count of all names resolved by broadcast or WINS server. |
-R | Reload | Purges the name cache and reloads all #PRE entries from LMHosts. |
-RR | Release Refresh | Sends name release packets to the WINS server and starts a refresh, reregistering all names with the name server. |
-s | Sessions by NetBIOS names | Lists the NetBIOS sessions table converting destination IP addresses to computer NetBIOS names. |
-S | Sessions by IP address | Lists the current NetBIOS sessions and their status, with the IP addresses. |
[Number] | Interval | Redisplays selected statistics at intervals specified in seconds, pausing between each display. Press CTRL+C to stop redisplaying statistics. |
-? | Help | Displays this list. |
NBTStat output is in the form of a table. For example, nbtstat -S lists the current NetBIOS sessions by IP address, including status, as in the following example:
Local Area Connection: |
The following example shows a sample NetBIOS name table for a client running Windows 2000 Professional on a Windows 2000 Server-based network, using the nbtstat -n command. This example shows the sixteenth byte for special names, plus the type of NetBIOS name (unique or group).
Local Area Connection: |
In this example, the following NetBIOS special names are identified:
computer0x00 (shown as <00> in the example) indicates the computer name associated with the Workstation service. domain0x00 indicates the domain to which this computer belongs. computer0x03 indicates the computer name associated with the Messenger service. computer0x20 indicates the computer name associated with the Server service. domain0x1E indicates that this computer can serve as a backup browser in this domain. username0x03 displays the user name of the account currently logged on to the computer.
Possible NetBIOS special names found in NBTStat are described in Table 31.26.Table 31.26 Samples of NetBIOS Special Names
Special Name | Description | |
---|---|---|
Registered unique user name: | ||
<USERNAME><03> | Registers the name of the user currently logged on in the WINS database so net send commands can be sent to specified user names. | |
Registered unique computer names: | ||
<COMPUTER><00> | Used by Microsoft networking workstations to receive second-class mailslot requests. This is the computer name registered for workstation services by a WINS client and is needed to receive mailslot requests. | |
<COMPUTER><03> | The computer name registered for the Messenger service on a WINS client. | |
<COMPUTER><20> | The name registered for the Server service on a Windows 2000-based WINS client. | |
<COMPUTER><BE> | The unique name registered when the Network Monitor agent is started on the computer. | |
<COMPUTER><BF> | The group name registered when the Network Monitor agent is started on the computer. If this name is not 15 characters in length, it is padded with plus (+) symbols. | |
<COMPUTER><1F> | The unique name registered for network dynamic data exchange (NetDDE) when the NetDDE service is started on the computer. | |
Registered group names: | ||
<01><02>MSBROWSE<02><01> | Used by master browser servers to periodically announce their domain on a local subnet. This announcement contains the domain name and the name of the master browser server for the domain. In addition, master browser servers receive the domain announcements sent to this name and maintain them in their internal browse list with the announcer's computer name. | |
<DOMAIN><00> | Used by workstations and servers to process server announcements to support NTLM. Servers running Microsoft® Windows® for Workgroups, Windows 95, Windows 98, Windows NT, and Windows 2000 do not broadcast this name unless the LMAnnounce option is enabled in the server's properties. | |
<DOMAIN><1B> | Used to identify the domain master browser name, which is a unique name that only the domain controller can add. The domain controller processes GetBrowserServerList requests on this name. WINS assumes that the computer that registers a domain name with the <1B> character is the domain controller. The 1B entry is resolved when the NetGetDcName function is called. | |
<DOMAIN><1C> | Used for the internet group name, which the domain controllers register. The internet group name is a dynamic list of up to 25 computers that have registered the name. This is the name used to find a Windows 2000 domain controller for pass-through authentication. The 1C entry is resolved when the NetGetAnyDcName function is called. | |
<DOMAIN><1D> | Used to identify a segment master browser (not a domain master browser). The master browser adds this name as a unique NetBIOS name when it starts. Workstations announce their presence to this name so that master browsers can build their browse list. | |
<DOMAIN><1E> | Used for all domain-wide announcements by browser servers in a Windows 2000-based server domain. This name is added by all browser servers and potential servers in the workgroup or domain. All browser election packets are sent to this name. |
PathPing
PathPing is a command-line route tracing tool that combines features of the tools Ping and TraceRt with additional information that neither provides. PathPing sends packets to each router on the way to a final destination over a period of time, and then computes results based on the packets returned from each hop. Since PathPing shows the degree of packet loss at any specified router or link, you can pinpoint which routers or links might be causing network problems. Run PathPing from a command prompt rather than from Windows Explorer to see the resulting display.
PathPing Syntax
The command-line syntax for PathPing is as follows:
pathping [-n] [-h maximum_hops] [-g host-list] [-p period] |
PathPing Switches
A number of switches are available, as shown in Table 31.27.Table 31.27 PathPing Switches
Switch | Name | Function |
---|---|---|
-n | Host names | Does not resolve addresses-to-host names. |
-h <max_hops> | Maximum hops | Maximum number of hops to search for target. The default is 30. |
-g <host list> | Host list | A loose source route along host-list from host to target system. Type in a series of router IP addresses separated by spaces for testing. |
-p <milliseconds> | Period | Time, in milliseconds, to wait between pings. The default is 250 milliseconds. |
-q <num_queries> | Number of queries | Number of queries per hop. The default is 100. |
-w <milliseconds> | Time out | Time, in milliseconds, waited for each reply. The default is 3000 milliseconds. |
-T | Layer-2 Priority | Test connectivity to each hop with Layer-2 priority tags. |
-R | RSVP | Test whether each hop is RSVP-aware. |
-? | Help | Display this list. |
PathPing Reports
The following is a sample PathPing report. Note that the compiled statistics that follow the hop list indicate packet loss at each router.
Tracing route to testpc1.dns.reskit.com [7.54.1.196] |
When PathPing is run, the first results you see list the route as it is tested for problems. This is the same path shown by TraceRt. PathPing then displays a busy message while it gathers information from all the routers previously listed and the links between them. At the end of this period, it displays the test results. The columns "This Node/Link Lost/Sent = Pct" and "Address" contain the most useful information. In the preceding sample report, the link between 172.16.87.218 (hop 1), and 192.168.52.1 (hop 2) is dropping 13 percent of the packets. All other links are working normally. The routers at hops 2 and 4 also drop packets addressed to them, but this loss does not affect their forwarding path.The loss rates displayed for the links (marked as a "|" in the rightmost column) indicate losses of packets being forwarded along the path. This loss indicates link congestion. The loss rates displayed for routers (indicated by their IP addresses in the rightmost column) indicate that their CPUs or packet buffers might be overloaded. These congested routers might also be a factor in end-to-end problems, especially if packets are forwarded by software routers.
IP Security Monitor
The IP Security Monitor (IPSecMon) is a Windows-based tool used to confirm whether your secured, IP-based communications are successful by displaying the active security associations on local or remote computers. For example, you can use IPSecMon to determine whether there has been a pattern of authentication or security association failures, possibly indicating incompatible security policy settings. IPSecMon can be run locally or remotely if you have a network connection to the remote computer. From the Start menu, click Run, and then type:ipsecmon <computer name>An entry is displayed for each active security association, as shown in Figure 31.7. The information contained in each entry includes the name of the active IPSec policy, the active Filter Action and IP Filter List (including details of the active filter), and the tunnel endpoint (if one was specified in the active IPSec policy).
Figure 31.7 IP Security Monitor
Entry information can also provide statistics for tuning and troubleshooting, including the following:
The number and type of active security associations.The total number of master and session keys (Main and Quick modes). Successful IPSec security associations initially cause one master key and one session key. Subsequent key regenerations are shown as additional session keys.The total number of confidential (Encapsulating Security Payload or ESP) or authenticated (ESP or Authentication Header—AH) bytes sent or received.
NOTE
Because ESP provides authenticity and confidentiality, both counters are incremented.
The total number of soft associations.
The refresh rate is the only configurable option in IPSecMon. By default, the statistics update every 15 seconds and are accumulated with each communication that uses IPSec. A Bad SPI (Security Parameters Index) error might occur if a key lifetime value is set too low, or if the security agent has expired but the sender continues to transmit data. To determine and correct the problem, run IPSecMon, and then examine the number of rekeys.If the number of rekeys is very large compared to the amount of time the connections have been active, set the key lifetimes in the policy longer. Good values for high-traffic Ethernet connections are greater than 50 MB and longer than five minutes.This is likely to significantly reduce bad SPIs.For more information about IPSec, see "Internet Protocol Security" in the Microsoft® Windows® 2000 Server Resource Kit TCP/IP Core Networking Guide.