Chapter 4
IN THIS CHAPTER
Troubleshooting with Windows Network Diagnostics
Repairing individual network connections on Windows Server
Identifying and fixing common network configuration errors
Troubleshooting with command-line utilities
Using third-party troubleshooting tools
It never fails: It’s Friday and you’re getting ready to head home. Just as you’re leaving, you get a call that there is a networking issue on one or more of your servers. Maybe your systems are down. Maybe they’re intermittently up and down. Your mission, should you choose to accept it (do you have a choice?), is to find the issue and fix it.
This chapter covers some of the built-in troubleshooting capabilities of the operating system and some of the more common configuration issues you may experience with new systems and older systems.
Sometimes the network issue is super obvious, and sometimes it isn’t. For instance, your server may indicate that its network cable is unplugged, yet when you look, there is still a cable plugged in. That could mean you have a bad cable. a bad switchport, or a bad network interface card (NIC) on the server. Those are hardware issues, and unfortunately, you’re on your own when you’re troubleshooting hardware issues. Software issues on the other hand, can be addressed with the Microsoft Windows Network Diagnostics. Follow these steps:
On the Status page, scroll down and select Network Troubleshooter.
You’re asked what type of networking problem you’re having, as shown in Figure 4-1.
Type the URL for the website you’re having trouble with and click Next.
The wizard checks for problems. If it doesn’t find one it will let you know that it could not identify the issue. If it does find an issue, it will suggest how to fix the issue and in most cases can fix it for you.
There is an additional method to launch an Internet-specific troubleshooting tool. This tool is not focused on internal network issues. It’s focused specifically on Internet connectivity issues. To get to the Internet Connections troubleshooting tool, follow these steps:
Select Troubleshoot My Connection to the Internet.
The utility will reach out to a Microsoft site. The Internet Connections wizard will check for problems. If it doesn’t find one, it will let you know that it couldn’t identify the issue. If it does find an issue, it will suggest how to fix the issue and in most cases can fix it for you.
You can work directly with the network adapter that is having the issue. This can be very beneficial if a system has multiple network adapters and you need to test them one at a time. The software utility that Microsoft provides is pretty good at finding software issues like disabled adapters and misconfigurations. Follow these steps:
Right-click the network adapter you want to check and select Diagnose.
The Windows Network Diagnostics wizard launches and tries to find an error. If it’s successful, it will let you know what issue it found. In my example in Figure 4-3, it has found that the network adapter is disabled, and that the repair needs administrator permissions.
Click Try These Repairs as an Administrator.
The wizard automatically repairs the connection.
Of course, just because a system is having a network issue, it doesn’t mean that there is a software issue. Hardware issues can be harder to track down because the troubleshooting utility won’t really be able to help. Here are some common issues that can affect the network connections on a system:
If the Windows Network Diagnostics Wizard doesn’t find anything wrong, there are a few more things you can try. Each of the following commands needs to be run in the Command Prompt. Follow these steps:
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
There are a few additional commands that can be useful when troubleshooting from the Command Prompt.
ping
: The ping
command gives you simple feedback. It lets you know how many packets it sent, how many packets it received, and what the latency was between the sending and receiving. By default, ping
will send four packets, but you can adjust the number of pings, or make it a continuous ping if needed. (See Figure 4-4 for an example of ping
.)tracert
: The tracert
(trace route) utility can help you pinpoint where a problem exists. It reports back along each hop until it gets to the destination that you specified. By default, it will go to a max of 30 hops.pathping
: Works very similar to the tracert
command and can provide information about network latency and network packet loss.telnet
: Can be used to test if a certain port is open. You need to have the Telnet client installed for this to work. Your security team may not be happy to find Telnet on a system, so make sure that you aren't violating company policy by installing it. Many systems have been configured to not display banners — if you don’t get an error, you were probably successful in connecting to whichever resource you wanted to test.Network issues can be very frustrating to troubleshoot. You may find that everything looks just fine, and you aren’t sure what’s happening. If you suspect that Windows Firewall is the issue, you can use Event Viewer to see if Windows Firewall has blocked traffic to or from your server. Follow these steps:
Double-click Firewall.
When the Windows Firewall blocks something, you’ll see a message similar to Figure 4-5.
If you can’t find anything that was blocked, you can temporarily turn off Windows Firewall to see if that will resolve the issue. Just make sure that doing so isn’t against organizational policy before you attempt it.
To turn off the firewall, follow these steps:
netsh advfirewall set allprofiles state off
To turn the firewall back on, follow these steps:
netsh advfirewall set allprofiles state on
Server hardware is usually pretty reliable. Some issues may be caused by problematic hardware, but most often the issue stems from a misconfiguration of some kind.
In the following sections, I walk you through some common issues that system administrators have to deal with.
Symptom: You get a message stating that there is a duplicate IP address on your network.
Solution: The best solution is to use Dynamic Host Configuration Protocol (DHCP) so that IP addresses are assigned and tracked automatically. If you don’t have DHCP in your environment, try to use another IP address.
Symptom: Your system is able to communicate with other systems in the same subnet, but it can’t communicate with anything outside of the subnet.
Solution: Set a default gateway address. This will tell the system where to send traffic to if the traffic is not destined for a system on the local network.
Symptom: You can’t resolve names like www.dummies.com
, or when you try to join to an Active Directory domain, you get a message that states that the domain name can't be found.
Solution: Set the appropriate DNS servers for your network. This will allow you to do internal name resolution. If your system is going to be joined to an Active Directory domain, it requires a valid entry for a DNS server.
Symptom: The system is on the network, and basic functionality like ping and file sharing work. The application on the server is not responding to network requests.
Solution: Check to see if the Windows Defender Firewall is enabled. Verify that there is a rule that allows the traffic that is supposed to be going to the application. It’s amazing how often this gets missed when provisioning applications.
Symptom: The hardware looks good, the Windows Network Diagnostics utility says it can’t find a problem, but your system is still unable to communicate over the network.
Solution: Check your IPv4 settings. It is very easy to mistype an IP address or a subnet mask. If either of these is incorrect, your system won’t function properly.
Some third-party utilities can be very handy in helping you find network issues. Table 4-1 lists a few of my favorites. Some are free, and some cost money. In general, free products may have no or limited support, so you may want to consider that if you choose to look at third-party tools.
TABLE 4-1 Network Troubleshooting Tools
Tool Name |
Cost |
Description |
Website |
Cacti |
Free |
A network monitoring utility that can be used to create highly customizable graphs. |
|
Nagios Core |
Free |
Basic network monitoring with tons of plug-ins and add-ons available to expand its usefulness. |
|
Nagios Network Analyzer |
$1,995 |
Provides network analysis, monitoring, and reports on bandwidth utilization. |
|
Nagios XI |
Starts at $1,995 |
A monitoring solution for applications, services, and networks. |
|
SolarWinds ipMonitor |
Starts at $1,495 |
Gives a nice simple up/down console for networks, servers, and applications. |
|
SolarWinds Netflow Traffic Analyzer |
Starts at $1,915 |
Analyzes netflows for issues and monitors for bandwidth usage. |
|
SolarWinds Network Performance Monitor |
Starts at $2,955 |
Monitors the performance of the network and alerts you to issues. |
|
Wireshark |
Free |
A packet sniffer that allows you to filter on the types of traffic you want to see and reconstruct whole TCP/User Datagram Protocol (UDP) streams. It can also show you at a glance if you have lots of retransmissions occurring on the network. |