Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have debian6, interfaces are set manually:

eth0      Link encap:Ethernet  HWaddr 40:61:86:7c:42:ed
          inet addr:192.168.3.238  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::4261:86ff:fe7c:42ed/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25460712 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15936414 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20505323410 (19.0 GiB)  TX bytes:3909617144 (3.6 GiB)
          Interrupt:25

This machine is used as DHCP server (isc-dhcp-server) and DNS forwarder (bind9) and shorewall.

Recently and randomly itself changes IP address for eth0 to 192.168.0.1 or even removes IP settings completely. I cant then connect internet from that machine or any other machine on local network.

What can I do to stop this behaviour? How to track service responsible for this?

Content of interfaces

auto eth0
iface eth0 inet static
    address 192.168.3.238
    netmask 255.255.255.0
    gateway 192.168.3.1

auto eth1
iface eth1 inet static
    address 10.0.0.1
    netmask 255.0.0.0
    network 10.0.0.0
    broadcast 10.0.0.255

Report from syslog

Mar 15 10:44:22 debian avahi-daemon[2189]: Withdrawing address record for 192.168.3.238 on eth0.
Mar 15 10:44:22 debian avahi-daemon[2189]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.3.238.
Mar 15 10:44:22 debian avahi-daemon[2189]: Interface eth0.IPv4 no longer relevant for mDNS.
Mar 15 10:44:22 debian dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Mar 15 10:44:22 debian kernel: [1107087.393431] martian source 10.0.40.1 from 10.0.40.167, on dev eth0
Mar 15 10:44:22 debian kernel: [1107087.393439] ll header: ff:ff:ff:ff:ff:ff:00:4f:67:03:b0:1f:08:06
Mar 15 10:44:22 debian kernel: [1107087.901047] martian source 10.0.40.1 from 10.0.40.185, on dev eth0
Mar 15 10:44:22 debian kernel: [1107087.901056] ll header: ff:ff:ff:ff:ff:ff:00:1e:58:0d:08:df:08:06
Mar 15 10:44:23 debian dhclient: Internet Systems Consortium DHCP Client 4.1.1-P1
Mar 15 10:44:23 debian dhclient: Copyright 2004-2010 Internet Systems Consortium.
Mar 15 10:44:23 debian dhclient: All rights reserved.
Mar 15 10:44:23 debian dhclient: For info, please visit https://www.isc.org/software/dhcp/
Mar 15 10:44:23 debian dhclient:
Mar 15 10:44:23 debian dhclient: /etc/dhcp/dhclient.conf line 19: no option named domain-nameserver in space dhcp
Mar 15 10:44:23 debian dhclient: supersede domain-nameserver 10.
Mar 15 10:44:23 debian dhclient:            ^
Mar 15 10:44:23 debian dhclient: /etc/dhcp/dhclient.conf line 20: semicolon expected.
Mar 15 10:44:23 debian dhclient: prepend
Mar 15 10:44:23 debian dhclient:  ^
Mar 15 10:44:23 debian dhclient: Listening on LPF/eth0/40:61:86:7c:42:ed
Mar 15 10:44:23 debian dhclient: Sending on   LPF/eth0/40:61:86:7c:42:ed
Mar 15 10:44:23 debian dhclient: Sending on   Socket/fallback
Mar 15 10:44:23 debian dhclient: DHCPRELEASE on eth0 to 192.168.0.1 port 67
Mar 15 10:44:23 debian dhclient: send_packet: Network is unreachable
Mar 15 10:44:23 debian dhclient: send_packet: please consult README file regarding broadcast address.
Mar 15 10:44:23 debian avahi-daemon[2189]: Interface eth0.IPv6 no longer relevant for mDNS.
Mar 15 10:44:23 debian avahi-daemon[2189]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::4261:86ff:fe7c:42ed.
Mar 15 10:44:23 debian avahi-daemon[2189]: Withdrawing address record for fe80::4261:86ff:fe7c:42ed on eth0.
Mar 15 10:44:23 debian kernel: [1107088.283819] r8169 0000:02:00.0: eth0: link down
Mar 15 10:44:23 debian kernel: [1107088.283839] r8169 0000:02:00.0: eth0: link down
Mar 15 10:44:23 debian kernel: [1107088.284456] ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 15 10:44:23 debian dhclient: Internet Systems Consortium DHCP Client 4.1.1-P1
Mar 15 10:44:23 debian dhclient: Copyright 2004-2010 Internet Systems Consortium.
Mar 15 10:44:23 debian dhclient: All rights reserved.
Mar 15 10:44:23 debian dhclient: For info, please visit https://www.isc.org/software/dhcp/
Mar 15 10:44:23 debian dhclient:
Mar 15 10:44:23 debian dhclient: /etc/dhcp/dhclient.conf line 19: no option named domain-nameserver in space dhcp
Mar 15 10:44:23 debian dhclient: supersede domain-nameserver 10.
Mar 15 10:44:23 debian dhclient:            ^
Mar 15 10:44:23 debian dhclient: /etc/dhcp/dhclient.conf line 20: semicolon expected.
Mar 15 10:44:23 debian dhclient: prepend
Mar 15 10:44:23 debian dhclient:  ^
Mar 15 10:44:23 debian dhclient: Listening on LPF/eth0/40:61:86:7c:42:ed
Mar 15 10:44:23 debian dhclient: Sending on   LPF/eth0/40:61:86:7c:42:ed
Mar 15 10:44:23 debian dhclient: Sending on   Socket/fallback
Mar 15 10:44:23 debian dhclient: DHCPRELEASE on eth0 to 192.168.0.1 port 67
Mar 15 10:44:23 debian dhclient: send_packet: Network is unreachable
Mar 15 10:44:23 debian dhclient: send_packet: please consult README file regarding broadcast address.
Mar 15 10:44:23 debian kernel: [1107088.401716] r8169 0000:02:00.0: eth0: link down
Mar 15 10:44:23 debian kernel: [1107088.402152] ADDRCONF(NETDEV_UP): eth0: link is not ready
Mar 15 10:44:24 debian dhclient: Internet Systems Consortium DHCP Client 4.1.1-P1
Mar 15 10:44:24 debian dhclient: Copyright 2004-2010 Internet Systems Consortium.
Mar 15 10:44:24 debian dhclient: All rights reserved.
Mar 15 10:44:24 debian dhclient: For info, please visit https://www.isc.org/software/dhcp/
Mar 15 10:44:24 debian dhclient:
share|improve this question
    
The first thing I would verify is that you aren't accidentally running the interface in DHCP mode. Is NetworkManager or something similar running, and what are the contents of /etc/network/interfaces? –  Michael Kjörling Mar 15 '13 at 8:41
    
This debian has also xfce window manager, not sure if that has some network manager which can overwrite –  feronovak Mar 15 '13 at 8:56

2 Answers 2

up vote 1 down vote accepted

What does your syslog / dmesg say? A change of IP address should result in an entry in the log file. This might give you a hint what caused it (i.e. the couple of lines before the IP change).

For instance, if you manually restart networking, something like this pops up in dmesg / syslog

[47460.471835] r8169 0000:09:00.0: eth0: link down
[47460.473570] r8169 0000:09:00.0: eth0: link down
[47460.475690] ADDRCONF(NETDEV_UP): eth0: link is not ready
[47463.368498] r8169 0000:09:00.0: eth0: link up
[47463.370603] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
share|improve this answer
    
I added recent syslog report when connection got dropped again. –  feronovak Mar 15 '13 at 9:56
    
Is it possible that your box loses physical network connectivity? This is my current guess from reading your logs. I don't see a eth0: link becomes ready in your log file, hence I assume debian believes your eth0 is disconnected. –  user1055421 Mar 15 '13 at 10:09
    
No, it is very unlikely. Everytime I restart interface it just connects immediately. As I am using network from local network computer I am able to immediately restart networking and it works immediately. –  feronovak Mar 15 '13 at 10:10

The clue from your syslog is that you have dhclient and avahi running. For a server with static configuration it is best practice to apt-get remove avahi-daemon and network-manager. You can configure avahi not to interfere with eth0 but its just not worth the bother.

After you remove avahi and network manager, reboot and run ps ax to verify that dhclient* and avahi* not running.

share|improve this answer
    
I have removed them, I will wait for a day or two see whether it stopped. –  feronovak Mar 15 '13 at 12:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.