TROUBLESHOOTING NETWORK CONNECTIONS Summary Networking has seen a huge gain in popularity over the last several years. Prices for networking equipment have dropped, a whole slew of network products are available for both business and home networking, the majority of new PCs and laptops come equipped with network adapters right out of the box, and setup has become much easier. As a result, many computers are connected to office and/or home networks, both wired and wireless. As easy as it can be to set up a new network, networks can be complex and involve many parameters and components that can easily be misconfigured or fail. Troubleshooting a broken network connection can be a daunting task for the average user. Following instructions to set up a basic network from scratch is one thing - finding a problem is a whole different story. This article covers a number of typical scenarios of a PC connected to a network and offers a list of logical and straight forward troubleshooting steps for each specific scenario to make the troubleshooting process easier and take some of the scariness out of it. The instructions and troubleshooting steps found in this article are mainly geared towards computers running Windows 2000 or XP as they are currently the most common Windows operating systems connected to networks. While Windows 9x/ME can also be connected to a network, they are outdated versions of Windows and can be a pain in the butt to get to work on a network. However, even though the examples given are usually Win2K / XP commands, they either will work in other operating systems or have similar equivalent commands. Additionally, most of the troubleshooting steps are generic enough that they apply to other operating systems as well. When the instructions refer to checking a setting or configuration parameter for a certain piece of hardware such as a gateway device, they are purposely generic as every device is different. It is up to you to consult the manual and figure out how to get to the appropriate menu option or section. Contents - Summary, Networking Basics - Troubleshooting Essentials - Troubleshooting connection and configuration - Accessing network resources - Gateway configuration - Gateway firewall - Log files - Hardware failure - Conclusion Networking Basics Before delving into the troubleshooting process, it is important to understand the basic concept of networking. The purpose of connecting a PC to a network is to exchange data with another PC such as sending an email, viewing a web page, or copying a file. The other PC can be physically close such as in the same room (home network) or the same building (office network), or physically remote such as a web server in a different state or country. The Internet is nothing but a gigantic network of countless computers, all interconnected via a myriad of hubs, switches, routers, and firewalls. By connecting your PC to a DSL or cable modem or plugging into an office network you get access to this network and the ability to exchange data with a number of other machines that are on that network. To participate in a network, a PC requires the following components: - Operating system (or short OS) - Pretty obvious. Without an operating system installed such as Windows or Linux, the PC isn't good for much. - Network application - to participate in a network you need a program that can send and receive data over the network. This could be a web browser, an email program, an FTP client, a Telnet client, a game with multi-player capabilities such as Half-life or Quake, or a chat program such as Yahoo or IRC, just to name a few. - Network protocol - All operating systems usually automatically install a networking protocol, normally TCP/IP which is the most common network protocol. There are others such as IPX/SPX, but TCP/IP is by far the most popular one as the entire Internet and the vast majority of all home and office networks are based on it. - Network configuration - Every computer that wants to participate in a network, requires a number of pieces of information. Most importantly, it needs an address so it can be uniquely identified on the network. This is just like everybody with a telephone having a unique phone number. This address is called an IP address and could look like this: 10.0.2.25. It also needs a subnet mask which indicates the size of the network, the network number, and its broadcast address. It could look like this: 255.255.0.0. Then it needs the IP address for the gateway. This identifies the computer on the network that passes data back and forth between the network the PC is on and the next network segment. These are the absolute minimum configuration requirements to successfully configure TCP/IP for network connectivity. - Network adapter - Also known as network interface card (or short NIC) or ethernet adapter / card. This can be a PCI card inserted in the motherboard of a PC, a PCMCIA card inserted into a laptop, or an external adapter connected via USB. The network adapter can be either for a wired or a wireless network. - Driver - No matter which type of network adapter is used, it has to have a driver installed in the operating system. A driver is a small piece of software specific for each OS that is provided by the manufacturer of the adapter. It contains instructions and information that allow the OS to communicate with the network adapter and pass data and instructions back and forth. Depending on the OS and the type of adapter, the driver may be already provided and automatically installed. If not, it needs to be manually installed. - Network cable - If the adapter is for a wired network, a cable is required to physically connect the network adapter to a network jack in a wall, hub, switch, router, etc. A network cable is also often referred to as a Cat 5 cable, short for Category 5 which is currently the most common type of network cable. There are two main types of Cat 5 cable: straight-through and cross-over. This refers to the way the 2 of the 4 wire pairs inside a Cat 5 cable that transmit the data are arranged on each end. More details about this can be found in the Cat 5 Do- it-yourself article. - A functional network - Of course a working network is required to connect the network cable to. This can be a corporate network in the office, a small home network, or the Internet directly via a broadband connection such as DSL or cable modem. This network consists of more cables, hubs, routers, switches, etc. that all have to be configured and function properly for your data to be able to reach its destination and the reply to return to you. In a simplified manner, here's how a data transmission over a network functions. When an application wants to communicate over the network, it cannot access the network directly. It has to format its request according to the rules set by a protocol and pass it down. The request will be handled by several layers which are known as the 7 layers of the OSI model. Each layer will wrap and tag the data package and pass it on to the next until it is finally placed by the network card in form of an electrical signal on the actual wire and transported to the next stop on the way. The packet has to pass a number of "hops", which are routers that redirect it along the way to help reach its target. Depending on the location of the target, this could be just one or two hops if it's on the same network, or 20 - 30 hops if it is far away in a different state or country. At the final destination the packet is passed through all 7 layers, this time in reverse order, and finally ends up at the recipient. Here the request gets processed, the reply will be packaged and passed through all layers to be sent back to the originator. This whole process is pretty complex and could take a book to explain, which is beyond the scope of this article. The point of this summary is to present an idea of how many devices and wires the data has to travel to reach its destination. Given the complexity of networking and the vast amount of components and parameters involved, it's quite amazing that everything works together so well, enabling us to send and receive data from around the globe in a matter of seconds. However, once something breaks, this complexity comes back to bite us in the butt because there are so many things to check when troubleshooting a network connectivity problem. The only way to successfully troubleshoot is by following these four important steps: - Stay calm and focused - While the initial reaction to an unexpected network problem may be "Oh crap!", panicking won't solve anything. A clear head and focus is essential to successful troubleshooting. - Understand the exact scenario at hand - In order to fix something, you have to understand how it works, what components are involved, and how they work together. This knowledge is half the solution to the problem. - Be methodical and logical - Randomly poking around and changing things will make the problem only worse, not better. The best approach is to make a list of possible problem areas and then handle each item one step at a time: Make one correction, test whether it fixed the issue. If not, set it back the way it was, then move on to the next item. - Be thorough and don't make assumptions - Check every single component, leave nothing out. Don't assume it's not the network card because it was working yesterday. Maybe the computer got bumped and the network card became unseated from its slot. Don't assume it's not the cable because it's brand-new. Maybe your kid's pet rabbit chewed on it. You see where this is going. There are always unforseen circumstances beyond your knowledge that could be causing the problem. Make sure you check everything. Armed with this knowledge, it's time to move on to the actual troubleshooting process. Below are four common situations how a PC can be connected to a network. Pick the one that closest resembles your network, then proceed to the troubleshooting section. The majority of the steps are applicable to all four scenarios, but some of them vary depending on the network setup. In this case, the steps will refer separately to each setup. It is essential that you can identify the correct network setup and understand how the components are connected in order to successfully troubleshoot the problem. Scenario 1: PC -> DSL or cable modem Scenario 2: PC -> gateway device -> DSL or cable modem Scenario 3: PC -> Hub/switch -> Gateway device -> DSL or cable modem Scenario 4: PC -> company network Check the physical connection at the computer - Verify that the network cable is plugged in securely into the network card in the computer. Unplug and re-plug it to be sure it is plugged in tight and correctly. If this is a laptop using a PCMCIA card with a dongle, verify that the cable is connected to the dongle and that the dongle itself is connected securely to the network card. If the computer has multiple network cards, verify that the cable is plugged into the correct one. Check for a damaged or misconfigured cable - While checking the physical connection, examine the network plug on each end of the cable as well as the jacks they plug into. Make sure there are no bent or missing pins. Don't forget to try another cable to make sure the current one is not damaged. Excessive force such as sharp bends, knots or kinks can damage the wires inside the cable. As mentioned previously, depending on what devices are connected either a straight-through or a cross-over cable is required. A straight-through cable works for most situations though. Check the physical connection at the other end - Verify that the cable is plugged securely into the network port/hub/modem/walljack on the other end. If plugged into a hub or switch, check whether the link light is on. If the link light is not lit, it could indicate a bad/incorrect cable or a bad port. Try a different port on the hub or switch. Another thing to check with a hub or switch setup is to verify that the connection from the hub or switch to the next hop such as the gateway device or cable/DSL modem is working by checking the link light on both ends of the connection. If connecting to an office network, make sure the cable is plugged into the correct port. For example, there may be several ports, one for data, one for voice. Verify with the IT department that the data jack has been activated and is connected to the local network. Check the hardware for proper installation - If the network card is a PCMCIA card, verify it is inserted all the way into the correct slot. If it is a PCI card, verify it is seated properly in its PCI slot. If it is an onboard network adapter (built into the motherboard), verify that it is enabled via a jumper on the motherboard or a setting in the System BIOS. Make sure the network card is installed properly in the operating system. In Windows, check Device Manager for presence of the network adapter and verify that there are no conflicts or errors. To ensure there is no problem with the driver, download and install the latest driver from the manufacturer's website. Check the PC network configuration - In order to participate in a network, a network protocol has to be installed and configured properly. As mentioned above, the most common protocol is TCP/IP which is installed automatically by most operating systems. There are two ways to configure TCP/IP: Static or dynamic. Dynamic means that when the machine is connected to a network it will send a broadcast asking for configuration information. If there is a DHCP server on the network that observes the request, it will reply and send the machine the required information such as IP address, subnet mask, gateway IP address, and DNS server IP. In this case TCP/IP just needs to be set to obtain an IP address automatically (default configuration in Windows), no other configuration required. This configuration type is very convenient because it does not require any changes on the computer when the network configuration changes or when it is connected to a different network. Static on the other hand means that the user has to supply and manually enter this information into the TCP/IP configuration. Without the proper information the computer cannot participate in the network. Scenario 1 - PC -> DSL/Cable modem: Check with the ISP to find out whether they use dynamic or static IP configuration. Most DSL and cable modem plans use dynamic mode, therefore it's best to try DHCP first. Scenario 2 - PC -> Gateway device: Here it depends how the gateway device is configured. Again, the typical setup is DHCP enabled for automatic configuration, so try this option first, unless you have specifically turned DHCP off when you set up the gateway device. Scenario 3 - PC -> Hub/switch -> Gateway device -> DSL or cable modem: See steps for scenario 1 and 2. Scenario 4 - PC -> Office network: Contact the network administrator to find out whether the network uses dynamic or static IP addressing. Once again, DHCP is the most common configuration, so try that first unless the network administrator tells you specifically to use a certain static IP configuration. If TCP/IP is configured for DHCP, there is an easy way to check whether it has received proper IP configuration information. Open a command prompt by selecting Start / Run, typing cmd, and pressing Enter. Type ipconfig or ipconfig /all to get more detailed information and press Enter. The same information can be accessed in Windows from the network connection panel by right-clicking on a connection and selecting Status. While at the command prompt, run the command ping 127.0.0.1. This is the loopback address and tells the PC to send a packet to itself. It is a simple test to ensure that the TCP/IP stack is working properly on this machine. If this fails, you may have to repair or reinstall TCP/IP. Next, try pinging the IP address of the PC itself (the one you just looked up using the ipconfig command) to make sure the network card is working properly. If this fails, remove the network card drivers and reinstall it. Check for firewall software - Find out if the machine is running any firewall software such as Zone Alarm. If misconfigured, it could prevent the computer from requesting or receiving DHCP configuration. If firewall software is running, turn it off temporarily while troubleshooting to eliminate it from the list of possible causes for the failure. If the connection works correctly as soon as you disable the firewall software and breaks again as soon as you reenable it, you found your culprit. Check its configuration and correct any firewall or program rules that may be blocking the connection. Check connectivity to the next hop - When information is transported on a network, it is being handed from one station to the next like in a relay. If any of the stops along the way is broken or doesn't know where to relay the information to next, the entire chain breaks down. Therefore it is very important to methodically check the chain and identify where exactly the breakdown occurs. The illustration shows the hops for this particular setup. The ping and tracert commands are two simple but effective tools to check for such breakdowns. The ping command sends a number of test packets to the IP address or host specified and displays whether it received a reply and how long it took. If there was no reply, you know that the destination could not be reached. The tracert command is similar but it also documents all stops between the computer it is run on and the destination with times between hops. It will show where there may be a long delay or a complete breakdown along the way so you know where to focus your troubleshooting. Run the ipconfig /all command to find out the PC's IP address and the gateway IP. Look at the gateway configuration to find out the ISP's router IP address your gateway device points to. Now systematically ping every single hop by running ping (IP address) beginning with the one closest to your PC which is the default gateway. If you get a reply, ping the next one and so on until you have found one you can't reach, indicating the possible point of failure. Caveat: You have to take the ping results with a grain of salt. A failed ping does not necessarily mean a broken hop. It could just be a switch, router, or firewall that is configured to drop ICMP packets (which includes ping). If a traceroute to the destination goes past the device that doesn't respond to ping, it's probably not the point of failure you're looking for. Check DNS settings - If the network configuration checks out, but the problem is that you still cannot view any websites in your browser, the problem may be with the DNS settings. DNS stands for Domain Name Service which is the mechanism that translates a website address (URL) into the actual IP address of the webserver it resides on. When you type a URL into the address bar of your browser, it first makes a request to the ISP's DNS server to find out what the IP address for that particular website is. Once it knows the IP address, it then sends the actual page request to that server. If no DNS server is available, the name lookup fails and it cannot access the website. Test this from a command prompt by typing nslookup pcnineoneone.com for example. If DNS is working properly, you will see the IP address displayed. If it fails you will see an error message. Alternatively, if you happen to know the IP address for a website, type it into the browser's address bar instead of the URL and see if that pulls up the site correctly. Run ipconfig /all and check for the existence of at least one DNS server IP address. If there is no DNS server listed, run ipconfig /renew. If that does not obtain the proper information, the resolution depends on the TCP/IP configuration. If configured for DHCP / dynamic IP addressing, the DNS server should have been provided by the DHCP server together with the IP address and gateway. Scenario 1 - PC -> DSL/Cable modem: Contact the ISP for help. Scenario 2 - PC -> Gateway device: Log into the gateway device and check if it received the proper DNS server information from the ISP, as well as whether it is configured to pass it on to the clients on the network via DHCP. Scenario 3 - PC -> Hub/switch -> Gateway device -> DSL or cable modem: See scenario 2. Scenario 4 - PC -> Office network: Check with the network administrator to have the DHCP server settings checked. If configured with static IP information, check the TCP/IP settings and make sure that at least one valid DNS server IP address is entered. It is normal to have two or three DNS server addresses listed to have a backup in case a DNS server becomes unavailable. IP address conflict - It is possible to receive an error message that there is an IP address conflict due to another host with the same IP address present on the same network. This usually happens when two PCs are manually configured with the same static IP address. Scenario 1 - PC -> DSL/Cable modem: Check to make sure you entered the correct IP configuration as provided by the ISP. If that does not help, contact the ISP for further assistance. Scenario 2 - PC -> Gateway device: Check all PCs on the network and verify that they all have unique IP addresses. Scenario 3 - PC -> Hub/switch -> Gateway device -> DSL or cable modem: See scenario 2. Scenario 4 - PC -> Office network: Contact the network administrator for help. Tip: There is an easy way in Windows XP to "repair" a network connection. Navigate to Start / Control Panel / Network connections / Right-click the problematic connection / Repair, or double-click on the network connection icon in the system tray if present and select Support / Repair. This performs the following actions to attempt restoring the network connection: It broadcasts a DHCP request, flushes the local ARP (Address Resolution Protocol), NetBIOS, and DNS cache, and reregisters with WINS (Windows Internet Name Service) and DNS. If it encounters an error in the process it will display it on the screen when it's done, providing a potential clue. MAC address conflict - A MAC (media access control) address is a unique identification number that is assigned to each network adapter and is used to route network packets between nodes on a network. It uses the hexadecimal format and could look like this: 00-90-4B-B2-1A-86. ipconfig /all will list the MAC address for the network adapters in a computer. Any manufacturer of network adapters hardcodes a MAC address in each adapter, drawing from a range of addresses assigned to them. The first half of the MAC address identifies the manufacturer of the adapter, the second half uniquely identifies the adapter. It is extremely unlikely but theoretically possible that two devices on a network have an network adapter with the same MAC address. Because this scenario is so rare and requires advanced troubleshooting it is beyond the scope of this article. Check for required authentication - On a corporate network network access may require additional authentication. e.g. a certificate, VPN, RADIUS, EAP, etc. It may also have MAC filtering, allowing only computers on the network whose MAC address is on a list of approved nodes. Wireless network configuration - Troubleshooting a connection to a wireless network involves a few additional parameters to check against the configuration of the wireless access point. Each wireless network has a network name or SSID (Service Set Identifier). Check the properties for the wireless network configuration and verify it has the correct SSID entered. Wireless networks, when properly configured and secured, usually use encryption. Check whether the wireless network you're connecting to uses encryption and if so, ensure you have the correct encryption key entered. Wireless networks also may be restricted to only accept connections from computers with an approved MAC address. Check whether this is the case and if so, whether the MAC address of your computer is on the access list. Accessing network resources A common scenario of network problems is trying to access resources on a different computer over the network, e.g. copying files from a laptop to a desktop machine, backing up folders to a hard drive on another computer, sharing photos or music stored on one computer with other computers on the network etc. The following is a list of most common configuration problems. Check the Workgroup - On each machine, right-click on My Computer, select Properties and make a note of the workgroup. In order to see each other in a peer-to-peer network, all computers must be in the same workgroup. Change all computers to the same workgroup, reboot, and try again. This does not apply to a domain-based network. Check File and Printer Sharing - Check the network connection properties and verify that File and Printer Sharing is installed. If not, add it and reboot. Supply the proper authentication - Depending on how the resource you want to access is set up, you may have to authenticate yourself first to the other computer. If you receive a dialog box asking for authentication when trying to access a share on another computer in Windows Explorer, enter the computer name you wish to access, a backslash (\), a username from that computer, and then the appropriate password in the password field. Example: You are working on a computer called HomePC1. You are logged in as user MaryG. This user account exists only on the computer HomePC1 and is therefore called a local account. You are using Windows Explorer to browse the network neighborhood to a computer called HomePC2 to access files on a share called Documents on that machine. You find the computer and that share, but when you click on it, you get prompted for authentication. The reason for this is that apparently the share does not allow access to anybody, but only to qualified users. It prompted your PC for authentication information and it replied with the account you're logged in as, MaryG. Since that did not match, it asks you now for another user account. You have a user account on the computer HomePC2 called JackS with the password 12345. To authenticate, you type HomePC2\JackS in the username field and 12345 in the password field. After pressing Enter, you are able to access the share now since JackS has rights to access it. Alternatively, you can also use a command-line to map a network drive to the desired share on that computer. Open a command prompt and type the following command: net use * \\HomePC2\Documents /user:HomePC2\JackS 12345 This will map the next available drive letter to the share Documents on the PC called HomePC2 and use the account JackS with the password 12345 as authentication. Windows Explorer will now show a new drive letter that points directly to that share. In a more advanced office network there will be a domain. A domain means managing user accounts and permissions on computers belonging to the domain centrally instead of on each individual computer. This allows users to use a single user account to gain access to network resources on multiple computers on the domain and gives the administrator the ability to tightly control what type of access rights users have to what resource. If you run into problems accessing a network resource on a network that is managed with domains, you should contact the network administrator for assistance. Gateway configuration A gateway is the next configurable device in the chain of hops along a network path from the PC that will redirect the transmitted data to the next hop depending on its configuration. This is usually a router. Scenario 1 - PC -> DSL/Cable modem: The gateway is on the ISP's network and cannot be accessed or configured by the user. If everything checks out on the PC and the problem seems to be at the next hop, the ISP's gateway, contact the ISP for assistance. Scenario 2 - PC -> Gateway device: Log into the gateway device and verify that its public interface / the WAN link is configured properly with the values provided by the ISP, i.e. the IP address and subnet mask, gateway IP address, DNS server IP address (if statically configured) or set up for DHCP and has received this information from the ISP's DHCP server. It is very common for cheap DSL lines that they are "on demand" connections, meaning they are only active when you need them, which is more economical for the ISP for several reasons such as bandwidth and IP address allocation. In this case the ISP usually requires you to contact them and announce that you want to initiate a connection before they will give you the necessary information. This is usually done via PPPoE (Point-to-Point-over-Ethernet). If your ISP uses this method, you will need to select the PPPoE option in your gateway device and enter the necessary user login information provided by the ISP. Scenario 3 - PC -> Hub/switch -> Gateway device -> DSL or cable modem: See scenario 2. Scenario 4 - PC -> Office network: Check with the network administrator to have the gateway / router checked. Gateway firewall Scenario 1 - PC -> DSL/Cable modem: n/a Scenario 2 - PC -> Gateway device: Gateway devices for home and small office networks usually include a firewall of some sorts. Check the firewall rules and verify that there are no custom rules that may be blocking network connectivity. Use the reset to default option if available. Scenario 3 - PC -> hub/switch -> gateway device -> DSL or cable modem: See scenario 2. Scenario 4 - PC -> Office network: n/a If everything checks out within the network and up to the gateway but fails after that, the problem most likely lies with the ISP. Contact the ISP to report the problem and get assistance. Before you call, make sure you have all the information handy that you gathered during your troubleshooting, and explain the troubleshooting steps you have already done. This will make their job easier and help resolve the issue. If this is an office network, contact the network administrator instead. Log Files When troubleshooting computer problems, the chances are good that there may be important clues recorded in log files. For example, Windows keeps several log files where it records system, application, and security information including error messages. You can access these logs by right-clicking My Computer, selecting Manage, then navigating to Computer Management / System Tools / Event Viewer and clicking each log. Another log to consult is the firewall log. If you have a software firewall running on your PC, open it and look for a log. If you are using a gateway with a firewall, access its admin console and look for a log. Either one will most likely have entries for blocked network traffic that will give you a clue what was blocked why. Hardware failure Last but not least, if you have triple-checked that everything is configured properly but it still doesn't work, also consider the possibility of a hardware failure. Maybe a port on your hub/switch/gateway device is bad, so try another one. Does the device even have power? Maybe its power adapter failed. Is it hot to the touch? Maybe it overheated. Unplug it for 10 minutes and let it cool down, then try again. Maybe a power surge scrambled its memory. Unplug it for five seconds, then plug it back in again and try again. Try resetting the device to factory defaults. Maybe the suspect device that you identified by process of elimination is fried altogether. Replace it with a different one and see if that corrects the issue. Conclusion Boy, that was a lot of information, wasn't it? Hopefully you have learned a lot about the basics of networking and got a better understanding of what makes a network tick. In addition, you should now realize that troubleshooting a network connection is a pretty logical process and that there are many things you can easily check yourself to resolve the problem yourself within a reasonable amount of time. http://www.PCNineOneOne.com