1 \subsection{Address allocation
}
2 Considering the TCP/IP protocol suite, in order to be able to communicate on the
3 IP layer, a device needs to configure one of its network interfaces with
4 an IP address that can be reached from the network that the device wants to connect
5 to. There are several ways of achieving this:
8 \item The IP address is pre-selected by a human and stored in the device
9 configuration. This process is cumbersome when more than one device needs to
10 be configured, and humans have to remember which addresses are configured on
11 which device, and which addresses are still free to use on additional
14 \item Deploying a central server that assigns network addresses
15 to the devices in the network, which in order query the server (for example
16 via broadcast or on a lower layer) for a unique address before they use the
17 IP layer for the first time. This technique supersedes the dependency of
18 human memory for mapping IP addresses to devices, and can easily be combined
19 with additional central configuration management, like the automatic
20 assignment of a static gateway, or a DNS resolver.\\
21 The DHCP protocol is one example of central IP address management.
23 \item A third alternative is the use of a distributed protocol which enables
24 the devices on the network to choose addresses in accordance with other
25 devices on the same network, so no IP address is used more than once. In
26 respect to the Internet of Things, this approach has the advantage that
27 those devices can easily be used in different scenarios without needing
28 central deployment at all, and also allowing them to change their addresses
29 dynamically, therefore easily reacting to changes in the network. \\
30 There are two major protocols which are used for dynamic configuration of IP
31 addresses. In the IPv4 world, Link-Local Addressing~
\cite{rfc3927
} is often
32 used, and in IPv6 networks, Stateless Address
33 Autoconfiguration~
\cite{rfc4862
} is a fundamental feature built into every
40 \paragraph{IPv4 Link-Local Addressing
}
42 Link-Local Addressing uses the IPv4 subnet
169.254.0.0/
16 for addressing. Every
43 device first chooses a random address from that address space. Then it checks if
44 the chosen address is used by any other device on the network by probing the
45 chosen address, which is usually done using the ARP protocol. If the probing
46 process results that the address is not used on the network (e.~g. no device
47 returned an ARP response during a random time interval), the device claims its
48 chosen address and uses it for communication on the IPv4 layer. If the chosen
49 address is already used, the device continues the process, subsequently choosing
50 a new random address and trying to claim it, until a free address has been
53 \paragraph{IPv6 Stateless Address Autoconfiguration
}
55 Similar to IPv4 Link-Local Addressing, devices configured with IPv6 Stateless
56 Addressing Autoconfiguration use an IPv6 address from the subnet fe80::/
64.
57 Then, an
\emph{interface identifier
} is generated using the interface's MAC
58 address. Since MAC addresses must be unique in the network, a unique IPv6
59 address is obtained by combining the subnet prefix and the interface identifier.
60 To ensure that no other device exists with this generated IPv6 address, the
61 device performs
\emph{Duplicate Address Detection
} on the network through
62 \emph{Neighbor Advertisement
} messages and listening for
\emph{Neighbor
63 Solicitation
} messages. If such messages are received from other hosts, the
64 configured address cannot be used by the device and must be discarded.
65 Therefore, in order to use IPv6 effectively, it must be guarranteed that MAC
66 addresses are unique on the network.
68 In contrast to IPv4 Link-Local Addressing, IPv6 Stateless Address
69 Autoconfiguration can also be used with a central server. In this case, a
70 central server broadcasts
\emph{Router Advertisement
} messages on the network which
71 contain a global network prefix. The hosts on the network can then use that
72 prefix instead to configure a global IPv6 address.
76 automatic address configuration via Zeroconf/APIPA (IPv4,
\cite{rfc3927
}) or
77 IPv6 stateless auto-configuration
\cite{rfc4862
}
81 % vim: set ft=tex et ts=2 sw=2 :