3

I have an OVH server.

When I install Ubuntu 16.04 or 18.04 or 18.10 on it, the internet speed is 70Mbps download and 4.16Mbps upload.

But when I upgrade to Ubuntu 19.04, the internet speed becomes 400Mbps download and 400Mbps upload (which is the full speed of the server)

I've searched a lot to fix that on 16.04, 18.04, and 18.10 but I failed.

I tried Very slow internet connection on ubuntu 16.04 and https://unix.stackexchange.com/questions/366220/ubuntu-16-04-minimal-extremely-slow-internet-connection but without luck :/

I don't want to use Ubuntu 19.04 because it is pretty new and not everything is supported on it yet.

Thanks!

Mario
  • 175
  • what internet speed test are you using on your remote server ? ... keep in mind when you reinstall a vps there is a possibility the hosting provider moves that IP onto different hardware with possibly different network connectivity – Scott Stensland May 26 '19 at 23:46

2 Answers2

3

I fixed it! This is how:

I followed https://www.itzgeek.com/how-tos/linux/debian/how-to-disable-ipv6-on-debian-9-ubuntu-16-04.html (Method 1) to disable IPv6 on my server.

Then I removed the DNS servers from the /etc/resolv.conf file by removing the nameserver lines.

Then I installed network-manager by using: apt -y install network-manager

Then I disabled other DNS services by fully opting-out from the NetworkManager by typing:

echo -e "[main]\ndns=none" > /etc/NetworkManager/conf.d/no-dns.conf systemctl restart NetworkManager.service rm /etc/resolv.conf

Then I disabled and removed systemd-resolved by typing the following:

sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved

Then I have put the following line in the [main] section of my /etc/NetworkManager/NetworkManager.conf file:

dns=default

Then I removed /etc/resolv.conf by typing: rm /etc/resolv.conf

Then I finally restarted network-manager by typing: sudo service network-manager restart

Now my internet speed is the normal one :)

This also works on Debian.

For CentOS: All what you have to do is to disable IPv6, and remove the nameserver lines from /etc/resolv.conf only.

Mario
  • 175
0

Uninstalling networkmanager does the trick too and configuration /etc/network/interfaces. Especially for wired desktops, I found this the fastest and most reliable as it is not depending on systemd.

sudo systemctl disable network-manager

sudo systemctl stop network-manager

If you want to remove network-manager totally:

sudo apt-get purge network-manager

sudo apt autoremove

Look up your network card(s)

ifconfig -a


sudo gedit /etc/network/interfaces

Example based on 2 network cards cards:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# Internet
auto enp5s0 (replace with your network card)
iface enp5s0 inet dhcp (replce with your network card)
netmask 255.255.255.0
gateway 192.168.xxx.xxx
# Server connection
auto enp4s0 (replace with your network card)
iface enp4s0 inet static (replace with your network card)
address 192.168.xxx.xxx
netmask 255.255.xxx.xxx
mtu 9000 (correct to server speed/ network cards and abillity of jumbo frames)

Reboot or bring network cards up with:

ifup <your network card> 
Gerard
  • 1