Dhclient and link local address

dhclientlinux-networking

I am doing a "dhclient" on one of the network interface which is in UP state. There is no DHCP server running in the network on which this node is present. So the questions are

  1. Will dhclient try to set up a link local address for that interface.
  2. If the above is the behaviour of dhclient is there any configurations I need to setup to make this happen.

Please advice on this and suggest some links/manpages to study this.

Best Answer

dhclient will not set up a link-local address. dhclient only configures addresses that it has received from a DHCP server.

For configuring the link-local address on an interface, you can use Avahi, which is a Linux implementation of the Zeroconf standard. Many distributions include support for Avahi; you may simply need to install it and configure the Avahi daemon (avahi-autopid) to start at boot.

You can run it by hand like this:

avahi-autoipd --debug eth0

With the daemon running, if the specified interface does not already have a routeable address assigned then Avahi will assign an IPv4 link-local addresses (such as 169.254.10.183).