Pin Me

Linux Recovery: Internet Connection Troubleshooting

written by: S. R. Obbayi•edited by: Eric Stallsworth•updated: 4/30/2011

Doing Linux recovery on Internet connections does not need to be as complicated as it may seem. It is just a matter of following some simple steps. This guide will show you how to recover Internet on Linux

  • slide 1 of 6

    Introduction

    It can be frustrating when your Internet connection goes down and you are unable to get it back up. As it is with Linux recovery, Internet connectivity may get disconnected at several locations. Not all those locations will be under your control as there are several parties involved whenever there is any Internet connection. This could include your ISP, the web server hosting the service you are trying to connect to or even your network administrator at your place of work.

  • slide 2 of 6

    Physical Internet Connections

    The first thing to do as far as Linux recovery on Internet connections goes is to make sure any physical network cables and or modems are properly connected to your computer. You will be surprised how many times Internet connection problems are as a result of loose cables or a powered down modem or switched off Wireless LAN.

  • slide 3 of 6

    Pinging the Network with Packets

    Assuming all connections are in place, the next thing you want to do is to ping one or two destinations by sending a few packets and see if you get a response. A response would mean that there actually is a connection. The response on a ping will also detect loss in data if any. This can be done through your Linux terminal by typing the following on the command prompt.

    ping <ip address or host name>

    An example of testing a connection to the Brighthub website would be:

    $ ping brighthub.com

    With no connectivity the response would print a request timed out message and display the percentage of lost packets otherwise it would return details of the response.

  • slide 4 of 6

    Performing a Trace Route on the Internet Connection

    While doing Linux recovery on Internet connections, using the tracert command gives you a more detailed insight into what is happening along the entire route it takes for your Linux computer to connect to the remote host. This would normally show how long it takes between nodes and any nodes along the way that are down will be able to be traced. Performing a trace route is a quick way to be sure that the problem is not localized on your computer, in which case no further action would be necessary from you.

    An example of a command for a trace route between your Linux computer and Brighthub website would be:

    tracert brighthub.com

  • slide 5 of 6

    Checking your Network Interfaces

    You can check the configuration of your network cards by using the following command:

    ifconfig

    This is only useful if you know what the configuration details are meant to be. Without which you cannot have access to the Internet. These details can be provided by your ISP at request.

    To make any changes to the configuration of your network card you can use a text editor such as Vi, Emacs or any other on your Linux computer. Using Ubuntu as an example: You can enter basic network configurations as follows.

    To access the configuration type:

    sudo vi /etc/network/interfaces

    To use DHCP, if you do not know your configuration details type:

    auto eth0

    iface eth0 inet dhcp

    then save and close the file.

    To use a static configuration when you know the configuration details type:

    auto eth0

    iface eth0 inet static

    address 192.168.1.90

    gateway 192.168.1.1

    netmask 255.255.255.0

    network 192.168.1.0

    broadcast 192.168.1.255

    replacing the addresses above with yours. Save and close the file.

    Next you need to restart the network interface by typing:

    sudo /etc/init.d/networking restart

    If everything is correct you should be able to have you network working and consequently your Internet should be fine unless the problem is originating from a remote location. Here is an alternate way to set up a wireless connection using puppy linux.

    There you have it, your Linux recovery on Internet connection done with these few steps.

  • slide 6 of 6

    References

    Source:

    Author’s own experience.

    Ubuntu, help.ubuntu.com