I've already set up ADSL and used it already for a system update, so I'm sure the set up is ok but pacman suddenly stopped working and when I checked ping wasn't working too. How can I find out what went wrong and how can I fix it?
IP Network Troubleshooting
There are a few standard things you can look for when you are experiencing network connectivity issues. These are listed here from a top-down, or least fundamental to most fundamental issues.
All the example
Is access down to one site and not others?
If you've just noticed a website or service is down, try others before concluding that you are the one experiencing problems, and not the website you are trying to visit.
Is DNS not working?
DNS resolves domain names to ip addresses. If it isn't working, you may be able to access services by ip address but not domain names. To test for this, use
184.108.40.206 is the IP address of a Google server on the internet that should always be up; it can be replaced by any IP address known to be on the target network. This command sends two ICMP echo packet to a specific IP address; it doesn't rely on DNS to work. If the command works, replace the IP address with a domain name known to be working on the target network, like
Is there a route to the network?
To reach a network, your system has to know how to route to it. To see the routes your system knows about, we need a couple of commands.
This command lists any routing rules that are setup on your system. If you see only three entries (lines) and they end in 'local', 'main', and 'default', then you have only the standard rules setup. If there are any other entries, note them; in particular, the last word of the line – they are names of routing tables.
This command shows routes setup on the main table. There should usually be an entry that directs traffic to the target network. For internet connections, it is a route that looks like
Previously I said that there should usually be an entry there. If you had other tables setup and a rule pointing to them to look at the entries in other tables by using the following, replacing
If you do not have a route to the target network, you need to add one (or modify your network setup so it automatically adds the correct one for you). If you don't know how, ask a more specific question here, armed with this knowledge.
Is the network interface up?
To be able to use a network interface it has to be up and it should have an address. You can find if it is up by using:
This lists the network interfaces on your system. You should see at least two, one called "lo" and another entry for each network interface on your system. If you have a wired and a wireless interface, you might see 'lo', 'eth0', and 'wlan0' or 'lo', 'eth0', and 'eth1' whatever they are – that first bit after the entry index is the name of the network interface. For each of the interface entries, you should also see either 'state UP', 'state DOWN', or 'state UNKNOWN'. If the network interface that is connected to the target network is not present, it can be that the hardware driver isn't loaded or working (for actual network cards) or for PPP connections, that there is no connection established. If it says the link is down or unknown, the interface needs to be brought up. This is usually done by your system's networking setup – if it's not up, you can ask a more specific question here with this in mind. It can be done manually by the following command, replacing
Does the network interface have an address?
In addition to having the interface up, it needs to have an IP address. You can find the addresses of your interfaces by running the following command.
You'll see an entry for each of your interfaces with all the addresses it has. Most entries will have a link address, the important part is the IP address. There should be a line labeled 'inet' with an address for the network interface connected to the target network. It should be added automatically by your networking setup; if it wasn't, a dhcp client may not be running, or the ppp daemon may not have added it – you should ask a more specific question here with this in mind. One can be added manually (but depending on the network may not work) by the following command, replacing