networks: prevent dhclient from resetting eth0 when bound to a link-local address via avahi-autoipd?

I have a Windows PC directly connected to a built-in Linux device via Ethernet.

On the Linux device, I installed avahi-autoipd, in order to establish a connection from the Windows PC to the Linux device through a local link address (169.254.x.x).

At first this connection works fine. I can transmit data from Linux device to Windows PC as expected.

However, this connection is periodically re-established, freezing my data stream.

From monitoring /var/log/syslog on Linux device it seems dhclient is periodically causing eth0 to reset, breaking the connection.

In /var/log/syslog, at first everything is fine, but then every once in a while he says this:

Jan  1 00:26:01 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Jan  1 00:26:04 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
Jan  1 00:26:08 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
Jan  1 00:26:14 localhost dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
Jan  1 00:26:17 localhost dhclient: No DHCPOFFERS received.
Jan  1 00:26:17 localhost dhclient: Trying recorded lease 192.168.10.39

Please note that while the above DHCPDISCOVER queries are sent, I still have a connection as my data stream from Linux device to Windows PC is still alive. But as soon as I see Trying recorded lease 192.168.10.39 message, the connection is broken and my data stream freezes.

To try to debug this, on the Linux device I remove avahi-autoipd and manually restart it in debug mode:

avahi-autoipd --debug eth0

And the output I see from avahi-autoipd is as follows:

  Successfully claimed IP address 169.254.190.129

Everything is fine at this point. But after a while, as soon as Trying recorded lease ... departure occurs in /var/log/syslog (see above), the connection is broken and I see the following sequence of avahi-autoipd output messages:

  A routable address has been configured.
  Callout UNBIND, address 169.254.190.129 on interface eth0
  No longer a routable address configured, restarting probe process.
  A routable address has been configured.
  No longer a routable address configured, restarting probe process.
  Received conflicting probe ARP packet.
  Trying address 169.254.27.206
  Callout BIND, address 169.254.27.206 on interface eth0
  Successfully claimed IP address 169.254.27.206

Periodically (every few minutes, but it seems quite random), it will happen again, every time you break the connection. avahi-autpiod outputs:

  A routable address has been configured.
  Callout UNBIND, address 169.254.27.206 on interface eth0
  No longer a routable address configured, restarting probe process.
  A routable address has been configured.
  No longer a routable address configured, restarting probe process.
  Callout BIND, address 169.254.27.206 on interface eth0
  Successfully claimed IP address 169.254.27.206

When this happens, the link's local address generally stays the same, but sometimes it changes. But even when the local link address remains the same, my data stream still dies.

If the Windows PC is connected to the Linux device through a network with a DHCP router, then I don't see the problem. It only occurs when the two are directly connected through a local link address (169.254.x.x).

So it seems that dhclient doesn't respect the fact that I have established a connection on eth0 through a link-local address (using avahi-autoipd) …?

As a test, I tried to kill dhclient, and after doing that the connection is no longer periodically broken. However, this is not feasible since I need dhclient in case the Linux device connects to a network with a DHCP router.

Is there a way to configure dhclient to do not reset eth0 when connecting via link / avahi-autoipd local address?

Here are the versions of dhclient and avahi-autoipd that I am running:

$ dhclient --version
isc-dhclient-4.2.2

$ sudo avahi-autoipd --version
avahi-autoipd 0.6.31

Me /etc/network/interfaces the file is as follows:

$ cat /etc/network/interfaces

# Wired adapter #1
auto eth0
#allow-hotplug eth0
   iface eth0 inet dhcp

iface wlan0 inet dhcp
       wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

# Local loopback
auto lo
    iface lo inet loopback

Information about the Linux device:

$ uname -srvmo
Linux 3.14.14-cubox-i #14 SMP Tue Jul 28 10:46:10 CDT 2015 armv7l GNU/Linux

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"


$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.8 (wheezy)
Release:        7.8
Codename:       wheezy

If you made it this far, thanks for reading. Any help would be highly appreciated.

networks – ubuntu has no network but dhclient fixes it

I broke my Ubuntu 19.04 by removing python, and fixed it using a LiveCdRecovery. It works fine, but after every reboot, there is no network and I have to use dhclient command to solve the network problem, and VPN does not work in any case.

$ sudo dhclient enp0s31f6 

What can I do to return the network to Ubuntu 19.04?

Do I need dhclient?

Hello,

I'm seeing a lot of this in my server logs:

May 7 16:54:56 server3 dhclient[1092]: DHCPREQUEST in eth1 to xxx.xxx.xxx.xxx po … | Read the rest of http://www.webhostingtalk.com/showthread.php?t=1763802&goto=newpost

network – process dhclient cloud-init / var / tmp

There is a process that is running that I am trying to investigate why it is working and what it is doing. The server is an Ubuntu Linux server that runs on AWS. Execution 16.04.

The process in question is:

root 829 0.0 0.0 16116 2888? Ss Jun19 0:04 / var / tmp / cloud-init / cloud-init-dhcp-zaislidv / dhclient -1 -v -

When I ran lsof -p 829:

sudo lsof -p 829
PID NAME OF COMMAND PID PID USER DEVICE
dhclient 829 root cwd DIR 259.1 4096 2 /
dhclient 829 root rtd DIR 259.1 4096 2 /
dhclient 829 txt root REG 259.1 487248 1536424 / var / tmp / cloud-init / cloud-init-dhcp-zaislidv / dhclient (removed)
dhclient 829 root mem REG 259.1 47600 1993 /lib/x86_64-linux-gnu/libnss_files-2.23.so
dhclient 829 root mem REG 259.1 14608 1982 /lib/x86_64-linux-gnu/libdl-2.23.so
dhclient 829 root mem REG 259.1 1868984 1980 /lib/x86_64-linux-gnu/libc-2.23.so
dhclient 829 root REG 259.1 2123 /lib/x86_64-linux-gnu/libisc-export.so.160.0.0
dhclient 829 root REG 259.1 2125 /lib/x86_64-linux-gnu/libdns-export.so.162.1.3
dhclient 829 root mem REG 259.1 162632 1978 /lib/x86_64-linux-gnu/ld-2.23.so
dhclient 829 root 0u CHR 1,3 0t0 6 / dev / null
dhclient 829 root 1u CHR 1.3 0t0 6 / dev / null
dhclient 829 root 2u CHR 1.3 0t0 6 / dev / null
dhclient 829 root 3u unix 0xffff880036debc00 0t0 12925 type = DGRAM
dhclient 829 root 5u pack 12942 0t0 ALL type = SOCK_RAW
dhclient 829 root 6u IPv4 12943 0t0 UDP *: bootpc

Of the 200 servers, this is the only one that executes this process.

I enter the / var / tmp / cloud-init directory and it is empty, of course, and I do not see this executable or even there.

Any ideas on what it is and where it can be configured to run on?

Thank you!