Home > Articles > Operating Systems, Server > Microsoft Servers

  • Print
  • + Share This
This chapter is from the book

Tools: Command and Conquer

Cool! We're done with the theory behind Windows networking; now, armed with your knowledge, you know enough to make effective use of the tools that I introduce in this section. I'll start with network-layer diagnostics, and then move on to resources and process tracing tools.

ipconfig and winipcfg

Your basic IP configuration can be shown using ipconfig (Windows NT family) or winipcfg (Windows 9x family).

Both of these commands enable you to manually release or renew your DHCP lease, or to display basic TCP/IP information, whether or not your station has been configured for DHCP.

If you're using Windows 9x, you should actually use winipcfg /all because this shows all configuration, not just the IP address and netmask. Here are some other useful command switches for the Windows NT family:

  • ipconfig /all—Shows all configuration info, not just IP address and netmask. (See Figure 12.4.)

  • ipconfig /release—Releases DHCP addresses for all adapters (specify an adapter name to avoid all of them).

  • ipconfig /renew—Renews DHCP addresses for all adapters (specify an adapter name to avoid all of them).

  • ipconfig /flushdns—Windows 2000 and above only, flushes the local DNS cache. This is extremely useful if you have made a DNS change and need it to propagate to this workstation. (If you don't do this, the change won't show up on your workstation for a while.)

  • ipconfig /displaydns—Windows 2000 and above only, shows the DNS cache. Useful to see if "what you get" is what the server is actually distributing.

Figure 12.4 ipconfig /all output for a Windows XP workstation.

Insanely Useful Basic TCP/IP Diagnostic Commands

If the problem is more thorny than a configuration issue, it can be useful to know the perspective of the problem workstation; that is, what the workstation can see, what it cannot see, and the state of various informational commands as run from that workstation. You can use various informational commands, as listed in Table 12.1, to see the workstation's perspective on the network (these commands apply for both Windows 9x and NT families).

Table 12.1 Useful Basic TCP/IP Diagnostic Commands

Command

Description

arp -a

Displays the MAC-to-IP address translation table.

netstat -rn

Shows TCP/IP routing table (numerically).

netstat -an

Shows all TCP/IP sockets in use (numerically) for all clients and servers.

ping hostname or address

Checks basic IP connectivity with hostname or address.

tracert hostname or address

Traces the route that a packet takes from the current workstation to hostname or address. Shows each router that the packet goes through on its way to hostname or address.


All these commands are more or less lifted from UNIX; rather than redundantly discuss them here redundantly, let me point you to Hour 13, "UNIX and Linux Troubleshooting," for examples of their use in basic TCP/IP troubleshooting. Note that many more command switches exist than are listed here. Remember that the /? usually shows what other switches are available for a given command—play around a bit, and you'll discover some more useful things for your environment.

More Useful Network Diagnostic Commands

Of course, maybe you've already checked basic TCP/IP, and you're pretty certain that the problem doesn't lie here. If the finger is pointing at Windows itself, check out the diagnostic tools in Table 12.2. Some of them (the ones marked with a *) are from the Windows Resource Kit—which I highly recommend that you get, if you're doing a lot of Windows troubleshooting. The Resource Kit is not only a source of tools, it is an excellent source of additional Windows knowledge; just don't expect to get through it in 24 hours.

Table 12.2 More Useful Network Diagnostic Commands

Command

Description

netsh

Interactive command-line utility that allows you to list and change network-layer configuration. (Two hints: First, type int ip when you first enter the program; these options are the most useful day-to-day. Second, typing ? at any time shows available options.)

net session

Shows all Windows networking sessions (shares and so forth) active on this machine.

net share

Lists all Windows shares that are available on this machine.

* service.vbs /L /S monster

Shows status of all Windows services on the "monster" server.

* service.vbs

 

* netset /display

Shows a list of network components (that is, network protocols and basic services) that are associated with network interfaces.

* srvinfo //server

Connects to a remote or local server and shows uptime, protocols, network cards, service packs, hotfixes, drive space available, and so on.


  • + Share This
  • 🔖 Save To Your Account