I'm running an Ubuntu server, I don't really like Ubuntu but its the only platform where Steam is supported by valve. So as of now I'm using Ubuntu for my game servers.

I have set a static ip address in /etc/network/interfaces but my card keeps recieving a DHCP address as well. So basically the server has my static ip and a DHCP address

How can I stop the dhcpclient?

It's a new 17.10 install without any major changes in the install.

  • auto ens18 iface ens18 inet static address netmask gateway dns-nameservers – Mighty_Pooh Mar 11 '18 at 17:55

Networking changed in Ubuntu 17.10 so adding anything to /etc/network/interfaces won't change anything. It now uses Netplan.

To disable DHCP and set a static IP:

First, find out what your network interface is called, run ls /sys/class/net

The output will probably be something like enp6s0 lo.

lo is the loopback interface so enp6s0 will be your network interface (in this example).

Create a new config file inside of /etc/netplan

e.g sudo nano /etc/netplan/02-netcfg.yaml

Enter the following to configure a static IP of where enp6s0 is the name of your network interface.

    version: 2
    renderer: networkd
            addresses: []
            dhcp4: no

Then run the following two commands:

sudo netplan generate
sudo netplan apply
  • Probably, you need add nameservers: addresses: [] at the end of file – Yura Shinkarev Aug 3 '20 at 12:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.