Almost every time I install Ubuntu on any laptop there are some problems with connecting to the Internet. After the last installation neither Ethernet nor Wi-Fi is working. What would be the steps to troubleshoot such problems?

1 Answer
1

First of all check if your network cards are being detected: ifconfig -a. If they aren't you're missing some drivers

Then you would start moving up the http://en.wikipedia.org/wiki/OSI_model>OSI Model layers:

Check if your ethernet card is linking correctly. There should be a small led on the NIC itself and on the switch/router it's connected to. You can also use ip link show dev <ethX> but it give a lot of output.

Check if your NIC is getting an IP address from the router: ip addr show dev <ethX>

Check if you can ping your router: ping <ROUTER IP ADDRESS>

Check if you can ping an outside host: ping 8.8.8.8

Check if you can establish a tcp connection to your router: telnet <ROUTER IP ADDRESS> 80

Steps 2 thru 6 are the same for your wlan card. The difference is on layer2 and below:

Check if your wlan card is working: iwlist scan should return a list of available APs

Try to associate with an AP and get an IP from it. This will be different depending on whether your AP uses encryption or not, and whether you use network manager or not. You will be better off checking out this site