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.

Thursday, February 04, 2010

Basics of Networking - Part 3 (Internet through Proxy)

Hurray.... My network is UP........
Hurray.... My Router shares the internet connection.......

Do I need a Proxy?
A good point that makes us to think. Do we need a proxy? When the router shares the internet. Why do we need a proxy?

If the ADSL modem is our router. We need to think about proxy based on our network size. Sharing about hard learning, we felt the router was extremely good to share internet connection acting as a gateway. But when the network size started to grow we faced frequent network connection drops.... Why?

The ADSL Router was not good enough to handle the too many requests from different machines. May be this is not the case for all the routers but our router did this to us (The router is a least version provided by the ISP, not designed for high traffic).

Whats up next?
Let the internet connection be bridged. Let the PC take up the load....
Let the PC take up the Proxy......


Yes. We are to the topic now.......... Let us know about proxies to get internet shared in the network.

What is a Proxy?
To keep it short. It is an application that acts a layer in between our application (browser) and the web server.

Let us understand the network now.
All the PCs are in same sub-net
PC - A - 192.168.1.1
Laptop - 192.168.1.2
PC - C - 192.168.1.3

Gateway for all should be 192.168.1.1 (PC A, should not have a gateway)

The PC A is running on Windows.........
It has two NIC (Network Interface Card). The first one connects to the ADSL router for Internet connection using the bridging option. The second one now connects to the local network with the IP 192.168.1.1

To make the internet connection simple, use AnalogX Proxy.
Download and install it. When we run it... We see it runs on a Port 6588.

Yes it listens on 6588 Port on 192.168.1.1
We need to say this in our browsers and other internet accessing application like GTalk, Skype, Yahoo Chat and more

Click here to know on how to configure your browser.

Do we need to go only with AnalogX?
No not at all.....
We have too many proxy software with very advanced operations.

Are you having a SOHO (Small Office / Home Office) Network?
Wanted more than a normal proxy?
Still wanted the NAT(Network Address Translation) Feature of the ADSL router with a PC as a gateway?
Wanted more features of Proxy, Firewall and Advanced gateway?

The answer would be, try IPCop-Linux........

When the network grows..... Want too many things to do for internet?
Keep watching..... We will see, how to load balance internet connectivity with multiple Internet connections and multiple proxy servers. There are more to come, for now will go with basics in the network.