Translate

Image of Operating System Concepts
Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)

IPv4 Link Local Addresses in Fedora

A network link-local address is an address that is valid only for use within the network segment or the broadcast domain that a host is connected to. Link local addresses can be layer 2 or layer 3. For example, a 48-bit Ethernet MAC address is one form of a layer 2 link-local address. Link-local addresses are generally not guaranteed to be unique beyond a network segment. Because of this, layer 3 switches (routers) do not forward packets with layer 3 link-local addresses. For Layer 3 IPv4 link-local (IPv4LL) addresses, RFC3927 specifies the address block 169.254.0.0/16.

Zero-configuration Networking (zeroconf) is a set of technologies that automatically creates a usable TCP/IP network when hosts or network peripherals are interconnected. It does not require system administrator intervention or configuration servers. It consists of three core technologies: assignment of numeric network addresses for networked devices, automatic distribution and resolution of computer hostnames, and automatic location of network services, such as printers. Without zeroconf, a system administrator must set up Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS), or configure each host’s network settings manually. Microsoft uses the term APIPA (Automatic Private IP Addressing) instead of zeroconf in their operating systems. Zeroconf is sometimes called AutoIP.

Avahi is a zeroconf implementation for Linux and BSD. It implements IPv4LL, mDNS and DNS-SD. It is installed by default on Fedora and a number of other Linux distributions. Most development work was done in the period 2004 to 2011 and it is now regarded a mature technology. The pseudo-daemon avahi-autoipd implements the IP4LL functionality. It can be used as stand-alone address allocator or as plugin for a DHCP client such as dhclient where it would be used as the fallback IPv4 address alocator if no DHCP server is found.

Avahi has been installed by default on Fedora for a number of years. For example, on Fedora 17:

# ps -ef | grep avahi
avahi      267     1  0 Aug08 ?        00:00:00 avahi-daemon: running [fedora.local]
avahi      307   267  0 Aug08 ?        00:00:00 avahi-daemon: chroot helper

# avahi-autoipd -h
avahi-autoipd [options] INTERFACE
    -h --help           Show this help
    -D --daemonize      Daemonize after startup
    -s --syslog         Write log messages to syslog(3) instead of STDERR
    -k --kill           Kill a running daemon
    -r --refresh        Request a running daemon refresh its IP address
    -c --check          Return 0 if a daemon is already running
    -V --version        Show version
    -S --start=ADDRESS  Start with this address from the IPv4LL range
                        169.254.0.0/16
    -t --script=script  Action script to run (defaults to
                        /etc/avahi/avahi-autoipd.action)
    -w --wait           Wait until an address has been acquired before
                        daemonizing
       --force-bind     Assign an IPv4LL address even if a routable address
                        is already assigned
       --no-drop-root   Don't drop privileges
       --no-chroot      Don't chroot()
       --no-proc-title  Don't modify process title
       --debug          Increase verbosity
# avahi-autoipd -V avahi-autoipd 0.6.31 # cd /etc/avahi # ls -l total 20 -rwxr-xr-x. 1 root root 2509 Aug 9 2012 avahi-autoipd.action -rw-r--r--. 1 root root 1749 Aug 9 2012 avahi-daemon.conf drwxr-xr-x. 2 root root 4096 Aug 9 2012 etc -rw-r--r--. 1 root root 1121 Aug 9 2012 hosts drwxr-xr-x. 2 root root 4096 Aug 19 2013 services

If you do not need IPv4LL functionality, consider disabling Avahi:

# systemctl disable avahi-daemon.service

Comments are closed.