6

Since I changed my internet provider, opening websites is very slow, it says that it is resolving the host for a long time. So I think I have to change the DNS server. I tried to follow this documentation, but I cannot get it to work. The content of the /etc/network/interfaces is just this for me:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

So I added the lines according to the documentation, but I don't know what to enter for adress, netmask, gateway. How do I find out what to enter there?

I'm sorry, I'm really no expert in those network things.

EDIT:

This is the output when i run netstat -rn

Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags   MSS Fenster irtt Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0

This is the output when I run ifconfig:

eth0      Link encap:Ethernet  Hardware Adresse 14:da:e9:c6:81:b6  
          inet Adresse:192.168.0.5  Bcast:192.168.0.255  Maske:255.255.255.0
          inet6-Adresse: 2a02:8109:440:f083:16da:e9ff:fec6:81b6/64 Gültigkeitsbereich:Global
          inet6-Adresse: fe80::16da:e9ff:fec6:81b6/64 Gültigkeitsbereich:Verbindung
          inet6-Adresse: 2a02:8109:440:f083:38ac:bfba:f01f:6cfe/64 Gültigkeitsbereich:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:9748 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:11366 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000 
          RX-Bytes:9608013 (9.6 MB)  TX-Bytes:1554941 (1.5 MB)

lo        Link encap:Lokale Schleife  
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:65536  Metrik:1
          RX-Pakete:2423 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:2423 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:0 
          RX-Bytes:194090 (194.0 KB)  TX-Bytes:194090 (194.0 KB)

3 Answers3

7

If you are uncomfortable using the terminal (although I would never discourage anyone from using it and familiarizing him/her self with the terminal), you can also achieve the task using the GUI method below:

  1. Open Network-Manager from the icon in the System Tray.
  2. Select Edit Connections from the menu.
  3. Select Wired/Wireless depending on your type of connection.
  4. Double click on your particular connection.
  5. Select IPv4 (you are in all probability not using IPv6).
  6. Change the method to Automatic (DHCP) Addresses Only.
  7. In the field provided for DNS servers, enter two DNS addresses separated by a comma. I would recommend trying Google's DNS servers at first.
  8. Click Save.
  9. Disconnect from your network and then reconnect to it.
  10. Restart your browser to test your connection speed.

Thats it.

1

Edit the /etc/networking/interface file with some text editor.

Since you are not familiar with terminal, nano should be easiest ways.

Or you can use some graphical tool, like gedit, leafpad, mousepad and issue in terminal:

nano /etc/networking/interface

and paste the following:

auto lo
iface lo inet loopback
  address 127.0.0.1
  netmask 255.0.0.0

auto eth0
iface eth0 inet dhcp
    dns-nameservers 8.8.8.8
    dns-nameservers 8.8.4.4

Don't edit /etc/resolv.conf manualy. It will be reset when you restart the network.

fugitive
  • 1,246
0

I had a similar issue not with slowness but with not being able to connect to the internet only with my Ubuntu machine. If I run a LiveCD I can get on the internet without problems. Last night Feb 27, 2018, after almost giving up and thinking about reinstalling ran into a post that suggested running the commands

sudo ifconfig eth0 up
sudo dhclient eth0

and immediately the computer connected to the internet. Try it. I had tried entering the Google DNS by hand and did not work only these commands worked.

Eric Carvalho
  • 54,385