I have a server with the following /etc/networking/interfaces:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address <My IP>
netmask 255.255.255.248
gateway <Gateway Assigned by host>
dns-nameservers 8.8.8.8 8.8.4.4
This all looks okay to me. However, occasionally, the server will stop responding. When I log into it, eth0 is up, but only for an IPv6 address that I don't recognize. Running ifdown -a; ifup -a
brings it back up to the right IP.
How can I make sure that this would happen automatically?
EDIT:
At about the time it went down, there were a few possibly related entries in /var/log/syslog:
May 29 15:28:13 main-www dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 1
May 29 15:28:14 main-www dhclient: No DHCPOFFERS received.
May 29 15:28:14 main-www dhclient: No working leases in persistent database - sleeping.