Friday, February 19, 2010

Basics of Networking - Part 4 (Debugging Basics)

The past posts on the blog were on the basics of networking....
Now we are about to see how can we debug is something is wrong in the setup.

The following posts will help to debug faster.
  1. Basics of Networking - Part 1 - Assigning IPs
  2. Basics of Networking - Part 2 - Connecting Internet
  3. Basics of Networking - Part 3 - Internet through Proxy
The default way to go through the debugging will be the following way.
This approach starts to analyze the problem from the PC where the problem is found.
  1. ping 127.0.0.1
    If fails, check do the network services are started.
  2. ping assigned IP.
    If fails, check the network cable is properly plugged-in
  3. ping gateway
    If fails, check the gateway is on and the IPs are in same subnet.
  4. ping DNS / Name servers. (Only if routed / NAT is available)
    If fails ping the same from gateway.
  5. ping the gateway of the gateway from the gateway computer.
    If fails, check do you have the broadband signals / link is up.
  6. All works but still can't connect?
    try tracepath / traceroute with a google.com or yahoo.com
    Find at which level it fails.....
Most probably the debugging the issues are based on what problems we have...
Remember a blind issue of internet not working is OK to hear from others... but not when we are working in detail.
So here are some FAQs....

  1. Could not ping Gateway but my network wires are properly plugged.
  2. Gateway pings but could not resolve host names.
  3. I use a proxy. My http connection works but not https and ftp.
  4. SSH connections are not working after introduction of proxy.
  5. I use proxy. DNS name resolving works in the browser but fails in the terminal.
  6. Internet works through browser, but can't ping any IPs / Hosts in the internet.
1. Could not ping Gateway but my network wires are properly plugged.
This may be due to improper IP assigning. We need to make sure that the IP of the PC and the gateway are in same network. (i.e are they in same subnet...). Theoretically they should be ping able to fix this issue. (Please refer the post assigning IPs)

2. Gateway pings but could not resolve host names.
This is due to improper DNS configuration. Is it possible to ping the DNS servers? If yes we need to be sure, they are really DNS servers ;-). If not ping able, we need to know do the DNS servers IPs are in our range of IPs (Within our subnet) or not. If the IP is within our subnet we may need to verify the DNS server configuration to make it work right. If the IP is out of our network. We may need to ping the DNS server from the gateway PC, i.e sometimes the gateway of the gateway might have network issues not letting us to connect to Internet....

3. I use a proxy. My http connection works but not https and ftp.
The proxy server has different way to support different protocols. Some proxy servers use same port for all kinds of requests. If so the client setting should have same proxy setting for different kind of services. Some proxy servers block may not serve certain protocols, better check the proxy configuration to very the supported protocols.

4. SSH connections are not working after introduction of proxy.
If the client is PuTTy we can configure the proxy settings in the PuTTy. If the client is a linux terminal and we have the problem only for SSH. we need to use http proxy for SSH, tools like corkscrew with ProxyCommand in linux will help. The other workaround is to support NAT in the gateway so both proxy and NAT.

5. I use proxy. DNS name resolving works in the browser but fails in the terminal.
When the browser works with proxy, the name resolving happens in the proxy server while when we try in terminal we have the name resolving based on the DNS server settings in the IP / Network configuration, May be NAT is disabled in the network so we cannot resolve the DNS directly from the current PC.

6. Internet works through browser, but can't ping any IPs / Hosts in the internet.
This is similar to the previous question, enabling NAT will support pinging from any PC in network, The internet works in browser because of the Proxy settings.

The above are not the complete list of problems that might come... they will change according to the network and the usage of network services. The NAT / Proxy has its own advantages and disadvantages where the issues are because of them... Planning the network again falls on what kind of services we use and the debugging procedure remains the same, how big the network is.

Will keep you posted on some new network services and setting up a right infrastructure.

No comments:

Post a Comment