1

The instruction from this link works to change from DHCP dynamic IP to static. But there's a step where it says:

You need to also remove the dhcp client for this to stick (thanks to Peter for noticing). You might need to remove dhcp-client3 instead.

And then:

sudo apt-get remove dhcp-client

Is that really necessary? If so why? Is there any other way without removing dhcp-client?

alvas
  • 3,027

2 Answers2

1

No, you don't need to do that. Refer to this other answer on askubuntu site

I personally use the following bit of code in /etc/dhcp/dhclient.conf file on my home PC which has a USB wireless dongle attached to it:

interface "wlan0" {
    send dhcp-requested-address 192.168.0.222;

}

As you can see, the PC always asks for 192.168.0.222 address.

0

i have never removed the dhcp-client for a static lease. if you edit the interfaces file to make your eth0, or which eth you are configuring, static. It should work after a reboot or a network restart.

So imho no you don't have to remove it... hope it helps