0

I'm running a raspian jessie and I've configures a static IP for eth0 using /etc/network/interfaces

auto lo

iface lo inet loopback
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.11
netmask  255.255.255.0
gateway 192.168.1.1


allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

That works really fine, but when the link goes down (because the switch connected to the raspi is rebooted) somehow dhclient is getting an IP using DHCP when the link goes up again:

Aug 10 20:22:11 raspberrypi kernel: [83730.766026] smsc95xx 1-1.1:1.0 eth0: link down
Aug 10 20:22:15 raspberrypi dhclient: Internet Systems Consortium DHCP Client 4.3.1
Aug 10 20:22:15 raspberrypi dhclient: Copyright 2004-2014 Internet Systems Consortium.
Aug 10 20:22:15 raspberrypi dhclient: All rights reserved. 
Aug 10 20:22:15 raspberrypi dhclient: For info, please visit 
Aug 10 20:22:15 raspberrypi dhclient:
Aug 10 20:22:15 raspberrypi dhclient: Listening on LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:15 raspberrypi dhclient: Sending on   LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:15 raspberrypi dhclient: Sending on   Socket/fallback
Aug 10 20:22:15 raspberrypi dhclient: DHCPRELEASE on eth0 to 192.168.1.1 port 67
Aug 10 20:22:15 raspberrypi kernel: [83734.959054] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Aug 10 20:22:15 raspberrypi kernel: [83735.068305] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Aug 10 20:22:15 raspberrypi kernel: [83735.077280] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 10 20:22:16 raspberrypi dhclient: Internet Systems Consortium DHCP Client 4.3.1
Aug 10 20:22:16 raspberrypi dhclient: Copyright 2004-2014 Internet Systems Consortium.
Aug 10 20:22:16 raspberrypi dhclient: All rights reserved.
Aug 10 20:22:16 raspberrypi dhclient: For info, please visit 
Aug 10 20:22:16 raspberrypi dhclient:
Aug 10 20:22:16 raspberrypi dhclient: Listening on LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:16 raspberrypi dhclient: Sending on   LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:16 raspberrypi dhclient: Sending on   Socket/fallback
Aug 10 20:22:16 raspberrypi dhclient: DHCPRELEASE on eth0 to 192.168.1.1 port 67
Aug 10 20:22:16 raspberrypi dhclient: send_packet: Network is unreachable
Aug 10 20:22:16 raspberrypi dhclient: send_packet: please consult README file regarding broadcast address.
Aug 10 20:22:16 raspberrypi dhclient: dhclient.c:2331: Failed to send 300 byte long packet over fallback interface.
Aug 10 20:22:16 raspberrypi kernel: [83735.962677] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Aug 10 20:22:16 raspberrypi kernel: [83736.068360] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Aug 10 20:22:16 raspberrypi kernel: [83736.077336] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Aug 10 20:22:17 raspberrypi ntpd[478]: Deleting interface #5 eth0, fe80::ba27:ebff:fe58:8acc#123, interface stats: received=0, sent=0, dropped=0, active_time=83712 secs
Aug 10 20:22:17 raspberrypi ntpd[478]: Deleting interface #3 eth0, 192.168.1.11#123, interface stats: received=556, sent=625, dropped=0, active_time=83712 secs
Aug 10 20:22:17 raspberrypi ntpd[478]: 217.79.179.106 interface 192.168.1.11 -> (none)
Aug 10 20:22:17 raspberrypi ntpd[478]: 144.76.117.245 interface 192.168.1.11 -> (none)
Aug 10 20:22:17 raspberrypi ntpd[478]: 78.47.223.214 interface 192.168.1.11 -> (none)
Aug 10 20:22:17 raspberrypi ntpd[478]: 5.45.97.110 interface 192.168.1.11 -> (none)
Aug 10 20:22:17 raspberrypi ntpd[478]: peers refreshed
Aug 10 20:22:23 raspberrypi kernel: [83742.663243] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
Aug 10 20:22:23 raspberrypi kernel: [83742.674697] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Aug 10 20:22:25 raspberrypi ntpd[478]: Listen normally on 6 eth0 fe80::ba27:ebff:fe58:8acc UDP 123
Aug 10 20:22:25 raspberrypi ntpd[478]: peers refreshed
Aug 10 20:22:27 raspberrypi dhclient: Internet Systems Consortium DHCP Client 4.3.1
Aug 10 20:22:27 raspberrypi dhclient: Copyright 2004-2014 Internet Systems Consortium.
Aug 10 20:22:27 raspberrypi dhclient: All rights reserved.
Aug 10 20:22:27 raspberrypi dhclient: For info, please visit 
Aug 10 20:22:27 raspberrypi dhclient:
Aug 10 20:22:27 raspberrypi dhclient: Listening on LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:27 raspberrypi dhclient: Sending on   LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:27 raspberrypi dhclient: Sending on   Socket/fallback
Aug 10 20:22:27 raspberrypi dhclient: DHCPRELEASE on eth0 to 192.168.1.1 port 67
Aug 10 20:22:27 raspberrypi dhclient: send_packet: Network is unreachable
Aug 10 20:22:27 raspberrypi dhclient: send_packet: please consult README file regarding broadcast address.
Aug 10 20:22:27 raspberrypi dhclient: dhclient.c:2331: Failed to send 300 byte long packet over fallback interface.
Aug 10 20:22:27 raspberrypi kernel: [83747.035328] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Aug 10 20:22:27 raspberrypi kernel: [83747.138736] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Aug 10 20:22:27 raspberrypi kernel: [83747.465836] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Aug 10 20:22:27 raspberrypi dhclient: Internet Systems Consortium DHCP Client 4.3.1
Aug 10 20:22:27 raspberrypi dhclient: Copyright 2004-2014 Internet Systems Consortium.
Aug 10 20:22:27 raspberrypi dhclient: All rights reserved.
Aug 10 20:22:27 raspberrypi dhclient: For info, please visit 
Aug 10 20:22:27 raspberrypi dhclient:
Aug 10 20:22:28 raspberrypi dhclient: Listening on LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:28 raspberrypi dhclient: Sending on   LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:28 raspberrypi dhclient: Sending on   Socket/fallback
Aug 10 20:22:28 raspberrypi dhclient: DHCPRELEASE on eth0 to 192.168.1.1 port 67
Aug 10 20:22:28 raspberrypi dhclient: send_packet: Network is unreachable
Aug 10 20:22:28 raspberrypi dhclient: send_packet: please consult README file regarding broadcast address.
Aug 10 20:22:28 raspberrypi dhclient: dhclient.c:2331: Failed to send 300 byte long packet over fallback interface.
Aug 10 20:22:28 raspberrypi kernel: [83747.808719] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Aug 10 20:22:29 raspberrypi kernel: [83749.277493] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
Aug 10 20:22:30 raspberrypi dhclient: Internet Systems Consortium DHCP Client 4.3.1
Aug 10 20:22:30 raspberrypi dhclient: Copyright 2004-2014 Internet Systems Consortium.
Aug 10 20:22:30 raspberrypi dhclient: All rights reserved.
Aug 10 20:22:30 raspberrypi dhclient: For info, please visit 
Aug 10 20:22:30 raspberrypi dhclient:
Aug 10 20:22:30 raspberrypi dhclient: Listening on LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:30 raspberrypi dhclient: Sending on   LPF/eth0/b8:27:eb:58:8a:cc
Aug 10 20:22:30 raspberrypi dhclient: Sending on   Socket/fallback
Aug 10 20:22:30 raspberrypi dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Aug 10 20:22:30 raspberrypi dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Aug 10 20:22:30 raspberrypi dhclient: DHCPOFFER from 192.168.1.1
Aug 10 20:22:30 raspberrypi dhclient: DHCPACK from 192.168.1.1
Aug 10 20:22:31 raspberrypi dhclient: bound to 192.168.1.102 -- renewal in 1697 seconds.

There is no dhcpcd process running and /etc/dhcpcd.conf does not exist.

chrikoch
  • 3
  • 1

1 Answers1

0

"I'm running a raspian jessie and I've configures a static IP" No you haven't - You are giving the OS 2 contradictory instructions, and it may use either (or both).

dhcpcd is not running because you have called dhcp in /etc/network/interfaces (as you would see from boot logs).

See How do I set up networking/WiFi/Static IP

Milliways
  • 59,890
  • 31
  • 101
  • 209
  • It seems isc-dhcp-client was causing the problem. I didn't manage to remove it, because as a dependency apt-get wanted to install dhcpcd then. So I just renamed /sbin/dhclient . Not a nice solution but it works :-) – chrikoch Aug 11 '16 at 19:30