Note: I have "net.ifnames=0" in /boot/cmdline.txt so that I get the old interface names (eth0 etc) back.
I've always worked with /etc/network/interfaces in the past, but Googling suggests the correct way to set a static IP is now to edit /etc/dhcpcd.conf and append: interface eth0 static ip_address=192.168.0.28/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.5
If I restart dhcpcd or networking: sudo service networking restart
.. then the new IP address gets added, but the old IP address gets retained until reboot. (Regardless of whether the old IP came from DHCP or was a previous static.)
What am I doing wrong?
Note: If there's a better way to set a static IP then I'm happy to look at that instead.
On 12/09/2017 16:46, Mark Rogers wrote:
I've always worked with /etc/network/interfaces in the past, but Googling suggests the correct way to set a static IP is now to edit /etc/dhcpcd.conf and append:
I just nuked dhcpcd and edited /etc/network/interfaces as before.
On 13 September 2017 at 09:01, Bill Hill mail@wbh.org wrote:
I just nuked dhcpcd and edited /etc/network/interfaces as before.
By "nuked" do you mean "apt remove dhcpcd" or something else?
On 13/09/2017 10:49, Mark Rogers wrote:
On 13 September 2017 at 09:01, Bill Hill mail@wbh.org wrote:
I just nuked dhcpcd and edited /etc/network/interfaces as before.
By "nuked" do you mean "apt remove dhcpcd" or something else?
sudo nice -20 apt purge dhcpcd
;-)
On 13 September 2017 at 13:38, Bill Hill mail@wbh.org wrote:
sudo nice -20 apt purge dhcpcd
Ah, the Kim Jong approach...