1

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.

2
  • Your link local address is already setup to 127.0.0.1 by default. If there is no dhcp server and you are making a dhcp request, the dhcp will fail and no changes will be done to your interfaces.
    – Chida
    Aug 22 '12 at 11:15
  • Chida, 127.0.0.1 is not a link-local address. You may want take a look at this document.
    – larsks
    Aug 22 '12 at 13:41
1

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).

3
  • Thanks Much!! As an added point it looks like avahi can be used as a plugin with dchclient if required with certain hooks on it. Aug 28 '12 at 5:58
  • Glad to help! If this answer was helpful it would be great if you could mark it as accepted by clicking on the checkmark to the left. Thanks!
    – larsks
    Aug 29 '12 at 0:54
  • Today, on debian, avahi-autoipd integrates with dhclient using its enter and exit hooks. Mar 19 '18 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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