polishing
[skm-ma-ws1314.git] / sec-address-allocation.tex
1 \subsection{Address allocation}
2
3 Considering the TCP/IP protocol suite, in order to be able to communicate on the
4 IP layer, a device needs to configure one of its network interfaces with an IP
5 address that can be reached from the network that the device wants to connect
6 to. Letting the user choose and configure IP addresses manually is a cumbersome
7 when it comes to several devices. Deploying a central server for assigning IP
8 addresses automatically from a pre-configured address pool is possible (e.~g.
9 using the DHCP protocol~\cite{rfc2131}), however, there is also the alternative
10 to use a distributed protocol which enables the devices on a network to choose
11 addresses in accordance with each other so no IP address is used twice.
12
13 In respect to the Internet of Things, this decentralized approach has the
14 advantage that devices can easily be used in different scenarios, even when
15 central deployment does not exist, and it also allows them to change their
16 addresses dynamically in order to react to changes in the network.
17
18 There are two major protocols which are used for dynamic configuration of IP
19 addresses. In the IPv4 world, Link-Local Addressing~\cite{rfc3927} is often
20 used, and in IPv6 networks, Stateless Address Autoconfiguration~\cite{rfc4862}
21 is a fundamental feature specified in the IPv6 protocol.
22
23 \paragraph{IPv4 Link-Local Addressing}
24
25 \term{Link-Local Addressing}, also known as \term{Automatic Private IP
26 Addressing (APIPA)} or \term{Zeroconf}, uses the IPv4 subnet
27 \code{169.254.0.0/16} for addressing. Every device first chooses a random
28 address from that address space. Then it checks if the chosen address is used
29 by any other device on the network by probing the chosen address, which is
30 usually done using the ARP protocol. If the probing process results that the
31 address is not used on the network (e.~g. no device returned an ARP response
32 during a random time interval), the device claims its chosen address and uses it
33 for communication on the IPv4 layer. If the chosen address is already used, the
34 device continues the process, subsequently choosing a new random address and
35 trying to claim it, until a free address has been found.
36
37 \paragraph{IPv6 Stateless Address Autoconfiguration}
38
39 Similar to IPv4 Link-Local Addressing, devices configured with \term{IPv6
40 Stateless Address Auto\-configuration} use an IPv6 address from the subnet
41 \code{fe80::/64}. First, a 64-bit \term{interface identifier} is generated,
42 which can be random, or based on the interface's MAC address. Most likely, this
43 interface identifier is unique in the network, so a unique IPv6 address is
44 obtained by combining the subnet prefix and the interface identifier.
45 Nonetheless, to ensure that no other device use the generated IPv6 address, the
46 device performs \term{Duplicate Address Detection} on the network by
47 broadcasting
48 its generated address with \term{Neighbor Advertisement} messages and listening
49 for \term{Neighbor Solicitation} messages. If such a message is received from
50 another hosts, the generated address cannot be used by the device and must be
51 discarded, and the address generation process is repeated until a unique
52 address has been found.
53
54 In contrast to IPv4 Link-Local Addressing, IPv6 Stateless Address
55 Autoconfiguration can also be used with a central server. In this case, a
56 central server broadcasts \term{Router Solicitation} messages on the network
57 which contain a global network prefix. The hosts on the network can then use
58 that prefix instead to configure a global IPv6 address.
59
60 % vim: set ft=tex et ts=2 sw=2 :
This page took 0.056623 seconds and 5 git commands to generate.