Thursday, May 3, 2007

Debugging a wired Internet connection

Last updated: June 11, 2007
Most Internet connection problems occur using WiFi, but a wired Ethernet connection can also fail. These are some debugging steps to take when an Ethernet based Internet connection isn't working.




Some of this is techie, but I'm working on expanding the explanations of the various steps to make them usable and understandable to more people.

The assumption here is that the router and broadband modem are different physical devices, but the concepts are the same even if they are integrated into a single device.


Technical Background (Added May 6, 2007)

If you are not a techie, this section should provide enough background for you to understand the rest of the steps and procedures.

Computers on the Internet address each other by number. People, of course, address computers on the Internet by name. The "thing" that translates names (google.com, javatester.org) into numbers is a huge system called DNS (Domain Name System). When you can't access a computer on the Internet by name, the problem may be network related, preventing you from in reaching the computer -or- the problem may be in the DNS system. Every request for a computer by name involves an under-the-covers call to the DNS system to translate the name into a number. These calls into the DNS system happen so quickly, you don't notice them.

Network computer nerds don't call the numbers assigned to computers on the Internet numbers, instead they/we use the term "IP address". Simply put, every computer on the Internet has a unique IP address.

Further confusing things for normal folk is the fact that IP addresses are not written like normal numbers. The format used is something like "1.2.3.4". That is, there are four sets of numbers separated by periods instead of commas. IP addresses come up often when debugging Internet connection problems.

You can see the magic of IP addresses by using them to access a web site. For example, you can get to my computergripes.com web site with http://216.92.35.29

To translate a domain name into an IP address your computer makes a request to a computer run by your ISP called a DNS server (a large organization may run their own DNS server computers). This is so important that the standard is to have two available DNS server computers, in case one breaks. I mention this because you must be able to talk to the DNS server of your ISP to reference anything on the Internet by name (referencing a computer by IP address does not involve DNS at all).

For a computer plugged directly into a broadband modem, make a note of the IP addresses of the two DNS servers provided by your ISP. In Windows XP: Control Panel -> Network connections -> Right click on the appropriate connection and get its status -> go to the Support tab -> Click on the Details button. While there also write down the IP address of the default gateway computer.

A computer on a LAN, plugged into a router may be configured to use the DNS servers of the ISP -or- it may be using the router as its DNS server. In the latter case, the router simply passes the DNS request on to the DNS server of your ISP and then passes the response (an IP address) back to you. If your computer(s) is using the DNS servers of your ISP fine. If the router is being used, then log into the internal website in the router and try to find the IP addresses of the DNS servers of your ISP. While there, also make a note of the IP address of the "Default Gateway" computer.

Terminology: Broadband modem refers to either a cable modem or a DSL modem.


Ahead of time

Planning for connection problems should go a long way to debugging them when they occur.

Make a cheat-sheet documenting the normal state of the lights both on the broadband modem and the router. That is, note which lights are normally on, off, blinking, green, orange, etc when things are working. Keep this on paper right next to the router so it can't get lost.

Have a list of some website IP addresses handy (feel free to use the one for computergripes.com above). There is a simple way to learn the IP address of a given website: open a DOS/command window and type "ping myfavoritewebsite.com" without the quotes. The IP address is after "Reply from". The IP address of a website can change over time, so its best to have a few on hand.

www.yahoo.com 66.94.234.13
www.microsoft.com 207.46.197.32
system.opendns.com 208.67.219.60
www.cnet.com 216.239.113.101

Make a note of your DNS server IP addresses and the IP address of the TCP/IP default gateway. The default gateway is the machine between your ISP's internal network and the outside world and may be very handy in narrowing down the problem. Keep it on paper next to the router.

Write the routers IP address and the userid/password for the internal router website and keep it on paper next to the router.

Have an extra router and extra Ethernet cables.

Place an icon in the system tray (a.k.a. notification area, the bottom right corner of the screen, just to the left of the time) for your network connection(s). This tells you at a glance whether Windows thinks the network is connected or not. In Windows XP you do this with: Control Panel -> Network Connections -> Properties of the network connection. Turn on both the checkboxes at the bottom of the General tab (put an icon in notification area when connected and warn me about limited or no connectivity). If there is a red X over the network icon, Windows knows there is trouble. Hovering the mouse over the icon when all is well, provides some useful information.

Have two web browsers available. The only way to tell if your web browser is the source of the problem is to try and access websites using a different browser from the same copy of Windows. Needless to say, Firefox users already have two browsers. For IE users, I suggest the portable version of Firefox available from portableapps.com. Portable applications don't have to be installed, thus minimizing their impact on the system. In other words, Windows doesn't know it's there. Portable applications exist totally in a single folder (making it easy to move them from computer to computer).


When it breaks

Start clean: turn everything off and leave it off for a minute. Then turn on the broadband modem and wait a minute for it to talk to the outside world. Then turn on the router and wait a minute for it to talk to the modem. Then turn on your computer.

Look at the lights on the broadband modem and router to see if they are normal. If the lights on the modem are not in their normal state, then call your ISP. Some ISPs will help with the router, some won't. The lights being wrong in the router only matter if the lights in the modem are normal.

Check the network icon in the system tray. If it has a red X over it, then Windows knows there is something wrong. Try disabling and then re-enabling the network connection.

Try unplugging and replugging all cables.

Try using a different port on the router.

Try using a different Ethernet cable.

Look at the the Ethernet wire at the point where it enters your computer. If it can talk to the router at all, there will be a light or two right next to the plastic connector. And when I say right next to, I mean a few molecules away from the plastic connector. If you see a blinking light then the hardware is working, at least at the lowest level, which is Ethernet.

Also try another computer connected to the router. This will tell you if the first computer is the problem or if the router is.

If the router appears to be the problem:
Try directly connecting to the broadband modem - after turning on your firewall program.
Try an alternate router

If Windows does not see a problem with your network connection, then turn off the firewall program that is running in Windows. Also shut down any anti-Spyware and anti-virus programs. In fact, shut down any and all programs that you can. The general idea is simplify, simplify, simplify until things work again.

Try to access the website inside the router (we saved the IP address of the router for just this reason). This should tell you which side of the router is the problem. If you can get to the website in the router, then you will be prompted for a userid/password. No need to actually log-in.

If you can get to the website in the router, then try accessing websites by their IP address. If websites work by IP address but not by name, then the DNS system is the problem. Your ISP should help with DNS problems, but one thing you can do is wipe out the temporary cache that Windows maintains for DNS. From a Command window (a.k.a. DOS prompt) enter this command: "ipconfig /flushdns". Then try accessing websites by name again.

Also, there are times when one type of Internet activity is blocked but others will work. To narrow down the problem, try email (using software on your computer, not a webpage), FTP, ping, tracert, etc. both by name and by IP address.

If you can get to the router but not the outside world, then log in to the website in the router and:
-Reboot the router.
-Turn off logging and UPnP and remote administration in the router.
-Make sure the firewall is on in the router.
-Update the router firmware.

You may be able to get out of the router, but not to the Internet at large. That is, you may be getting trapped in the internal network of your ISP. To see if that's the case, try ping and trace route to both your normal DNS servers (both of them) and the default gateway. Do this by IP address, not by name. If you can't get to these machines by IP address, the problem is not DNS and not the Internet. In this case, your ISP should be able to help as they are on the hook for access to their DNS server machines and their default gateway machine.

Whew.

No comments: