1

I have a new installed Ubuntu server 15.04.

I configured it with a static IP settings as:

The loopback network interface
auto lo
iface lo inet loopback

The primary network interface
auto eth0
iface eth0 inet static
  address 192.168.1.8
  netmask 255.255.255.0
  network 192.168.1.0
  broadcast 192.168.1.255
  gateway 192.168.1.254
  dns-nameservers 192.168.1.10 8.8.8.8

This works fine after I have restarted the networking service. Or after a reboot. But after some hours, it somehow gets a DHCP address instead. But the above file does not change. So if I restart the service again it will get the static config for a while and then the same thing happens again.

I have also tried to comment out this line in the /etc/dhcp/dhclient.conf

alias {
  interface "eth0";
  fixed-address 192.168.1.8;
  option subnet-mask 255.255.255.0;
}

But no change after this either...

Im really confused here..

Johan84
  • 11
  • 1
  • It might be that NetworkManager is overriding your wishes. Try telling it not to manage anything in the interfaces file - instructions here – ssta Oct 17 '15 at 09:29
  • Ty for your response but I don't even have NetworkManager installed. – Johan84 Oct 17 '15 at 16:59
  • Refer to my answer here. It uses different approach that editing /etc/network/interfaces . Alias also doesn't work for me, and from reading through the dhclient scripts it's apparent they're not quite well supported. – Sergiy Kolodyazhnyy Oct 18 '15 at 20:50

0 Answers0