I have a static
IP set on my web-server. When I change static
to dhcp
the server needs to be reboot for the changes to take effect. Is there any way to make it so I can use ifdown
and ifup
to change it?
I know that it should work because I have had a server that was able to be changed from static
to dhcp
without rebooting. I am just not sure if I am missing something.
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.8.105.8
netmask 255.255.0.0
gateway 10.8.1.1
auto eth1
iface eth1 inet static
address 169.254.1.1
netmask 255.255.0.0
To set it to to dhcp
I change the iface eth0 inet static
to iface eth0 inet dhcp
I am also running into an issue of slow boot times when I declare eth1
as another interface as it is.
Added info
default via 10.8.1.1 dev eth0 metric 100
10.8.0.0/16 dev eth0 proto kernel scope link 10.8.105.8
169.254.0.0/16 dev eth1 proto kernel scope link src 169.254.1.1
169.254.0.0/16 dev eth0 scope link metric 100
sudo /etc/init.d/networking restart
ran but did not switch my network to adhcp
address when it is declared asdhcp
ifdown eth0
andifup eth0
?RTNETLINK answers: File Exists
I have another post trying to solve that but they could very well deal with each other.