I am frustrated beyond belief, at this point. I have a simple task of changing an ip from DHCP to static, but it does not want to accept the new address. The interfaces file looks like this:
source /etc/network/interfaces.d/*
auto lo enp3s0
iface lo inet loopback
iface enp3s0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.254
nameserver 192.168.1.5
When I perform sudo ifdown enp3s0 && ifup enp3s0
, it continues to get 192.168.1.200. dhclient is not running and network-manager is uninstalled. I can't figure out where this ip is coming from.
Update:
After banging my head against the wall, for a couple more hours, I settled on this, as the configuration file:
auto lo
iface lo inet loopback
auto enp3s0
iface enp3s0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.254
dns-nameservers 192.168.1.5
dns-search ***.com
I also created a static record in the DHCP server, for the MAC address of this interface, even though this interface is outside the record of the DHCP server. Once I did all that, I rebooted the server and the 1.2 address stuck. Not sure which process cured the issue. I know, after changing the file and restarting the service, nothing changed. It was either the reboot or some combination of the 3.
192.168.1.2
is outside the DHCP pool in the router or other access point and that there is therefor no possible collision? The proper term is dns-nameservers; not nameserver. What is the exact result of:sudo ifdown enp3s0 && sudo ifup -v enp3s0
? – chili555 May 26 '17 at 21:51auto lo enp3s0
- That just indicates which interfaces should be brought up whenifup -a
is run. Theiface
stanza dictates how it should be brought up. Seeman 5 interfaces
– muru May 29 '17 at 11:34sudo ifdown enp3s0 && ifup enp3s0
, theifup
command is not run withsudo
! – fkraiem May 29 '17 at 11:39@fkraiem, sorry, that was a typo. I was putting sudo.
– talkinggoat May 29 '17 at 14:50