9

I noticed that IPv4 reserved 169.254.0.0/16 and IPv6 reserved fe80::/10 for link-local addressing. While I saw IPv6 uses both fe80::/10 address and my private IPv6 address fd00::12 to communicate with other devices in Wireshark, I never seen 169.254/16 working in IPv4.

So, what is the purpose of link-local addressing?

12

I never seen 169.254/16 working in IPv4.

A PC automatically acquires a 169.254.x.x/16 address if it does not receive an IP address from a DHCP server. If you disable the DHCP server on your home or lab network and issue the "ipconfig/release" and "ipconfig/renew" commands, your PC will receive a 169.254.x.x address.

As per this article:

The purpose of these self-assigned link-local addresses is to facilitate communication with other hosts within the subnet even in the absence of external address configuration (via manual input or DHCP). Unlike in IPv6, implementation of IPv4 link-local addresses is recommended only in the absence of a normal, routable address. Hosts pseudo-randomly generate the last two octets of the address to mitigate address conflicts. Because of the broadcast nature of some local networking protocols (for example, Microsoft's NetBIOS), hosts may be able to detect one another even without any preexisting knowledge of the address scheme.

5

Link-local addresses are used for communication between two hosts (which are there on the same link) when no other IP address is specified.

In simple words, at the time of booting up, OS tries to configure an address on its interface through various methods like -

  • Manual Configuration
  • DHCP (DHCPv4 or DHCPv6)
  • SLAAC (Stateless Autoconfiguration) -- Unique to IPv6

And if OS doesn't able to configure an address on the interface through any of the automatic methods, then it configure an address on the interface from link-local pool.

  • 169.254.0.0/16 -- Link local address pool in IPv4 address space
  • fe80::/10 -- Link local address pool in IPv6 address space

In IPv4, every interface use to have only one address whereas in IPv6, we can have multiple addresses on a single interface (like link-local, global address on an interface).

Because of the imitation of having one address on an interface in IPv4, you may not have seen an address of range 169.254.0.0/16 on interface.

2

Link-Local addresses are required for the operation IPv6, but not for IPv4. Microsoft, among others, has developed the APIPA (Automatic Private IP Addressing) standard using IPv4 Link-Local addressing, but it is not mandatory or supported by all OSes. I also have seen people misuse IPv4 Link-Local addresses by manually assigning and subnetting them, and that is against RFC 3927, Dynamic Configuration of IPv4 Link-Local Addresses, which is a standard.

Please read RFC 3927, Dynamic Configuration of IPv4 Link-Local Addresses:

  1. Introduction

    As the Internet Protocol continues to grow in popularity, it becomes increasingly valuable to be able to use familiar IP tools such as FTP not only for global communication, but for local communication as well. For example, two people with laptop computers supporting IEEE 802.11 Wireless LANs [802.11] may meet and wish to exchange files. It is desirable for these people to be able to use IP application software without the inconvenience of having to manually configure static IP addresses or set up a DHCP server [RFC2131].

    This document describes a method by which a host may automatically configure an interface with an IPv4 address in the 169.254/16 prefix that is valid for Link-Local communication on that interface. This is especially valuable in environments where no other configuration mechanism is available. The IPv4 prefix 169.254/16 is registered with the IANA for this purpose. Allocation of IPv6 Link-Local addresses is described in "IPv6 Stateless Address Autoconfiguration" [RFC2462].

    Link-Local communication using IPv4 Link-Local addresses is only suitable for communication with other devices connected to the same physical (or logical) link. Link-Local communication using IPv4 Link-Local addresses is not suitable for communication with devices not directly connected to the same physical (or logical) link.

    Microsoft Windows 98 (and later) and Mac OS 8.5 (and later) already support this capability. This document standardizes usage, prescribing rules for how IPv4 Link-Local addresses are to be treated by hosts and routers. In particular, it describes how routers are to behave when receiving packets with IPv4 Link-Local addresses in the source or destination address. With respect to hosts, it discusses claiming and defending addresses, maintaining Link-Local and routable IPv4 addresses on the same interface, and multi-homing issues.

When IPv6 was developed, many things were built into it that had been optional, add-on features of IPv4. Link-Local addressing was one of them. Every IPv6 interface is going to get a Link-Local address so that a device can at least communicate on the local link, and, as a built-in feature, many things, e.g. routing protocols, use it for communications on the local link.

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.