Stateless Configuration with Router Advertisement
IPv6 has a stateless configuration mode to make the end node's configuration easier (especially with mobile nodes). It's called stateless because it does not act like DHCP, where there's an actual four-step protocol exchange between the DHCP client and the DHCP server.
DHCP Four-Step Protocol
DHCP consists of four different steps as described in Chapter 5:
Step 1 The end node sends a broadcast DHCP DISCOVER message and hopes to reach at least one DHCP server.
Step 2 All DHCP servers reply with a DHCP OFFER message to the end node. (This packet contains all the configuration information: leased IP address, subnet mask, gateway address, DNS address, and so on.) The DHCP servers also store a state—that is, they store the offered leased IP address on a nonvolatile storage.
Step 3 The end node selects one of the DHCP OFFER, at its will and requests this specific IP address with a DHCP REQUEST message that's sent to all DHCP servers.
Step 4 Upon receipt of this request, the DHCP servers either discard the state if the end node did not select them, or they keep the state about the leased IP address if they were selected. The selected DHCP server sends a final DHCP ACK message to the end node.
With this four-step protocol and the use of a state in the server, DHCP is not so simple.
Hence, there is a need for a basic stateless (no stored state about leased address) protocol for IPv6.
With the stateless configuration, routers periodically (or on request) multicast Router Advertisements (RA) (transported over ICMPv6). Those RAs convey enough information for the basic network configuration of an end node. They include the following:
• Local prefix(es). First 64 bits of the IPv6 address
• Router link-layer address. Address of the transmitting router
• Associated lifetime. Detects reachability of the transmitting router
• Additional flags associated to advertised prefix(es). Notably, whether stateful configuration, DHCP, is required
• MTU. Maximum datagram size that can be sent by the host that all nodes in the same subnet will accept
With the preceding information, and if stateful configuration is not required, the end hosts can build their own IPv6 addresses (with the interface ID either derived from its MAC address or randomly generated) and their default routing table.
Figure 7-7 shows how router 2001:db8::4 advertises its presence by a periodic multicast (Ethernet multicast of 3333.0000.0001). This RA packet contains the router link local
Analyzing Risk for ND and Stateless Configuration 129
address FE80::200:BEFF:FEEF:0. This piece of information helps local hosts configure themselves.
Figure 7-7 Router Advertisement Configuration
Host A
0000.CAFE.0000
Router
0000.BEEF.0000
BEEF -> 3333.0000.0001 Prefix is 2001:DB8::/64 Router is FE80::200:BEFF:FEEF:C
BEEF -> 3333.0000.0001 Prefix is 2001:DB8::/64 Router is FE80::200:BEFF:FEEF:C
0000.C5C0.0000
0000.C5C0.0000
Host C IP: 2001:DB8::3 MAC 0000.0666.0000
Host C IP: 2001:DB8::3 MAC 0000.0666.0000
This stateless autoconfiguration will probably be heavily used in small networks, such as at home or in a small enterprise. Larger networks will probably rely on DHCP to better track IPv6 addresses and to provide other parameters, such as DNS servers and so on.
Continue reading here: Detection Mechanism
Was this article helpful?