What is a link-local address?
I could find some information on the Internet but it is hard for me to understand this information because of the use of technical words. Could somebody please help me with that.
Did I correctly understand what I read?
Firstly, is a link-local address always an IP address? Moreover, is the link-local address always in the range from 169.254.1.0 to 169.254.1.0?
Secondly, the link-local address is always assigned to a device by itself. In more detail, the device chooses an IP address (from a specified range) and sends this IP address to other devices in the network. If this IP address is not occupied by other devices, it will be taken by the considered device. Is this right?
Solution 1:
Link local addresses allow machines to automatically have an IP address on a network if they haven't been manually configured or automatically configured by a special server on the network (DHCP). Before an address is chosen from that range, the machine sends out a special message (using ARP which stands for address resolution protocol) to the machines on the network around it (assuming that they also haven't been assigned an address manually or automatically) to find out if 169.254.1.1 is free. If it is, then the machine assigns that address to its network card. If that address is already in use by another machine on the same network, then it tries the next IP 169.254.1.2 and so on, until it finds a free address.
Solution 2:
It is a special class of address. Usually referring to an IPv4 or IPv6 address but it can be a reference to other protocols. The general idea is that the address is only valid and usable for the local link or local network segment. The exact meanings of these terms vary by protocol.
Firs, link-local address is alway an IP address.
Not always, most commonly people do mean a link-local IP addresses when they use the term. When they mean this the addresses are always IP addresses, either IPv4 or IPv6. It is valid in some circumstances to refer to a MAC address as a link-local address but it is a less common use of the term.
Moreover, it is always in the range from 169.254.1.0 to 169.254.1.0.
Close, the range for IPv4 is 169.254.0.0/16 (169.254.0.1 to 169.254.255.254), with 169.254.0.0 and 169.254.255.255 reserved as network/broadcast addresses. IPv6 has fe80::/10 reserved for Link-Local addresses with most automatically assigned ones being in the fe80::/64 range.
Second, the link-local address is alway assigned to a device by itself.
No. A link-local IP address is no more unique than a regular IP address, at least not in general terms. The link-local IP address must be unique within its network segment. The rough guide to this is that Routers will not forward any traffic using an address in the link-local IP address range but Hubs and Switches will behave as normal. In a domestic setting this means they are unlikely to get used much outside automated assignments, in larger networks it becomes more relevant.
The process a device assigning an address to itself is a common use for Link-local IP addresses but it is not the only way they are used. In stateless address autoconfiguration the device should check that an address it wants to try and use is available and then use it. There is nothing to stop you manually assigning the same link-local IP address to two devices you administer.
In more details, device chooses an IP address (from a specified range) and send this IP to other devices in the network. If this IP address is not occupied by other devices, it will be taken by the considered device. Is it right?
You are describing a form of stateless address autoconfiguration. Although this is one of the most common sources for link-local IP addresses it is not the only one and is a separate process.
If you are going to start looking at IPv6 then every physical network port on a device has a link-local IPv6 address which is mainly used exclusively by the low-level protocol operations. These are either automatically generated in a manner similar to the one you describe or they are handed out by a central system, as DHCP commonly does for normal IPv4 addresses.
If you are going to look at the Ethernet level rather than the IP, it seems that MAC addresses also count as link-local addresses. The term probably applies to other addressable networking protocols too but I would expect IP and Ethernet are the two most commonly found uses for everyday with IP being the prevailing on for domestic equipment.
For more information, you might get lucky with Wikipedia's article on Link-Local Addresses. It currently has an OK explanation on it although you are required to know what the differences between hubs, switches and routers are in IP networks.