Ubuntu failed to connect to LAN
Someone screwed up with my computer LAN cabling at office, and now my Ubuntu could not connect to internet. It turned out to be such a headache to fix.
It was a headache. But should it happen again, it won't be, since now I know how to fix it.
Click on the internet connection icon on top right corner of the desktop. Edit a connection and choose to set it up manually. Fill in the IP, subnet mask and gateway.
And another important bit, set up the DNS. You can't set it up via that GUI interface in the preceding paragraph. Edit the file /etc/resolv.conf instead. On my Ubuntu 12, this file is a symlink to the /run/resolvconf/resolv.conf. The latter file is automatically generated by the resolvconf tool. So to manually edit DNS, you must first delete the symlink /etc/resolv.conf. And then, create a regular file at the same location, and enter in your DNS settings, such as below:
nameserver 192.168.0.11
nameserver 8.8.8.8
Restart the machine and you should be connected now.
It was a headache. But should it happen again, it won't be, since now I know how to fix it.
Click on the internet connection icon on top right corner of the desktop. Edit a connection and choose to set it up manually. Fill in the IP, subnet mask and gateway.
And another important bit, set up the DNS. You can't set it up via that GUI interface in the preceding paragraph. Edit the file /etc/resolv.conf instead. On my Ubuntu 12, this file is a symlink to the /run/resolvconf/resolv.conf. The latter file is automatically generated by the resolvconf tool. So to manually edit DNS, you must first delete the symlink /etc/resolv.conf. And then, create a regular file at the same location, and enter in your DNS settings, such as below:
nameserver 192.168.0.11
nameserver 8.8.8.8
Restart the machine and you should be connected now.
0 komentar:
Posting Komentar