In computer networking, a link-local address is the IP address that is to be used for communication within a logical division of the network or in the broadcast domain to which the host is connected.
- The uniqueness in addresses is not assured in another network segment. Therefore, do not forward by routers.
- The other devices connected to the same physical (or logical) link can communicate using IPv4 Link-Local addresses. IPv4 Connection-Local communication isn’t appropriate for communication with gadgets that are not genuinely associated with a similar connection. The IP address reaches to be utilized for these addresses lies in the scope of 169.254.1.0 to 169.254.254.255.
- The total addresses some others out to be 65,023 in the range given in the above point.
- IPv4 Link-Local addresses should only be used in controlled conditions, such as when reliable, routable addresses are not available (such as on ad hoc or isolated networks). Moreover, it is not preferable to configure IPv4 Link-Local addresses and routable addresses on the same interface at the same time.
- Assignment of link-local addresses is usually carried out in two ways- one is manually through an administrator and the other one is automatic. Mostly, they are preferred to be assigned with autoconfiguration.
- The link-local address performs a useful function of automatic address configuration in IPv4 when DHCP (Dynamic Host Configuration Protocol)server like no external address method available and failure of other methods as well, knowledge discovery, or at that time also when routers are not available. The management of various internal protocol components is required in IPv6 so these addresses are mandatory in version 6.
- It is used for the purpose of communication among nodes that are present on the same link.
Configurations of Link-Local Addresses in IPv4 and IPv6:
1. IPv4 (Internet Protocol Version 4): The link-local addressing for IPv4 is specified in RFC (Request For Comments)3927 document by the IETF (Internet Engineering Task Force). The reserved range that belongs to link-local addresses is 169.254.1.0 – 169.254.254.255 by IETF. In case no option is available then interfaces got Link-local addresses through the internal host which implies stateless address autoconfiguration.
When the address is to be configured with automatic configuration then network hosts choose randomly candidate addresses and for that ARP (Address Resolution Protocol) is used. The purpose of using ARP is to confirm that the current address is not in use on the network. If a reply comes to ARP then it assures that candidate’s IP address is not available to use because of its current usage. So, randomly a new candidate address is generated and the process is repeated. In other words, after the selection of an IP address, a query is sent by a link-local process with the same address on the network to check for its existence. In case of no response, there is an assignment of IP address to the device. Otherwise, the selection of another IP is made and the whole ARP process is repeated.
When the assignment is done of link-local addresses and in case, there is the availability of globally routable addresses or private addresses than for new connections new addresses are preferred instead of available link-local addresses but communication can still be facilitated via link-local address.
2. IPv6 (Internet Protocol Version 6): Every interface in IPv6 must have a link-local address. The link-local address is used between point-to-point interfaces as point-to-point communication is carried out between point-to-point interfaces that eliminate the need for a global IPv6 address. Furthermore, routers do not forward these addresses as they are used only on a single link. These are also used for neighbor discovery.
The following diagram shows the Link-local Unicast IPv6 address:
||64 bits (IP v6)
- The FE80 consists of 10 bits (1111111010) and the next 54 bits are 0’s.
- The prefix used with the IPv6 link-local address is FE80::/10.
- The address block termed as a prefix is reserved for the Link-local Unicast IPv6 address.
There are two possibilities for configuring IPv6 link-local addresses:
- Manually (stateful)
- Auto address (stateless)
The Link-local prefix (FE80::/10) is used in automatic auto address configuration and Interface Identifier in the specified format of EUI-64. In the manual configuration method, the router command is used. The interface ID is obtained from the interface’s hardware address or MAC address in EUI-64 Format.
In performing several sublayer operations of the Neighbor Discovery Protocol or other protocols such as DHCPv6 which are based on IPv6, this address is a must. As described in RFC 4862, the automatic configuration is implemented as part of the Neighbor Discovery Protocol (NDP) in IPv6. The address is made up of the routing prefix and the interface’s MAC address.
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses
are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!