IPV6: Stateful vs. Stateless

Last updated: March 18, 2024

lan ipv6 address assignment stateless or stateful

1. Introduction

IPv6 is the latest version of the Internet Protocol (IP) , which provides a larger address space than its predecessor IPv4. Furthermore, networking engineers designed it to overcome the limitations of IPv4, which had shortcomings in terms of address space, security, and performance.

IPv6 addresses have a 128-bit length, compared to the 32-bit length of IPv4 addresses, which provides a huge number of unique addresses to assign to devices and networks.

IPv6 has two addressing modes, stateful and stateless. In this tutorial, we’ll discuss the differences between these addressing modes in IPv6.

2. IPv6 Addressing Modes

Networking engineers use IPv6 addresses to identify devices and networks on the Internet uniquely. Each IPv6 address consists of 8 groups of 16-bit hexadecimal numbers separated by colons.

In IPv6, there are two addressing modes: stateful and stateless.

2.1. Stateful Addressing

Stateful addressing, also known as DHCPv6 , is like the way IPv4 addresses are assigned. In stateful addressing, the DHCPv6 server assigns an IPv6 address to the requesting device.

This process involves a series of messages between the DHCPv6 client and server. Moreover, the client sends a message requesting an IPv6 address, and the server replies with an IPv6 address that is leased to the client for a specified period. It then uses this address until the lease time expires or until the client releases the address.

Stateful addressing is useful for assigning static IPv6 addresses to devices that require consistent IP addresses, such as servers or printers. It is also useful in cases where the administrator wants to control the network configuration of the clients.

The following figure shows the stateful IPv6:

stateful IPv6

2.2. Stateless Addressing

Stateless address, also known as autoconfiguration, is a simpler way of assigning IPv6 addresses.

In stateless addressing, each device generates its own IPv6 address based on its MAC address and network prefix. The process that generates EUI-64 addresses is called EUI-64 address generation. In EUI-64 address generation, the device’s 48-bit MAC address is split in half, and an FF: FE value is inserted in between them. The resulting 64-bit value is then combined with the network prefix to create a unique IPv6 address.

Stateless addressing is useful for assigning temporary IPv6 addresses to devices that do not require consistent IP addresses, such as mobile devices or laptops. It is also useful in cases where the administrator wants to simplify the network configuration and avoid the complexity of managing DHCPv6 servers.

The following figure shows the stateless IPv6:

stateless IPv6

3. Stateful vs. Stateless Addressing: Which to Choose?

When it comes to choosing between stateful and stateless addressing, there are several factors to consider, including IP address management, network size, security, network configuration, network monitoring, and complexity.

The following table summarizes the key differences between them.

Criteria Stateful Addressing Stateless Addressing
IP address management Centralized management Distributed management
Network size Suitable for large networks Suitable for small networks or mobile devices
Security More secure because of centralized management Less secure because of distributed management
Network configuration Centrally configured by the administrator Simpler configuration without a DHCPv6 server
Network monitoring Easier to monitor network traffic More challenging to monitor network traffic
Complexity More complex due to DHCPv6 server requirement Less complex without a DHCPv6 server

4. Conclusion

In conclusion, IPv6 offers a larger address space and improved security and performance compared to its predecessor IPv4.

Stateful addressing provides centralized management and is suitable for assigning static IPv6 addresses to devices that require consistent IP addresses. In contrast, stateless addressing offers a simpler configuration without a DHCPv6 server and is suitable for assigning temporary IPv6 addresses to devices that do not require consistent IP addresses.

The decision of whether to use stateful or stateless addressing ultimately relies on the particular demands and prerequisites of the network.

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Stateful vs Stateless IPv6?

What's the difference here?

Are stateful IPv6 entries retained in the DHCPv6 server?

stets's user avatar

2 Answers 2

Stateful autoconfiguration of IPv6 is the equivalent to the use of DHCP in IPv4. It requires a DHCPv6 service to provide the IPv6 address to the client device and that both client device and server maintain the "state" of that address (i.e. lease time, etc).

Stateless autoconfiguration of IPv6 allows the client device to self-configure its IPv6 address and routing based on the router advertisements.

A network can use both stateful and stateless autoconfiguration at the same time, they are not mutually exclusive.

If you are interested in more detailed information, I would highly recommend you read RFC4862 .

Community's user avatar

  • Awesome, that was what I was looking for! –  stets Commented Sep 4, 2015 at 12:40

With stateless autoconfiguration the clients get prefixes and routes from router advertisements and choose their own addresses within the prefixes, these address may be based on the MAC address and/or selected randomly. Many clients will implement "privacy extensions" where they cycle through randomly assigned addresses frequently. Additional configuration may be provided either through extensions in the router advertisements or through stateless DHCPv6.

With stateful DHCPv6 addresses are allocated in much the same way as with IPv4 DHCP. It is up to the DHCP server to hand out addresses (or not) as it sees fit and to keep track of which client has which address.

The big downside of stateless, especially with privacy extensions is it makes it much more effort to track and/or block abuse. With stateful DHCP (v4 or v6) a client is likely to keep a stable IP as long as it stays on the same network, with stateless and privacy extensions it will jump around all over the place.

The big downside of stateful DHCPv6 is that andriod doesn't support it. So on a wireless segment that will be used by phones/tablets you are basically forced to allow stateless autoconfiguration if you want all clients to have v6 access.

It is technically possible to use both on the same network at the same time, I would question whether it is sensible though.

Peter Green's user avatar

Your Answer

Sign up or log in, post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged cisco dhcp ipv6 dhcpv6 or ask your own question .

  • Featured on Meta
  • Bringing clarity to status tag usage on meta sites
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Announcing a change to the data-dump process

Hot Network Questions

  • How many people could we get off of the planet in a month?
  • Is there a way to say "wink wink" or "nudge nudge" in German?
  • How should Form 990: Part IV Question 3 be answered?
  • Is the Garmin Edge 530 still a good choice for a beginner in 2024?
  • VerificationTest leaks message?
  • 10th-order Runge-Kutta Method
  • How to install a second ground bar on a Square D Homeline subpanel
  • Why is the identity of the actor voicing Spider-Man kept secret even in the commentary?
  • Trying to identify manufacturer logo .. circle with circle inside
  • Finite loop runs infinitely
  • What do all branches of Mathematics have in common to be considered "Mathematics", or parts of the same field?
  • Do spell-like abilities have descriptors?
  • Choosing a relative large density subsequence from a low density sequence
  • What is the meaning of the biblical term "divine nature", and what does it tell us about the biblical use of the title "God"?
  • Who is affected by Obscured areas?
  • Why would an incumbent politician or party need to be re-elected to fulfill a campaign promise?
  • Could a gas giant still be low on the horizon from the equator of a tidally locked moon?
  • Is there an efficient way to extract a slice of a 3d array?
  • Are "lie low" and "keep a low profile" interchangeable?
  • Why is the Greek word "egeneto" translated as "create" or "make" in John 1:3 and "became" in John 1:14 in some translations?
  • UART pin acting as power pin
  • Did the United States have consent from Texas to cede a piece of land that was part of Texas?
  • Can there be clouds of free electrons in space?
  • Autoref, theorem, definition

lan ipv6 address assignment stateless or stateful

There are three methods to configure a host with a global unicast address, default gateway, DNS server, and a domain name:

  • Method 1 : Configure the host manually. This approach does not scale and is prone to human error;
  • Method 2 : Using SLAAC and a Stateless DHCPv6 server. We have looked at this approach in our previous lesson ;
  • Method 3 : Using a Stateful DHCPv6 server.

Stateful DHCPv6 is similar in functionalities to DHCP protocol in IPv4, but there are some major differences in the way the whole process works. In this lesson, we are going to examine it step by step.

Stateful vs Stateless DHCPv6

A stateless DHCPv6 server does not provide IPv6 addresses at all. It only provides " other information " such as a DNS server list and a domain name. It works in conjunction with another feature called SLAAC that tells hosts how to generate global unicast addresses. In this context stateless means that  no server keeps track  of what addresses have been assigned by which hosts and what addresses are still available for an assignment.

A stateful DHCPv6 server  provides IPv6 addresses and " other information " to hosts. It also keeps track of the state of each assignment. It tracks the address pool availability and resolves duplicated address conflicts. It also logs every assignment and keeps track of the expiration times. However, there is a big difference between DHCPv6 and DHCPv4. In IPv4 DHCP server typically provides default gateway addresses to hosts. In IPv6, only routers sending Router Advertisement messages can provide a default gateway address dynamically.

Stateful DHCPv6 Messages

Unlike IPv4, in IPv6 routers actively participate in the process of dynamic hosts addressing. In both Stateless and Stateful implementations, a router on the link advertises its presence with Router Advertisements messages. These RA messages play a very important role for a few reasons:

  • Hosts set their Default Gateway based on the RA messages -  If there is only one router attached to the link, the source address of its RA messages is configured by hosts as a default gateway address. If there are multiple routers attached to the link, there is a value in the RA message called pref (router preference)  that can be set to Low, Medium, or High. Hosts set their default gateway to the source address of the RA messages with the highest preference.
  • A-flag - if it is set to 1, this informs hosts that they can auto-generate GUA address using SLAAC. If it is set to 0 means that auto-configuration is not allowed for this segment.
  • O-flag - if it is set to 1, this informs hosts that they can obtain a DNS server list and a domain name from a Stateless DHCPv6 server, but not addressing information. Typically it works in conjunction with SLAAC for auto-addressing and both the A-flag and the O-flag are set to 1.
  • M-flag - if it is set to 1, this informs hosts that they can obtain a global address as well as DNS and a domain name from a Stateful DHCPv6 server. Typically this means that auto-addressing using SLAAC is not allowed on this segment and both the  A-flag and the O-flag are set to 0.

Figure 1 illustrates the steps PC1 takes to configure a global unicast address, a default gateway, and a DNS using a Stateful DHCPv6:

  • Step 1 - PC1 sends out a Router Solicitation message destined to the all-routers multicast address FF02::2.
  • Step 2 - Upon receiving the RS from PC1, Router 1 generates a Router Advertisement message with the M-flag set to 1 and the A-flag set to 0. This informs PC1 that SLAAC is not allowed on this segment and it must use a Stateful DHCPv6 for addressing and other configuration. Note that RA messages are sent to the all-nodes multicast group FF02::1 and are received by all neighbors on a local segment.
  • Step 3 - Upon receiving the Route Advertisement, PC1 sets the source IPv6 address of Router 1 (FE80::1) as its default gateway. Because the A-flag is set to 0, PC1 does not perform Stateless Address Auto-configuration (SLAAC).
  • Step 4 - Because the M-flag in the RA message is set to 1, PC1 sends out a DHCPv6 SOLICIT message to the all-dhcpv6-servers multicast group FF02::1:2, searching for DHCP server.
  • Step 5 - Upon hearing the solicit message, the server responds with a DHCPv6 ADVERTISE message. It is destined directly as unicast to the link-local address of PC1.
  • Step 6 - PC1 then knows that a DHCPv6 service is available and sends out a REQUEST packet asking for addressing information.
  • Step 7 - Upon receiving the REQUEST, the server responds with a DHCPv6 REPLY that contains the global unicast address and all other information that is available for assignment.
  • Step 8 - In the end, PC1 performs Duplicate Address Detection (DAD) on the received GUA address to ensure that it is unique.

Note that the DHCPv6 service works in conjunction with the Neighbor Discovery protocol. Although the global address including all other information is provided by the server, the default gateway is provided by Router 1 .

Implementing Stateful DHCPv6 with a Cisco router

For this example, we are going to use a basic topology shown in figure 2. As a Stateful DHCPv6 server, we will use a regular Cisco router named Router2.

There are three mains configuration steps to enable Stateful DHCPv6 service:

  • Set the A-flag in the RA messages to 0 - From a technical standpoint, this is not a mandatory step. But if the A-flag is left to the default value of 1, hosts will obtain a global unicast address from DHCPv6 and will also generate one using SLAAC. Therefore, hosts will have at least two global addresses configured. Typically, companies have security policies in place and want to track the IP addresses on the network. In this case, hosts should not be able to generate addresses on their own. Thus, it is a best practice to disable the SLAAC process by setting the A-flag to 0.
  • Set the M-flag in the RA messages to 1  - To inform hosts in the local network that there is a DHCPv6 server that provides both addressing and other information, routers must advertise this feature using the M-flag in the RA messages.
  • Set up a Stateful DHCPv6 server - A device in the network must act as a DHCP server. It could be a Cisco router or other appliance.

Setting the A-flag to 0 and the M-flag to 1

Let's configure Router 1 from scratch. Note that IPv6 unicast routing must be enabled otherwise the router won't begin sending RA messages.

At this point, all flags in the Router Advertisement messages are set to their default values. By default on Cisco routers, the M-flag is set to 0, the O-flag is set to 0 and the A-flag is set to 1. To enable Stateful DHCPv6 , we must set the M-flag to 1 using the following command under the interface configuration mode.

And disable SLAAC by setting the A-flag to 0 using the following command:

If we now look at a Wireshark capture of the RA messages being sent by Router1, we can verify that the M-flag is set to 1 and the A-flag is set to 0.

Configuring a Cisco router as a Stateful DHCPv6 server

Now it is time to configure Router2 as a DHCPv6 server. The configuration is pretty basic and straightforward. We must create a new DHCP pool using the command ipv6 dhcp pool [ pool-name ] . This will lead us into the pool configuration mode, where we specify all parameters such as prefix, DNS servers, and a domain name. 

After the pool has been created, we must enable it on the interface attached to the link.

Note that we stop Router2 from sending out any Route Advertisement messages with the command  ipv6 nd ra suppress all  because it just plays the role of a server and should not be acting as a router in our example.

Verification Steps

Let's look at some verification steps that we can take to make sure everything worked as expected.

Verifying Router 1 as a Default Router

As you have seen in the Step-by-step explanation, the process starts with the Router Solicitation and Router Advertisement messages exchanged by Router1 and PC1. The most useful command we can use is the show ipv6 interface  that displays all IPv6 and ICMPv6 settings of a particular interface.

Note that the last line says " Hosts use DHCP to obtain addresses ". This means that the M-flag is set to 1 and Router1 informs hosts on the segment to use Stateful DHCPv6. You should not see a line that says " Hosts use stateless autoconfig for addresses " meaning that SLAAC is disabled (A-flag is set to 0)

Verifying Router 2 as a Stateful DHCPv6 server

There are several commands that display information about the status of the DHCPv6 service provided by the router. The show ipv6 dhcp pool command outputs the allocation prefix, along with the other information and the number of active clients. In our example, there is only one active client as expected.

Another useful one is the show ipv6 dhcp bindings command that displays the following important values:

  • Client - This is the link-local address of a client that obtained an IPv6 address from the server. In our example, you can see that this is the LLA of PC1.
  • DUID - This is the DHCP Unique Identifier used to uniquely identify a client. In our example,  the value is the identifier of PC1, shown in the ipconfig /all output below.
  • Address - This is the global unicast address that the DHCPv6 server provided to this client. You will see later on in the ipconfig /all output that this is the IPv6 address PC1 has had configured.

Verifying that PC1 has obtained GUA address

Using the ipconfig /all command on PC1, we can verify that PC1 successfully obtained a global IPv6 address and other information from the DHCP server. You can check based on the DHCP Unique Identifier (DUID) that this is the exact address Router 2 has provided.

Stateful DHCPv6 Wireshark Capture

  • Previous : Stateful Autoconfiguration Model
  • Next : Duplicate Address Detection Algorithm

When to Use Stateless and Stateful Approaches

The stateless approach is used when a site is not concerned with the exact addresses that hosts use. However, the addresses must be unique. The addresses must also be properly routable. The stateful approach is used when a site requires more precise control over exact address assignments. Stateful and stateless address autoconfiguration can be used simultaneously. The site administrator specifies which type of autoconfiguration to use through the setting of appropriate fields in router advertisement messages.

IPv6 addresses are leased to an interface for a fixed, possibly infinite, length of time. Each address has an associated lifetime that indicates how long the address is bound to an interface. When a lifetime expires, the binding, and address, become invalid and the address can be reassigned to another interface elsewhere. To handle the expiration of address bindings gracefully, an address experiences two distinct phases while the address is assigned to an interface. Initially, an address is preferred, meaning that its use in arbitrary communication is unrestricted. Later, an address becomes deprecated in anticipation that its current interface binding becomes invalid. When the address is in a deprecated state, the use of the address is discouraged, but not strictly forbidden. New communication, for example, the opening of a new TCP connection, should use a preferred address when possible. A deprecated address should be used only by applications that have been using the address. Applications that cannot switch to another address without a service disruption can use a deprecated address.

  • © 2010, Oracle Corporation and/or its affiliates

PacketMania

Technology | Knowledge | Sharing

IPv6 Dynamic Address Allocation Mechanism Illustrated

IPv6 supports multiple addresses, making address assignments more flexible and convenient. Unlike IPv4, which relied solely on the DHCP protocol for address assignment, IPv6 incorporates a native Stateless Address AutoConfiguration SLAAC) protocol. SLAAC can either work alone to provide IPv6 addresses to hosts, or it can work with DHCPv6 to generate new assignment schemes. Here is a comprehensive analysis of the dynamic address allocation mechanism for IPv6.

Who the hell knew how much address space we needed? — Vint Cerf (American Internet pioneer and one of "the fathers of the Internet")

IPv6 Address Overview

Address formats.

lan ipv6 address assignment stateless or stateful

The interface identifier can be generated in several ways:

  • Static manual setting
  • Converted from the interface's MAC address using the modified EUI-64 format
  • Obtained from a DHCPv6 server
  • Automatically established randomly or cryptographically

IETF recommends a canonical textual representation format for ease of writing. It includes leading zeros suppression and compression of consecutive all-zero fields. With the network prefix length at the end, the above address can be shortened to 2001:db8:130f :: 7000: 0 :140b/ 64 .

Address Types

RFC 4291 defines three types of addresses:

  • Unicast: A network address corresponds to a single network node, point-to-point connection.
  • Anycast: The target address corresponds to a group of receiving nodes, but only the "nearest" one receives.
  • Multicast: The target address corresponds to a group of nodes that can receive replicated messages.

Note that there are no broadcast addresses in IPv6, their function being superseded by multicast addresses. Anycast addresses are syntactically indistinguishable from unicast addresses and have very limited applications. A typical application for anycast is to set up a DNS root server to allow hosts to look up domain names in close proximity. For unicast and multicast addresses, they can be identified by different network prefixes:

Address Type Binary Form Hexadecimal Form Application
Link-local address (unicast) 1111 1110 10 fe80::/10 Use on a single link, non-routable
Unique local address (unicast) 1111 1101 fd00::/8 Analogous to IPv4 private network addressing
Global unicast address 001 2000::/3 Internet communications
Multicast address 1111 1111 ff00::/8 Group communications, video streaming

lan ipv6 address assignment stateless or stateful

  • All Nodes Addresses on the local link — ff02::1
  • All Routers Addresses on the local link — ff02::2
  • Solicited-Node Address on local link — ff02::1:ffxx:xxxx

Dynamic Allocation Schemes

Ndp protocol.

IPv6 dynamic address assignment depends on Neighbor Discovery Protocol (NDP). NDP acts at the data link layer and is responsible for discovering other nodes and corresponding IPv6 addresses on the link and determining available routes and maintaining information reachability to other active nodes. It provides the IPv6 network with the equivalent of the Address Resolution Protocol (ARP) and ICMP router discovery and redirection protocols in IPv4 networks. However, NDP adds many improvements and new features. NDP defines five ICMPv6 message types:

  • Router Solicitation (RS)
  • Router Advertisement (RA)
  • Neighbor Solicitation (NS)
  • Neighbor Advertisement (NA)

The first two message types here, RS and RA, are the keys to implementing dynamic IPv6 address assignment. The host sends an RS message to the multicast address ff02::2 of all routers in the local network segment to request routing information. When the router receives the RS from the network node, it sends an immediate RA in response. The message format of the RA is as follows


2
3
4
5
6
7
8
9
10
11
12
13

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Cur Hop Limit |M|O| Reserved | Router Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reachable Time |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Retrans Timer |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options ...
+-+-+-+-+-+-+-+-+-+-+-+-

It defines two special bits, M and O, with the following meaning:

  • M — "Managed address configuration" flag, set to 1 when the address is obtained from DHCPv6.
  • O — "Other configuration" flag, set to 1 to indicate that other configuration information is available via DHCPv6

The RA message ends with the Options section, which originally had three possible options: Source Link-Layer Address, MTU, and Prefix Information. Later, RFC 8106 (which replaced RFC 6106) added the Recursive DNS Server (RDNSS) and DNS Search List (DNSSL) options. The Prefix Information option directly provide hosts with on-link prefixes and prefixes for Address Autoconfiguration, and it has the following format


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Length | Prefix Length |L|A| Reserved1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Valid Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Preferred Lifetime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reserved2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
+ +
| |
+ Prefix +
| |
+ +
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Here the Prefix Length and the Prefix jointly determine the network prefix of the IPv6 address. In addition, the Prefix Information option also defines two special bits, L and A:

  • L — on-link flag. When set, indicates that this prefix can be used for on-link determination.
  • A — autonomous address-configuration flag. When set, indicates that this prefix can be used for SLAAC.

Similar to the IPv4 subnet mask feature, the purpose of the "on-link" determination is to allow the host to determine which networks an interface can access. By default, the host only considers the network where the link-local address is located as "on-link". If the "on-link" status of a destination address cannot be determined, the host forwards the IPv6 datagram to the default gateway (or default router) by default. When the host receives an RA message, if the "on-link" flag for a prefix information option is set to 1 and the Valid Lifetime is also a non-zero value, the host creates a new prefix network entry for it in the prefix list. All unexpired prefix network entries are "on-link".

Message Sequence

After understanding the NDP protocol and the information conveyed by the RA messages, let's see how they guide the network nodes to achieve dynamic address assignment.

Routers in the network periodically send RA messages to the multicast addresses (ff02::1) of all nodes in the local subnet. However, to avoid latency, the host sends one or more RS messages to all routers in the local subnet as soon as it has finished booting. The protocol requires the routers to respond to the RA messages within 0.5 seconds. Then, based on the values of the M/O/A bits in the received RA messages, the host decides how to dynamically configure the unique local and global unicast addresses of the interface and how to obtain other configuration information. With certain combinations of bit fetch values, the host needs to run DHCPv6 client software to connect to the server to obtain address assignment and/or other configuration information. The entire process is shown in the following message sequence diagram.

Note: Unlike the IPv4 DHCP protocol, DHCPv6 clients use UDP port 546 and servers use UDP port 547.

Next explain in detail three dynamic allocation schemes determined by the combination of the M/O/A-bit values:

SLAAC + Stateless DHCPv6

Stateful dhcpv6.

SLAAC is the simplest automatic IPv6 address assignment scheme and does not require any server. It works by sending an RS message request after the host starts up and the router sends back RA messages to all nodes in the local network segment. If the RA message contains the following configuration

  • M-bit and O-bit all clear in the message header
  • L-bit and A-bit all set in Prefix Information option

Then the host receives this RA message and performs the following operations to implement SLAAC:

  • Combine the network prefix with the local interface identifier to generate a unique local address or global unicast address.
  • Install the default gateway (or default route) to point to the router address (source address of the RA message).
  • Set this interface as the "on-link" corresponding to the network prefix, which is also the next-hop interface of the default gateway above.
  • If the RDNSS and/or DNSSL options are included, install the name servers and domain name suffixes.

This way, the host gets one or more IPv6 unique local addresses or global unicast addresses, plus the default gateway and domain name service information to complete various Internet connections.

The following is an example of the SLAAC configuration on a Cisco Catalyst 9300 Multilayer Access Switch:


2
3
4
5
6

interface Vlan10
ipv6 enable
ipv6 address 2001:ABCD:1000::1/64
ipv6 nd ra dns server 2001:4860:4860::8888 infinite
ipv6 nd ra dns search-list example.com

The Layer 3 interface of the Cisco Multilayer Switch provides routing functionality. As you can see, when IPv6 is activated on the Layer 3 interface in VLAN 10, its default address auto-assignment scheme is SLAAC. the control bits of RA messages from this interface are all set according to the SLAAC scheme, and the network prefixes for each IPv6 address it configures are automatically added to the RA prefix information options list. Of course, the network administrator can also exclude certain network prefixes with a separate interface configuration command. The last two lines of the example configuration command specify RDNSS and DNSSL, which are also added to the RA message options.

If a host connects to a port in VLAN 10, it immediately gets a global unicast address with the network prefix of 2001:ABCD:1000::/64, and its default gateway address is set to 2001:ABCD:1000::1. Open a browser and enter a URL, and it will send a message to the specified domain name server 2001:4860:4860::8888 (Google's public name server address) to obtain the IPv6 address of the destination URL to establish a connection.

SLAAC automatic address assignment is fast and easy, providing a plug-and-play IPv6 deployment solution for small and medium-sized network deployments. However, if a network node needs access to additional configuration information, such as NTP/SNTP server, TFTP server, and SIP server addresses, or if its functionality relies on certain Vendor-specific Information Options, it must choose SLAAC + stateless DHCPv6 scheme.

This scenario still uses SLAAC automatic address assignment, but the router instructs the host to connect to a DHCPv6 server for additional configuration information. At this point, the RA message sent back by the router has

  • M-bit clear and O-bit set in the message header

After receiving this RA message, the host performs the following actions:

  • Install a default gateway (or default route) pointing to the router address (source address of the RA message).
  • Start the DHCPv6 client and connect to the DHCPv6 server to request additional configuration information .
  • Save the additional configuration information replied by the DHCPv6 server .

As you can see, SLAAC + stateless DHCPv6 is not different from SLAAC in terms of address assignment. DHCPv6 only provides additional configuration information and does not assign IPv6 addresses. So the DHCPv6 server does not track the address assignment status of network nodes, which is what "stateless" means.

The corresponding configuration commands on the Catalyst 9300 switch are as follows.


2
3
4
5
6
7
8
9
10
11

ipv6 dhcp pool vlan-10-clients
dns-server 2001:4860:4860::8888
domain-name example.com
sntp address 2001:DB8:2000:2000::33
interface Vlan10
ipv6 enable
ipv6 address 2001:ABCD:1000::1/64
ipv6 nd other-config-flag
ipv6 dhcp server vlan-10-clients
# ipv6 dhcp relay destination 2001:9:6:40::1

The difference with the SLAAC example is that the VLAN 10 interface configuration command ipv6 nd other-config-flag explicitly specifies to set the O-bit of the RA message. Its next command, ipv6 dhcp server vlan-10-clients , activates the DHCPv6 server response feature of the interface, corresponding to the server's pool name of vlan-10-clients . The DHCPv6 server is configured above the interface configuration, starting at ipv6 dhcp pool vlan-10-clients , and contains the DNS server address, DNS domain name, and SNTP server address.

If you are using a separate DHCPv6 server located on a network segment, you can remove the ipv6 dhcp server command and enable the ipv6 dhcp relay destination command on the next line of the example to specify the address to forward DHCPv6 requests to the external server.

Many large enterprises use DHCP to manage the IPv4 addresses of their devices, so deploying DHCPv6 to centrally assign and manage IPv6 addresses is a natural preference. This is where Stateful DHCPv6 comes into play. This scenario also requires RA messages sent by the router but does not rely solely on network prefixes for automatic address assignment. The control bits of the RA messages are configured to

  • M-bit set in the message header, O-bit does not matter
  • L-bit and A-bit can be set or clear as desired in Prefix Information option

Upon receiving this RA message, the host performs the following actions:

  • Generate a unique local address or a global unicast address if there is a Prefix Information option with the A-bit set.
  • If there is a Prefix Information option with the L-bit set, set this interface to "on-link" with the corresponding network prefix.
  • If the RDNSS and/or DNSSL options are included, install the name servers and domain suffixes.
  • Start the DHCPv6 client and connect to the server to request addresses and other configuration information .
  • Set the address assigned by the DHCPv6 server to this interface .
  • Save additional configuration information from the DHCPv6 server response .

An example of the Stateful DHCPv6 configuration command on a Catalyst 9300 switch is as follows.


2
3
4
5
6
7
8
9
10
11
12

ipv6 dhcp pool vlan-10-clients
address prefix FD09:9:5:90::/64
address prefix 2001:9:5:90::/64
dns-server 2001:9:5:90::115
domain-name test.com
interface Vlan10
ipv6 enable
ipv6 address 2001:ABCD:1:1::1/64
ipv6 nd prefix 2001:ABCD:1:1::/64 no-advertise
ipv6 nd managed-config-flag
ipv6 dhcp server vlan-10-clients

Compared to SLAAC + Stateless DHCPv6 , the interface configuration here removes the ipv6 nd other-config-flag and replaces it with the ipv6 nd managed-config-flag command. This corresponds to setting the M-bit of the RA message header. The DHCPv6 server configuration adds two address prefix commands to set the network prefix. Also, the ipv6 nd prefix 2001:ABCD:1:1::/64 no-advertise configured for the interface specifies that the router does not include the 2001:ABCD:1:1::/64 prefix information option into the RA. So, this example host interface will not generate SLAAC addresses, but only two addresses from DHPCv6: a unique local address with the network prefix FD09:9:5:90::/64, and a global unicast address with the network prefix 2001:9:5:90::/64. The interface identifier for each of these two addresses is also specified by DHPCv6.

How to distinguish the source of dynamically assigned addresses for host interfaces? The method is simple. One thing to remember is that DHPCv6 does not send the network prefix length to the requestor, so the network prefix length of the addresses received from DHPCv6 is 128, while the network prefix length of the addresses generated by SLAAC will not be 128. See the following example of the wired0 interface on a Linux host:


2
3
4
5
6
7
8
9
10

wired0 Link encap:Ethernet HWaddr A0:EC:F9:6C:D9:30
inet6 addr: 2001:20::53c7:1364:a4d8:fd91/128 Scope:Global
inet6 addr: 2001:20::a2ec:f9ff:fe6c:d930/64 Scope:Global
inet6 addr: fe80::a2ec:f9ff:fe6c:d930/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:510 errors:0 dropped:0 overruns:0 frame:0
TX packets:1213 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:93670 (91.4 KiB) TX bytes:271979 (265.6 KiB)

We can immediately determine that the interface is using Stateful DHCPv6 address assignment, but also generates the SLAAC address with the same network prefix 2001:20::/64 received.

  • 2001:20::53c7:1364:a4d8:fd91/128 — DHCPv6 address, random interface identifer
  • 2001:20::a2ec:f9ff:fe6c:d930/64 — SLAAC addeess, interface identifer is MAC in EUI-64 format
  • fe80::a2ec:f9ff:fe6c:d930/64 — Link-local address, interface identifer is MAC in EUI-64 format

Note: DHPCv6 server also does not provide any IPv6 default gateway information. The host needs to be informed of the dynamic default gateway from the RA message.

Summary and Comparison

The following table shows the control bit combinations of RA messages concerning different address allocation and other configuration acquisition methods.

M-bit O-bit A-bit Host Address Other Configuration
0 0 0 Static Settings Manual Configuration
0 0 1 Prefix specified by RA, automatically generated manually configured
0 1 0 Static Settings DHCPv6
0 1 1 Prefix specified by RA, automatically generated DHCPv6
1 0 0 Stateful DHCPv6 DHCPv6
1 0 1 Stateful DHCPv6 and/or automatically generated DHCPv6
1 1 0 Stateful DHCPv6 DHCPv6
1 1 1 Stateful DHCPv6 and/or automatically generated DHCPv6

Summarize three dynamic allocation schemes:

Allocation Scheme Features Appiccation Scenarios
SLAAC Simple and practical, fast deployment SMB, Consumer Product Networking, Internet of Things (IoT)
SLAAC + Stateless DHCPv6 Auto Configuration, Extended Services SMBs need additional network services
Stateful DHCPv6 Centralized management and control Large enterprises, institutions, and campus networks

Note: Since IPv6 network interfaces can have multiple addresses (a link-local address, plus one or more unique local addresses and/or global unicast addresses), it becomes important how the source address is selected when establishing an external connection. RFC 6724 gives detailed IPv6 source address selection rules. In the development of embedded systems, the control plane and the data plane connected to the same remote device are often implemented by different functional components. For example, the control plane directly calls a Linux userspace socket to establish the connection, and the IPv6 source address used for the connection is selected by the TCP/IP stack, while the data plane directly implements data encapsulation processing and transmission in kernel space. In this case, the IPv6 source address selected by the control plane has to be synchronized to the data plane in time, otherwise, the user data might not be delivered to the same destination.

Troubleshooting Guide

The common IPv6 dynamic address assignment debugging and troubleshooting commands on Cisco routers and switches are listed in the following table.

Command Description
Displays a short summary of IPv6 status and configuration for each interface
Displays IPv6 and NDP usability status information for single interface
Displays IPv6 network prefix information for single interface
Display DHCPv6 configuration pool information
Displays all automatic client bindings from the DHCPv6 server binding table
Display DHCPv6 interface information
Debug IPv6 NDP protocol
Debug DHCPv6 server

The following console NDP protocol debug log shows that the router received an RS message from host FE80::5850:6D61:1FB:EF3A and responded with an RA message to the multicast address FF02::1 of all nodes in this network:


2
3
4
5
6
7
8

ICMP Neighbor Discovery events debugging is on
Router# show logging | include RS
ICMPv6-ND: Received RS on GigabitEthernet0/0/0 from FE80::5850:6D61:1FB:EF3A
Router# show logging | include RA
ICMPv6-ND: Sending solicited RA on GigabitEthernet0/0/0
ICMPv6-ND: Request to send RA for FE80::C801:EFFF:FE5A:8
ICMPv6-ND: Setup RA from FE80::C801:EFFF:FE5A:8 to FF02::1 on GigabitEthernet0/0/0

And the next log shows an example of Stateless DHCPv6 observed after entering the debug ipv6 dhcp debug command. Host FE80::5850:6D61:1FB:EF3A sends an INFORMATION-REQUEST message to the DHCPv6 server, which selects the source address FE80::C801:B9FF:FEF0:8 and sends a response message.


2
3
4
5
6
7
8

IPv6 DHCP debugging is on

IPv6 DHCP: Received INFORMATION-REQUEST from FE80::5850:6D61:1FB:EF3A on FastEthernet0/0
IPv6 DHCP: Option VENDOR-CLASS(16) is not processed
IPv6 DHCP: Using interface pool LAN_POOL
IPv6 DHCP: Source Address from SAS FE80::C801:B9FF:FEF0:8
IPv6 DHCP: Sending REPLY to FE80::5850:6D61:1FB:EF3A on FastEthernet0/0

The following debug log of Stateful DHCPv6 shows the complete process of two message exchanges (SOLICIT/ADVERTISE, REQUEST/REPLY) on lines 1, 15, 16, and 26.


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

IPv6 DHCP: Option UNKNOWN(39) is not processed
IPv6 DHCP: Option VENDOR-CLASS(16) is not processed
IPv6 DHCP: Using interface pool LAN_POOL
IPv6 DHCP: Creating binding for FE80::5850:6D61:1FB:EF3A in pool LAN_POOL
IPv6 DHCP: Binding for IA_NA 0E000C29 not found
IPv6 DHCP: Allocating IA_NA 0E000C29 in binding for FE80::5850:6D61:1FB:EF3A
IPv6 DHCP: Looking up pool 2001:ABCD::/64 entry with username '000100011F3E8772000C29806CCC0E000C29'
IPv6 DHCP: Poolentry for the user not found
IPv6 DHCP: Allocated new address 2001:ABCD::D9F7:61C:D803:DCF1
IPv6 DHCP: Allocating address 2001:ABCD::D9F7:61C:D803:DCF1 in binding for FE80::5850:6D61:1FB:EF3A, IAID 0E000C29
IPv6 DHCP: Updating binding address entry for address 2001:ABCD::D9F7:61C:D803:DCF1
IPv6 DHCP: Setting timer on 2001:ABCD::D9F7:61C:D803:DCF1 for 60 seconds
IPv6 DHCP: Source Address from SAS FE80::C801:B9FF:FEF0:8
IPv6 DHCP: Sending ADVERTISE to FE80::5850:6D61:1FB:EF3A on FastEthernet0/0
IPv6 DHCP: Received REQUEST from FE80::5850:6D61:1FB:EF3A on FastEthernet0/0
IPv6 DHCP: Option UNKNOWN(39) is not processed
IPv6 DHCP: Option VENDOR-CLASS(16) is not processed
IPv6 DHCP: Using interface pool LAN_POOL
IPv6 DHCP: Looking up pool 2001:ABCD::/64 entry with username '000100011F3E8772000C29806CCC0E000C29'
IPv6 DHCP: Poolentry for user found
IPv6 DHCP: Found address 2001:ABCD::D9F7:61C:D803:DCF1 in binding for FE80::5850:6D61:1FB:EF3A, IAID 0E000C29
IPv6 DHCP: Updating binding address entry for address 2001:ABCD::D9F7:61C:D803:DCF1
IPv6 DHCP: Setting timer on 2001:ABCD::D9F7:61C:D803:DCF1 for 172800 seconds
IPv6 DHCP: Source Address from SAS FE80::C801:B9FF:FEF0:8
IPv6 DHCP: Sending REPLY to FE80::5850:6D61:1FB:EF3A on FastEthernet0/0

For complex cases where it is difficult to identify whether the problem is with the host, router, or DHCPv6 server, we recommend using the free open-source network packet analysis software Wireshark to capture packets of the entire process for analysis. While analyzing packets with Wireshark, you can apply the keyword filtering function.

Filter String Only Show
icmpv6.type=133 ICMPv6 RS
icmpv6.nd.ra.flag ICMPv6 RA
dhcpv6 DHCPv6 packets

We can either run Wireshark directly on the host side, or we can use the Switched Port Analyzer (SPAN) provided with the switch. Running on the network side, SPAN can collectively redirect packets from a given port to the monitor port running Wireshark for capturing. Cisco Catalyst 9300 Series switches also directly integrate with Wireshark software to intercept and analyze filtered packets online, making it very easy to use.

Sample packet capture files for three allocation scheme are available here for download and study: slaac.pcap , stateless-dhcpv6.pcap , stateful-dhcpv6.pcap

IPv6 Product Certification Test

Accurate and effective testing of IPv6 products is key to ensuring high interoperability, security, and reliability of IPv6 infrastructure deployments. The IPv6 Ready logo is an IPv6 testing and certification program created by the IPv6 Forum . Its goals are to define IPv6 conformance and interoperability test specifications, provide a self-testing toolset, establish Global IPv6 Test Centers and provide product validation services, and finally, issue IPv6 Ready logo.

In May 2020, IPv6 Ready Logo Program published new version 5.0 test specifications :

  • IPv6 Core Protocols Test Specification (Conformance)
  • IPv6 Core Protocols Interoperability Test Specification (Interoperability)

Along with these two new test specifications, the project team also affirmed two permanent changes:

  • Testing must be done in an IPv6-only environment, without any IPv4 being used for the device to function.
  • The device under test must have IPv6 on and enabled on all IP interfaces by default.

Not surprisingly, the new version 5.0 core protocols test specification has a section dedicated to defining SLAAC test cases to validate this core IPv6 protocol.

IPv6 Core Protocol RFC List

In the list below, the RFCs shown in bold are directly covered by the IPv6 Ready Version 5.0 Core Protocol Test Specification:

  • RFC 4191 Default Router Preferences and More-Specific Routes
  • RFC 4193 Unique Local IPv6 Unicast Addresses
  • RFC 4291 IP Version 6 Addressing Architecture
  • RFC 4443 Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification
  • RFC 4861 Neighbor Discovery for IP version 6 (IPv6)
  • RFC 4862 IPv6 Stateless Address Autoconfiguration
  • RFC 4941 Privacy Extensions for Stateless Address Autoconfiguration in IPv6
  • RFC 5095 Deprecation of Type 0 Routing Headers in IPv6
  • RFC 6724 Default Address Selection for Internet Protocol Version 6 (IPv6)
  • RFC 6980 Security Implications of IPv6 Fragmentation with IPv6 Neighbor Discovery
  • RFC 7217 A Method for Generating Semantically Opaque Interface Identifiers with IPv6 Stateless Address Autoconfiguration (SLAAC)
  • RFC 8064 Recommendation on Stable IPv6 Interface Identifiers
  • RFC 8106 IPv6 Router Advertisement Options for DNS Configuration
  • RFC 8200 Internet Protocol, Version 6 (IPv6) Specification
  • RFC 8201 Path MTU Discovery for IP version 6
  • RFC 8415 Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
  • Gitalk Comments
  • Utterances Comments
  • Disqus Comments

4sysops

  • IT Administration Forum
  • PowerShell Forum
  • Community Forum
  • PowerShell Group
  • Earning as 4sysops member
  • Member Ranks
  • Member Leaderboard – This Month
  • Member Leaderboard – This Year
  • Member Leaderboard – All-time
  • Author Leaderboard – 30 Days
  • Author Leaderboard – 365 Days
  • Cloud Computing
  • Write for 4sysops

The difference between stateless and stateful mode of a Windows Server 2008 R2 DHCPv6 server

4sysops - The online community for SysAdmins and DevOps

Avatar

The difference between stateless and stateful IPv6 autoconfiguration

Stateless mode and stateful mode of a windows 2008 r2 dhcp server, how to change a dhcpv6 server from stateless to stateful mode.

  • Recent Posts

Michael Pietroforte

  • What is model fine-tuning? An OpenAI GPT example - Fri, Aug 16 2024
  • What is AGI (Artificial General Intelligence)? - Fri, Aug 9 2024
  • Create an Assistant with Vector Store using the OpenAI API and curl - Thu, Aug 8 2024

When I first installed a DHCPv6 server on Window Server 2008 R2, my clients (Vista and Windows 7) were unable to receive IP addresses. Thus, I started googling to find out what went wrong. I found quite a few official and unofficial resources with promising advice. In the end, it turned out that most of those resources were either outdated or simply provided wrong information. In my last post about DHCPv6 server installation , I mentioned the wrong advice regarding client settings.

Stateful.DHCP.server

However, the most prominent confusion about setting up DHCPv6 on Windows Server 2008 R2 is the difference between stateless and stateful autoconfiguration. I briefly discussed the difference already in my article about the IPv6 features. With stateless autoconfiguration of IPv6 addresses, a host uses the IPv6 prefix (the subnet address) advertised by a router on the link (subnet) to generate an IPv6 address.

Clients can use the MAC address of their network interface to determine the interface identifier. The interface identifier is the last 64 bits of an IPv6 address. If you are interested in how this interface identifier generation works in stateless autoconfiguration, I recommend this explanation .

Much of the confusion on the web stems from the fact that when you install the DHCP role on a Window 2008 or R2 server, you have to choose whether you " Enable DHCPv6 stateless mode for this server " or " Disable DHCPv6 stateless mode for this server " (see screenshots). Since disabling stateless mode seems to imply that you enable stateful mode, many recommend that you re-install your DHCP server and make sure that your DHCP server is in stateful mode because only then will it issue IPv6 addresses to DHCPv6 clients.

DHCPv6 server stateless mode

This claim is wrong. As to my tests, this setting makes no difference with regard to automatic IPv6 address assignment through a Windows DHCPv6 server. The only difference between those two options is that if you choose to enable stateless mode, the installation wizard will ask for a Parent Domain and an IPv6 DNS Server. The reason for this is that, with stateless autoconfiguration, clients can only receive the IPv6 prefix from a router to derive the IPv6 address but no additional network settings as the DNS server.

However, a router can tell clients to obtain this configuration from a DHCPv6 server by setting the so-called M Flag to 0 and the O Flag to 1. In this scenario, the corresponding DHCP server runs in stateless mode because it won't assign IPv6 addresses to clients. But since you have no IPv6 scopes in stateless mode on the DHCP server where you could assign those options, you have to configure them during the DHCP server installation and assign them to the server. More information about the M Flag and O Flag can be found in this article .

Difference stateless stateful mode - DHCP IPv6 - DNS Settings

I also often saw the question of how to change the mode of a Windows DHCPv6 server from stateless to stateful mode. Since there is no explicit setting where you could change a Windows DHCP server from stateful to stateless mode in the DHCP management console, it is often recommended to re-install the DHCP server. However, from what I have just said above, it is clear that this advice doesn't make sense.

All you have to do is to change the DHCP server from stateless to stateful mode is to add and activate an IPv6 scope and you get a stateful DHCPv6 server that is able to assign IPv6 addresses to clients.

Change a stateless DHCP server to a stateful DHCPv6 server

And if you want to move a DHCP server from stateful to stateless mode, you simply have to deactivate or delete all IPv6 scopes from the server.

The parameters Parent Domain and IPv6 DNS Server, which the installation wizard asked for during the DHCP server role installation if you chose "enable stateless mode," can be added manually to the Server Options node in the DHCP management console. The stateless DHPC server can then configure clients with these settings while the IPv6 prefix has to be provided by a router.

IT Administration News

  • Multiple flaws in Microsoft macOS apps unpatched despite potential risks
  • Windows 11 23H2 update KB5041585 fails to install, causes performance, Taskbar, search & other issues for many users – WinCentral
  • Secret scanning for non-code GitHub surfaces is now generally available – GitHub Changelog
  • Microsoft: Enable MFA or lose access to admin portals in October
  • August 2024 Patch Tuesday – 90 vulnerabilities, 9 zero day

Read All IT Administration News

Join our IT community and read articles without ads!

Do you want to write for 4sysops? We are looking for new authors.

Poll results: When does your organization plan to deploy IPv6?

Poll results: When does your organization plan to deploy IPv6?

lan ipv6 address assignment stateless or stateful

How to install a DHCP server for IPv6 (DHCPv6) on Windows Server 2008 R2

Poll: When will you deploy IPv6 in your organization?

Poll: When will you deploy IPv6 in your organization?

IPv6 tutorial - Part 8: Special addresses

IPv6 tutorial – Part 8: Special addresses

IPv6 tutorial - Part 7: Zone ID and unique local IPv6 unicast addresses

IPv6 tutorial – Part 7: Zone ID and unique local IPv6 unicast addresses

IPv6 tutorial - Part 6: Site-local addresses and link-local addresses

IPv6 tutorial – Part 6: Site-local addresses and link-local addresses

lan ipv6 address assignment stateless or stateful

IPv6 tutorial – Part 5: Address types and global unicast addresses

IPv6 tutorial - Part 3: New features: IPsec and LAN features

IPv6 tutorial – Part 3: New features: IPsec and LAN features

lan ipv6 address assignment stateless or stateful

IPv6 tutorial – Part 2: New features: Routing

lan ipv6 address assignment stateless or stateful

IPv6 tutorial – Part 1: Get started now!

Avatar

Great Info :o)

Avatar

Great document!

I noticed that you’re using a ‘special’ sample IPv6 address. Say I want to use my own site-link address; how do I generate/get such address? I know these start from FEC:: through FFF::, but how I do go about generating them?

Avatar

@ Edward , please see the SixXS ULA page , or read RFC 4193 .

Avatar

I didn’t understand your explaination of what stateful mode is. I am not a computer expert. I just want a simple answer to the question.

Avatar

Stateful – dhcp server assigns ip addresses to clients

Stateless – clients generate addresses by assistance from a router (this is configurable)

Avatar

great summarized informations

Avatar

Compare Address Auto-Configuration and DHCPv6 and how the co-exist.

Avatar

How to configure Windows server 2019 as stateful DHCPv6 Server?

Leave a reply Click here to cancel the reply

Please enclose code in pre tags: <pre></pre>

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Receive new post notifications

Twitter

Subscribe to Newsletter

Follow 4sysops.

Please ask IT administration questions in the forums . Any other messages are welcome.

Log in with your credentials

or      Create an account

Forgot your details?

Create account.

Get the Reddit app

Explain Like I'm Five is the best forum and archive on the internet for layperson-friendly explanations. Don't Panic!

ELI5: What is the difference between DHCPv6 stateful, DHCP stateless, and SLAAC?

Courses moved online and the material we were given makes this part a bit confusing.

By continuing, you agree to our User Agreement and acknowledge that you understand the Privacy Policy .

Enter the 6-digit code from your authenticator app

You’ve set up two-factor authentication for this account.

Enter a 6-digit backup code

Create your username and password.

Reddit is anonymous, so your username is what you’ll go by here. Choose wisely—because once you get a name, you can’t change it.

Reset your password

Enter your email address or username and we’ll send you a link to reset your password

Check your inbox

An email with a link to reset your password was sent to the email address associated with your account

Choose a Reddit account to continue

Stateless autoconfiguration for IPv6

Stateless autoconfiguration for IPv6 is like a “mini-DHCP” server for IPv6. Routers running IPv6 can give the prefix of the network and a gateway address to clients looking for an IPv6 address. IPv6 uses the NDP (Neighbor Discovery Protocol), and one of the things this protocol offers is RS (Route Solicitation and (RA) Router Advertisement messages that help an IPv6 device configure an IPv6 address automatically. Let’s take a look at a configuration example:

two routers running ipv6

Besides configuring an IPv6 address, we must use the ipv6 unicast-routing command to make R2 act like a router. Remember this command since you need it for routing protocols as well.

We need to enable ipv6 address autoconfig on R1 to make sure it generates its own IPv6 address.

We can use debug ipv6 nd to watch the whole process.

We're Sorry, Full Content Access is for Members Only...

  • Learn any CCNA, CCNP and CCIE R&S Topic . Explained As Simple As Possible.
  • The Best Investment You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 793 Lessons . More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

593 Sign Ups in the last 30 days

satisfaction-guaranteed

Forum Replies

Good article…

Making it a little more comprehensive will make it a lot better and one of the best learning source especially for starters.

Thanks. I’ll add some more IPv6 stuff in the feature, especially since the new CCNA exams cover much more IPv6 then the previous version.

good article. But I could not get ipv6 address from my neighbor router in gns3 ((

Did you enable the interfaces? It worked fine on a couple of 3600 routers in GNS3.

it works for me. using 7200

44 more replies! Ask a question or join the discussion by visiting our Community Forum

IPv6 Address Assignment with Stateless Auto-Configuration

lan ipv6 address assignment stateless or stateful

The debate over the pros and cons of transitioning to IPv6 continues. Recent articles have agreed that many organizations are IPv6 capable, but because of NAT (Network address translation) borrowing us time against running out of available IP addresses, and the cost associated with upgrading providers’ hardware being a deterrent, IPv6 isn’t as widely used as some experts thought it may be at this time. In any case, it still seems safe to say that IPv6 is an inevitability.

What is IPv6 stateless auto-configuration?

One aspect of IPv6 that seems intriguing is the stateless auto-configuration. IPv6 stateless auto-configuration is a quick-and-easy, plug-and-play method of having a host join an existing IPv6 network.  Stateless auto-configuration process consists of the following:

The IPv6 host generates a link-local address for its interface. A link-local address is formed by taking the well-known link-local prefix of fe80:: and appending an interface identifier . The interface identifier is derived from the host’s MAC address. This link-local address is used solely on the host’s segment and is not routable. An example of a link-local address – fe80::21b:63ff:feab:e6a6 where 21b:63ff:feab:e6a6 was derived from the host’s MAC address using the EUI-64 interface id assignment.

The link-local address is created so the host can use it to send a Router solicitation message to the all-routers multicast group on its local segment, requesting a router inform the host on what network (prefix) it resides.

In response to its Router solicitation request, the host receives a Router Advertisement (RA) containing the prefix. The host creates its IPv6 address by appending its interface identifier to the prefix . An example of a host’s IPv6 address – 2001:DB8::212:7FFF:FEEB:6B40 where 212:7FFF:FEEB:6B40 was derived from the host’s MAC address using the EUI-64 interface id assignment.

Stateless auto-configuration is not a replacement for DHCP (Dynamic Host Configuration Protocol). DHCPv6 will still be used when hosts require addresses for NTP servers, TFTP servers, and other common options. DHCPv6 also offers the audit, tracking and management capabilities if more control of address assignment is required.

To learn more about Cisco training, visit https://go.skyline-ats.com/ciscotraining

' src=

Tony DeSimone

Tony DeSimone is a Senior Content Engineer at Skyline ATS with a unique combination of 17 years of certified IT instructor experience coupled with hands-on network administration, course development, and a business background with a degree in management information systems.

Breaking Down the Cisco ENCOR Exam: Infrastructure

Video: what’s the difference between lan, man and wan, related posts, use python pygal to visualize network snmp data, what nbar is and how to use it, how to troubleshoot a network connectivity issue, video: cisco exam taking tips 101, what you need to know about the comptia..., what is static routing and what do we..., top 5 ways to use gre tunneling, breaking down the cisco devnet associate exam: network..., finding the best way to learn about networking, how to run flask in containers.

Close Bitnami banner

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to know an IPv6 address is configured stateful/stateless under Linux?

On macOS, I can rely on IN6_IFF_AUTOCONF (SLAAC) and IN6_IFF_DYNAMIC (DHCPv6). https://opensource.apple.com/source/xnu/xnu-4570.41.2/bsd/netinet6/in6_var.h.auto.html

On Windows, I have NL_PREFIX_ORIGIN and NL_SUFFIX_ORIGIN fields.

How can I know which configuration method (stateful/stateless) produced a particular IPv6 address on Linux? I didn't find any useful flags in ifa_flags field.

youfu's user avatar

  • 1 An IPv6 network interface can have many addresses. Are you asking "which address configuration methods this interface is configured to support?" or "which configuration method produced this particular IPv6 address?" –  telcoM Commented Oct 14, 2020 at 10:53
  • 1 “which configuration method produced this particular IPv6 address?” –  youfu Commented Oct 14, 2020 at 14:02

For stateless, use the command: ip addr show dynamic

For stateful, use the command: ip addr show permanent

Quoting the ip-address man page:

DericS's user avatar

  • Did you test before answer? I cannot find any relationship between dynamic/permanent and stateless/stateful. –  youfu Commented Oct 15, 2020 at 3:12
  • Yes some testing was done, although nothing exhaustive. The quote from the ip-address man page seems to provide one relationship between stateless and dynamic. From RFC4862 ( tools.ietf.org/html/rfc4862 ) "Avoided the wording of "stateful configuration", which is known to be quite confusing, and simply used "DHCPv6" wherever appropriate.", which might explain why "stateful" is not mentioned in that man page. There's a reasonable chance that I've interpreted your question differently than you intended. At "new contributor" level I'm not able to ask for clarification before responding. –  DericS Commented Oct 15, 2020 at 13:21

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged linux networking ipv6 ..

  • Featured on Meta
  • Bringing clarity to status tag usage on meta sites
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Announcing a change to the data-dump process

Hot Network Questions

  • If I purchase a house through an installment sale, can I use it as collateral for a loan?
  • Move line matching string to top of the file
  • Just got a new job... huh?
  • Did the United States have consent from Texas to cede a piece of land that was part of Texas?
  • Does a cube under high pressure transform into a ball?
  • Easyjet denied EU261 compensation for flight cancellation during Crowdstrike: Any escalation or other recourse?
  • Could a gas giant still be low on the horizon from the equator of a tidally locked moon?
  • 10th-order Runge-Kutta Method
  • Jacobi-Trudi-like identity with dual characters
  • How to install a second ground bar on a Square D Homeline subpanel
  • Creating a deadly "minimum altitude limit" in an airship setting
  • How common is it for external contractors to manage internal teams, and how can we navigate this situation?
  • Ecuador: what not to take into the rainforest due to humidity?
  • Finite loop runs infinitely
  • How much was Boole influenced by Indian logic?
  • How Subjective is Entropy Really?
  • For applying to a STEM research position at a U.S. research university, should a resume include a photo?
  • Is there an efficient way to extract a slice of a 3d array?
  • Is the oil level here too high that it needs to be drained or can I leave it?
  • Where exactly was this picture of a huge solar eruption taken?
  • putting each character of multiple lines into a register corresponding to its relative position in the line
  • Is magnetic flux in a transformer proportional to voltage or current?
  • Is the Garmin Edge 530 still a good choice for a beginner in 2024?
  • Produce -5 V with 250 mA max current limitation

lan ipv6 address assignment stateless or stateful

  • Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
  • Advertising & Talent Reach devs & technologists worldwide about your product, service or employer brand
  • OverflowAI GenAI features for Teams
  • OverflowAPI Train & fine-tune LLMs
  • Labs The future of collective knowledge sharing
  • About the company Visit the blog

Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Get early access and see previews of new features.

IPv6 Address Assignments

I have just started working with IPv6, so I've done a lot of reading in the last couple of days. Unfortunately, some of my questions have not been answered in my research.

My goal is to keep track of what addresses are assigned, and to what interface they are assigned. From what I've read, there are a few ways that an interface can get an IPv6 address, which I've listed below in sub sections. I've highlighted what I've discovered so far, and posed some questions in these sections. If anyone can make any corrections to what I've learned, or have answers to the questions, please do so. If anyone knows of a place I can find more information, I don't mind researching it more myself.

Edit: I've discovered that Prefix Delegation does not actually result in address assignment. It is used by DHCP servers to get the prefixes to use from another DHCP server.

The methods for obtaining an IPv6 address are:

  • StateLess Address Auto-Config (SLAAC)

Stateful DHCPv6

SLAAC is used in small networks to generate an IPv6 address for an interface. It requires (almost) no configuration and basically works as follows:

  • When the interface comes online, the client will generate a link-local IPv6 address using its interface ID address and the link-local prefix ( FE80::/10 ).
  • To verify this address is unique, a Neighbour Solicitation ( NS ) message is sent to the address. If there is a reply, then the address is in use and cannot be used. Auto-config is aborted and configuration should proceed manually. Question 1a: Is there really no fall back here?

Assuming no reply is received by the end of the timeout period, the address is assumed to be unique and it is assigned as the link-local address to the interface.

Now the node has connectivity to all other nodes on this link

The node either waits to receive a Router Advertisement ( RA ), or sends a Router Solicitation ( RS ) message to the multicast group for all routers. When an RS is received by a router, it will respond with an RA . The RA will contain a prefix.

  • The node will generate a global unicast address with the prefix and its interface ID.
  • Similar to when the link-local address was created, the node will send a message to the address to determine if it is unique. Question 2: Is this also an NS message? If there is a reply, then the address is already in use, address assignment must proceed manually. Question 1b: Again, is there any automated way to recover?
  • Assuming there was no reply within the timeout, then the address is then assigned as the global IPv6 address to the interface.

Question 3: It is possible to have more than one address for the interface. In fact, at the end of the above process, a single interface will have 2 addresses - a link-local one and a global unicast one. Is it possible to get additional addresses for this interface using SLAAC? Or must another method (e.g. DHCPv6) be used?

A node may obtain a link-local address using steps 1-3 from above. I believe this is optional and that it can simply use ::/128 (unspecified) as its source address in DHCP requests until it is assigned an address.

There are two methods of obtaining an address - normal and rapid-commit. Normal is a 4 message exchange ( Solicit , Advertise , Request , Reply ), and Rapid is a 2 message exchange ( Solicit , Reply ). Rapid-commit is done when the client requests it with a Rapid-Commit option in the Solicit message. It is essentially the same as Normal, and since it doesn't make a difference for my usage, I am going to ignore it for now.

Also, it is possible that messages are proxied through relays. Messages sent to a server from a relay are RELAY_FORW messages, and messages sent from the server to the relay are RELAY_REPL messages. The actual dialog between the client and server is encapsulated in its entirety within an OPTION_RELAY_MSG option. For the following, I am dealing only with non-relay messages. If a message was relayed, then it is easy to obtian the original message and the following still holds.

Address assignment takes place as follows:

  • The client sends a Solicit message to the "All DHCP Servers and Relays" multicast address. The purpose of this message it to discover the identity of a DHCP server on the local link.
  • A DHCP server responds with an Advertise message to the local multicast address.
  • The client sends a Request message directly to the DHCP server with options indicating that it would like to have an IP address. Question 4: In the PCAP files I've seen, it looks like this message is still sent to the multicast address ff02::1:2 . Any reason that this is not sent directly to the DHCP server from which the Advertise was received?
  • The DHCP server responds with a Reply containing the IP address.
  • The client should perform duplicate address detection similar to step 6 in the SLAAC method.
  • The node assigns this address to the interface and can begin using it.

This is the general method by which addresses are assigned, but more specifically, there are 3 ways that this can be done:

  • Non-temporary address assignment ( IA_NA )
  • Temporary address assignment ( IA_TA )
  • Prefix Delegation ( PD )

All three methods are accomplished by including an option in the Request which is then populated by the server and returned in the Reply . For the first two, a complete IPv6 address is returned which can then be assigned as an IP address for the interface. For the third, a prefix is returned similar to the RA in the SLAAC method. This prefix is then used with the interface identifier to create a complete global IPv6 address.

Question 5: In my pcap captures, I am seeing that the Solicit and Advertise often contain these options as well. This seems redundant in the non-rapid case since the Request and subsequent Reply must also contain the option. What is the purpose for including this option in the Solicit ? And what is the purpose of the DHCP server creating the IP address (or prefix) in the Advertise before being Request ed to do so?

Question 6: The RFCs indicate that multiple instances of the IA_NA (or IA_TA ) option can be included. I assume this means that the interface will then have multiple addresses. Does the client simply include multiple instances of the option in the Request to get multiple addresses? What happens if a DHCP server can supply some, but not all of the addresses? Does the entire Reply indicate a failure? Or are some addresses given?

Releasing Addresses

For DHCPv6, an address in use can be released with a Release message. An address assigned by the server in a Reply can be declined by the client with a Decline message instead of being used.

If a client fails to send the Release or Decline , the server will continue to hold the address for the client until it expires.

Question 7: If a client can't send the Release (or Decline ) and reboots, it will initiate a new DHCP request. Will the DHCP server give back the old address? Or will it assume this is a request for an additional IP address and assign a new one?

I am not sure how addresses created by SLAAC or DHCP PD are released, if ever. Perhaps the release of these addresses is only done internally and no external device need know of the event.

As I stated at the beginning, my goal is to keep track of all the address assignments that are currently valid. My plan was to do the following:

  • Create a map indexed by address which stores the client to which it is assigned (DUID).
  • Extract the Client-DUID option
  • For each IA , set map[address]=Client-DUID
  • Store the expiry time of the address
  • For each IA , set remove map[address]
  • When an address expires, it will be removed from the map

Question 8: How do I detect SLAAC generated addresses or DHCP PD addresses? Is there some field in the messages I can use to regenerate the complete IP address? I will already have the prefix, but the interface ID is unknown.

Is this sufficient to maintain a list of IP addresses assigned to clients?

Cœur's user avatar

  • That is a long question :). –  thuovila Commented Aug 5, 2013 at 7:48
  • Yes, I've already got some of the answers and will update it. –  Trenin Commented Aug 6, 2013 at 13:19
  • It's a long post and I will finish the article later, it's a question but I learned a lot from the post. Thanks. I will study and try to answer some questions later. –  dspjm Commented Aug 18, 2013 at 8:54
  • Some implementation details of DAD present here: criticalindirection.com/2015/06/30/ipv6_dad_floating_ips –  user31986 Commented Jul 17, 2015 at 21:24
  • You may get better answers to this question in networkengineering.stackexchange.com –  StockB Commented May 4, 2016 at 14:29

2 Answers 2

OK - so I've done some more research and I have most of the answers now.

First of all, a correction. Addresses are not obtained via PD with DHCP. That is how DHCP servers obtain a network prefix to use for the DHCP clients they host. There is another DHCP server which deals with handing out these prefixes. Thus, PD can be ignored as a method for obtaining IP addresses.

Question 1a/b: Is there really no fall back here?

Answer: There is no automated fallback mechanism. One can be implemented, but it would be custom.

Question 2: Is this also an NS message?

Answer: Yes

Answer: Multiple addresses can be generated with SLAAC. A client can use the Router Advertisements from multiple routers, and each router may advertise multiple prefixes. Each prefix can be used by the host to create a global unicast address.

Question 8 (modified): How do I detect SLAAC generated addresses? Is there some field in the messages I can use to regenerate the complete IP address? I will already have the prefix, but the interface ID is unknown.

Answer: The only way to detect them is to listen for NS messages. Since these messages are optional, there is no guaranteed way to detect SLAAC generated addresses.

I still don't have answers for questions 4-7, but I am not too concerned with them at the moment.

There is a third method to get an IPv6 address, manual configuration.

bortzmeyer's user avatar

  • Yes - I referred to that in my post as the backup method when auto configuration fails. I am not concerned with that case since my goal is to keep track of the IP address assignments. If they are made statically, then the assignment can also be recorded statically. –  Trenin Commented Aug 6, 2013 at 18:09

Your Answer

Reminder: Answers generated by artificial intelligence tools are not allowed on Stack Overflow. Learn more

Sign up or log in

Post as a guest.

Required, but never shown

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy .

Not the answer you're looking for? Browse other questions tagged ipv6 dhcp or ask your own question .

  • Featured on Meta
  • We've made changes to our Terms of Service & Privacy Policy - July 2024
  • Bringing clarity to status tag usage on meta sites
  • Feedback requested: How do you use tag hover descriptions for curating and do...

Hot Network Questions

  • Where exactly was this picture of a huge solar eruption taken?
  • First miracle of Jesus according to the bible
  • Arrangements of lines in plane
  • A schema for awallet system that allows transfers between users
  • Short story about a dentist trapped in the past
  • Jacobi-Trudi-like identity with dual characters
  • For applying to a STEM research position at a U.S. research university, should a resume include a photo?
  • Adding XYZ button to QGIS Manage Layers Toolbars
  • Does the ship of Theseus have any impact on our perspective of life and death?
  • Does processed or decrypted evidence pay out more than regular evidence?
  • One number grid, two ways to divide it
  • Who is affected by Obscured areas?
  • Adverb for Lore?
  • Has any spacecraft ever been severely damaged by a micrometeriote?
  • What's the sales pitch for waxing chains?
  • Fitting the 9th piece into the pizza box
  • Why do decimal reciprocals pair to 9?
  • Choosing a relative large density subsequence from a low density sequence
  • Has technology regressed in the Alien universe?
  • Produce -5 V with 250 mA max current limitation
  • UART pin acting as power pin
  • How old are Phineas and Ferb? What year is it?
  • Why is there a custom to say "Kiddush Levana" (Moon Blessing) on Motsaei Tisha Be'av
  • Font showing in Pages but not in Font book (or other apps)

lan ipv6 address assignment stateless or stateful

  • Skip to content
  • Skip to search
  • Skip to footer

IP Addressing Services Configuration Guide, Cisco IOS XE 17.15.x (Catalyst 9600 Switches)

Bias-free language.

The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.

  • IP Addressing Services Overview
  • IPv6 Client IP Address Learning
  • Configuring DHCP
  • DHCP Gleaning
  • DHCP Options Support

DHCPv6 Options Support

  • DHCPv6 Relay Source Configuration
  • Configuring GRE IPv6 Tunnels
  • Configuring IPv6 over IPv4 GRE Tunnels
  • Configuring GLBP
  • Configuring HSRP
  • Configuring NHRP
  • Configuring Network Address Translation
  • Configuring Stateful Network Address Translation 64
  • VRRPv3 Protocol Support
  • Configuring WCCP
  • Configuring Enhanced Object Tracking
  • Configuring TCP MSS Adjustment
  • Enhanced IPv6 Neighbor Discovery Cache Management
  • IPv6 Neighbor Discovery Proxy
  • Troubleshooting IP Addressing Services

Clear Contents of Search

Chapter: DHCPv6 Options Support

Capwap access controller dhcpv6 option, dns search list option, dhcpv6 client link-layer address option, dhcp relay agent, dhcpv6 relay agent, dhcpv6 relay interface-id option, configuring capwap access points, configuring dns search list using ipv6 router advertisement options, example: configuring capwap access points, verifying dhcpv6 options support, additional references for dhcpv6 options support, feature history for dhcpv6 options support, information about dhcpv6 options support.

The Control And Provisioning of Wireless Access Points (CAPWAP) protocol allows lightweight access points to use DHCPv6 to discover a wireless controller to which it can connect. CAPWAP is a standard, interoperable protocol that enables a controller to manage a collection of wireless access points.

Wireless access points use the DHCPv6 option 52 (RFC 5417) to supply the IPv6 management interface addresses of the primary, secondary, and tertiary wireless controllers.

Both stateless and stateful DHCPv6 addressing modes are supported. In stateless mode, access points obtain IPv6 address using the Stateless Address Auto Configuration (SLAAC), while additional network information (not obtained from router advertisements) is obtained from a DHCPv6 server. In stateful mode, access points obtain both IPv6 addressing and additional network information exclusively from the DHCPv6 server. In both modes, a DHCPv6 server is required to provide option 52 if Wireless Controller discovery using DHCPv6 is required.

When the MAX_PACKET_SIZE exceeds 15, and option 52 is configured, the DHCPv6 server does not send DHCP packets.

DNS Search List (DNSSL) is a list of Domain Name System (DNS) suffix domain names used by IPv6 hosts when they perform DNS query searches for short, unqualified domain names. The DNSSL option contains one or more domain names. All domain names share the same lifetime value, which is the maximum time in seconds over which this DNSSL may be used. If different lifetime values are required, multiple DNSSL options can be used. There can be a maximum of 5 DNSSLs.

DHCP messages with long DNSSL names are discarded by the device.

RFC 6106 specifies IPv6 Router Advertisement (RA) options to allow IPv6 routers to advertise a DNS Search List (DNSSL) to IPv6 hosts for an enhanced DNS configuration.

The DHCPv6 Client Link-Layer Address Option (RFC 6939) defines an optional mechanism and the related DHCPv6 option to allow first-hop DHCPv6 relay agents (relay agents that are connected to the same link as the client) to provide the client's link-layer address in DHCPv6 messages that are sent towards the server.

The Client Link-Layer Address option is only exchanged between relay agents and servers. DHCPv6 clients are not aware of the use of the Client Link-Layer Address option. The DHCPv6 client must not send the Client Link-Layer Address option, and must ignore the Client Link-Layer Address option if received.

Each DHCPv6 client and server is identified by a DHCP unique identifier (DUID). The DUID is carried in the client identifier and server identifier options. The DUID is unique across all DHCP clients and servers, and it is stable for any specific client or server. DHCPv6 uses DUIDs based on link-layer addresses for both the client and server identifier. The device uses the MAC address from the lowest-numbered interface to form the DUID. The network interface is assumed to be permanently attached to the device.

A DHCP relay agent is a Layer 3 device that forwards DHCP packets between clients and servers. Relay agents forward requests and replies between clients and servers when they are not on the same physical subnet. Relay agent forwarding is different from the normal Layer 2 forwarding, in which IP datagrams are switched transparently between networks. Relay agents receive DHCP messages and generate new DHCP messages to send on output interfaces.

A DHCPv6 relay agent, which may reside on the client’s link, is used to relay messages between the client and the server. The DHCPv6 relay agent operation is transparent to the client. A DHCPv6 client locates a DHCPv6 server using a reserved, link-scoped multicast address. For direct communication between the DHCPv6 client and the DHCPv6 server, both of them must be attached to the same link. However, in some situations where ease of management, economy, or scalability is a concern, it is desirable to allow a DHCPv6 client to send a message to a DHCPv6 server that is not connected to the same link.

A DHCPv6 relay agent adds an Interface-Id option in the upstream DHCPv6 message. The Interface-Id option serves to identify the interface on which the client is connected. This information is used by the DHCPv6 relay agent while forwarding the downstream DHCPv6 message to the DHCPv6 client.

In a scenario where a Switch Virtual Interface (SVI) is configured to act as a relay agent, the Interface-Id option does not carry the physical interface details of the client interface. The Interface-Id option contains only the VLAN number of the client interface. The DHCPv6 server cannot identify which client sent the packet. The server cannot assign IPv6 addressess and policies to the packet.

Starting with the Cisco IOS XE Dublin 17.12.1 release, when an SVI acts as a relay agent the Interface-Id option will contain the physical interface details of the client interface. The physical interface details are included along with the VLAN number which is included by default. The new data is added as a sub-option. This makes it backward compatible as well as easily extensible.

The following is an example of the Interface-Id format before the physical interface details of the client interface are included.

The following is an example of the Interface-Id format after the physical interface details of the client interface are included.

How to Configure DHCPv6 Options Support

This section provides information about how to configure DHCPv6 options support:

  Command or Action Purpose

enable

configure terminal

ipv6 dhcp pool

capwap-ac address

end

Perform this task to configure the DNS search list using IPv6 router advertisement options:

command can only be configured on physical interfaces that are configured as routed ports in layer 3 mode. This is done by running the no switchport command in interface configuration mode.

Use the no ipv6 nd ra dns-search-list domain domain-name command in interface configuration mode to delete a single DNS search list under an interface.

  Command or Action Purpose

enable

configure terminal

interface

no switchport

ipv6 nd prefix /

ipv6 nd ra lifetime

ipv6 nd ra dns-search-list domain lifetime infinite

 
infinite-lifetime

Step 8

Exits interface configuration mode and returns to privileged EXEC mode.

The following example shows how to configure a CAPWAP access point:

Verifying Option 52 Support

Standards and rfcs.

Standards/RFC Title

RFC 6106

IPv6 Router Advertisement Options for DNS Configuration

RFC 54171

Control And Provisioning of Wireless Access Points (CAPWAP) Access Controller DHCP Option

RFC 6939

Client Link-Layer Address Option in DHCPv6

This table provides release and related information for the features explained in this module.

These features are available in all the releases subsequent to the one they were introduced in, unless noted otherwise.

Release

Feature

Feature Information

Cisco IOS XE Gibraltar 16.11.1

CAPWAP Access Controller DHCPv6 Option-52

The CAPWAP protocol allows lightweight access points to use DHCPv6 to discover a Wireless Controller to which it can connect. CAPWAP is a standard, interoperable protocol that enables a controller to manage a collection of wireless access points.

DHCPv6 Client Link-Layer Address Option

The DHCPv6 Client Link-Layer Address Option (RFC 6939) defines an optional mechanism and the related DHCPv6 option to allow first-hop DHCPv6 relay agents (relay agents that are connected to the same link as the client) to provide the client's link-layer address in the DHCPv6 messages being sent towards the server.

DNS Search List

DNS Search List (DNSSL) is a list of Domain Name System (DNS) suffix domain names used by IPv6 hosts when they perform DNS query searches for short, unqualified domain names. The DNSSL option contains one or more domain names.

Cisco IOS XE Gibraltar 16.12.1

DHCPv6 Relay Chaining and Route Insertion

DHCPv6 Relay Chaining and Route Insertion feature allows DHCPv6 messages to be relayed through multiple relay agents.

DHCPv6 Client Link-Layer Address Option - Command Changes

The syntax of command was modified to . The command was introduced.

IPv6 Support for RFC 6106 and RFC 5417

IPv6 support was introduced for Router Advertisement Options for DNS Configuration (RFC 6106), and Control And Provisioning of Wireless Access Points (CAPWAP) Access Controller DHCP Option (RFC 5417).

Cisco IOS XE Cupertino 17.7.1

DHCPv6 Options Support

Support for this feature was introduced on the Cisco Catalyst 9600 Series Supervisor 2 Module (C9600X-SUP-2).

Cisco IOS XE Cupertino 17.7.1

CAPWAP Access Controller DHCPv6 Option-52

DHCPv6 Client Link-Layer Address Option

DNS Search List

DHCPv6 Relay Chaining and Route Insertion

DHCPv6 Client Link-Layer Address Option - Command Changes

IPv6 Support for RFC 6106 and RFC 5417

These features were implemented on supervisor modules C9400X-SUP-2 and C9400X-SUP-2XL, which were introduced in this release.

Use the Cisco Feature Navigator to find information about platform and software image support.

Was this Document Helpful?

Feedback

Contact Cisco

login required

  • (Requires a Cisco Service Contract )

lan ipv6 address assignment stateless or stateful

IMAGES

  1. IPv6 Stateless Address Auto-configuration (SLAAC)

    lan ipv6 address assignment stateless or stateful

  2. IPV6: Stateful vs. Stateless

    lan ipv6 address assignment stateless or stateful

  3. Stateful Vs Stateless Firewall Know The Difference In 2022 Ip With Ease

    lan ipv6 address assignment stateless or stateful

  4. What Is The Difference Between Stateless And Stateful Address

    lan ipv6 address assignment stateless or stateful

  5. DHCPv6 Overview

    lan ipv6 address assignment stateless or stateful

  6. PPT

    lan ipv6 address assignment stateless or stateful

COMMENTS

  1. IPV6: Stateful vs. Stateless

    IPv6 addresses have a 128-bit length, compared to the 32-bit length of IPv4 addresses, which provides a huge number of unique addresses to assign to devices and networks. IPv6 has two addressing modes, stateful and stateless. In this tutorial, we'll discuss the differences between these addressing modes in IPv6. 2. IPv6 Addressing Modes.

  2. dhcpv6

    In a Stateless assignment scenario, there is no server or device which keeps a running log of what IP addresses have been assigned and what IP addresses are remaining, available to be assigned. The mentality in a Stateless assignment scenario is: Pick an IP address. If it happens to be in use, pick another one. TLDR: Stateful requires a DHCP ...

  3. Stateful vs Stateless IPv6?

    18. Stateful autoconfiguration of IPv6 is the equivalent to the use of DHCP in IPv4. It requires a DHCPv6 service to provide the IPv6 address to the client device and that both client device and server maintain the "state" of that address (i.e. lease time, etc). Stateless autoconfiguration of IPv6 allows the client device to self-configure its ...

  4. Navigating IPv6 Address Configuration: SLAAC, Stateful DHCPv6, and

    Devices request and receive specific IPv6 addresses from a DHCPv6 server, which maintains a record of assigned addresses and manages the overall address space. Pros: Centralized Control: Stateful DHCPv6 offers network administrators greater control over address assignments, ensuring a more structured and organized network.

  5. IP Addressing Services Configuration Guide, Cisco IOS XE 17.15.x

    The most common method for IPv6 client address assignment is Stateless Address Auto-Configuration (SLAAC). SLAAC provides simple plug-and-play connectivity where clients self-assign an address based on the IPv6 prefix. ... :1 interface Vlan20 description IPv6-DHCP-Stateful ip address 192.168.20.1 255.255.255. ipv6 address 2001:DB8:0:20::1/64 ...

  6. IPv6 Stateless Address Auto-configuration (SLAAC)

    SLAAC stands for Stateless Address Autoconfiguration and the name pretty much explains what it does. It is a mechanism that enables each host on the network to auto-configure a unique IPv6 address without any device keeping track of which address is assigned to which node. Stateless and Stateful in the context of address assignment mean the ...

  7. Analyzing DHCPv6 Stateful and Stateless

    (List of assigned IPv6 addresses, for example) The M flag indicates if the DHCPv6 Stateful should be used or not. The O flag is not involved and it can be ignored. The following command is used to change the M flag from 0 to 1 and so, indicate the DHCPv6 Stateful: Router (config-if) # ipv6 nd managed-config-flag . DHCPV6 - Additional ...

  8. Cisco DHCPv6 Server Configuration

    Our DHCPv6 server will assign IPv6 addresses to all DHCPv6 clients and keep track of the bindings. In short, the DHCPv6 servers know exactly what IPv6 address has been assigned to what host. Stateless works a bit differently…the DHCPv6 server does not assign IPv6 addresses to the DHCPv6 clients; this is done through autoconfiguration. The ...

  9. IPv6: How to configure static and DHCP IP addressing and deal with DNS

    In Settings go to Network & Internet and click the Properties button for the interface you wish to configure. Click the Edit button under IP settings, change the configuration type to Manual ...

  10. Stateful DHCPv6

    To enable Stateful DHCPv6, we must set the M-flag to 1 using the following command under the interface configuration mode. Router(config-if)# ipv6 nd managed-config-flag. And disable SLAAC by setting the A-flag to 0 using the following command: Router(config-if)# ipv6 nd prefix 2001:1234:A:B::/64 no-autoconfig.

  11. When to Use Stateless and Stateful Approaches (IPv6 ...

    The stateless approach is used when a site is not concerned with the exact addresses that hosts use. However, the addresses must be unique. The addresses must also be properly routable. The stateful approach is used when a site requires more precise control over exact address assignments. Stateful and stateless address autoconfiguration can be ...

  12. IPv6 Dynamic Address Allocation Mechanism Illustrated

    IPv6 supports multiple addresses, making address assignments more flexible and convenient. Unlike IPv4, which relied solely on the DHCP protocol for address assignment, IPv6 incorporates a native Stateless Address AutoConfiguration SLAAC) protocol. SLAAC can either work alone to provide IPv6 addresses to hosts, or it can work with DHCPv6 to generate new assignment schemes.

  13. IPv6 Address Assignment Example

    IANA "owns" the entire IPv6 address space and they assign certain prefixes to the RIRs (Regional Internet Registry). There are 5 RIRs at the moment: AFRINIC: Africa. APNIC: Asia/Pacific. ARIN: North America. LACNIC: Latin America and some Caribbean Islands. RIPE NCC: Europe, Middle east and Central Asia.

  14. IP Addressing: DHCP Configuration Guide

    DHCP for IPv6 Address Assignment. DHCPv6 enables DHCP servers to pass configuration parameters, such as IPv6 network addresses, to IPv6 clients. ... For example, neighbor discovery followed by a stateless or stateful DHCPv6 client can occur on the link between the CPE and the home devices (such as the home router or PC). In some cases, the ...

  15. The difference between stateless and stateful mode of a ...

    All you have to do is to change the DHCP server from stateless to stateful mode is to add and activate an IPv6 scope and you get a stateful DHCPv6 server that is able to assign IPv6 addresses to clients. And if you want to move a DHCP server from stateful to stateless mode, you simply have to deactivate or delete all IPv6 scopes from the server.

  16. ELI5: What is the difference between DHCPv6 stateful, DHCP stateless

    DHCPv6 stateful - this is similar to DHCPv4 where there is a pool of addresses and the DHCP server keeps track of which addresses are handed out to which MACs (clients) DHCP stateless - DHCP server has a prefix/subnet (like 1111:1111:1111:1111::/64) and sends that to hosts. Hosts can then come up with their own IP address using SLAAC.

  17. Stateless autoconfiguration for IPv6

    I will use two routers to show you how stateless autoconfiguration works. R2 will have an IPv6 address and is going to send router advertisements. R1 will use this to configure its own IPv6 address. R2(config)#ipv6 unicast-routing. R2(config)#interface fastEthernet 0/0. R2(config-if)#ipv6 address 2001:1234::/64 eui-64.

  18. IPv6 Address Assignment with Stateless Auto-Configuration

    IPv6 stateless auto-configuration is a quick-and-easy, plug-and-play method of having a host join an existing IPv6 network. Stateless auto-configuration process consists of the following: The IPv6 host generates a link-local address for its interface. A link-local address is formed by taking the well-known link-local prefix of fe80:: and ...

  19. IP Addressing Services Configuration Guide, Cisco IOS XE 17.15.x

    DHCPv6 enables DHCP servers to pass configuration parameters, such as IPv6 network addresses, to IPv6 clients. The address assignment feature manages non-duplicate address assignment in the correct prefix based on the network where the host is connected. Assigned addresses can be from one or multiple prefix pools.

  20. How to know an IPv6 address is configured stateful/stateless under Linux?

    For stateless, use the command: ip addr show dynamic For stateful, use the command: ip addr show permanent Quoting the ip-address man page: dynamic and permanent (IPv6 only) only list addresses installed due to stateless ad‐ dress configuration or only list permanent (not dynamic) ad‐ dresses.

  21. Configuring IPv6 Client IP Address Learning

    The most common method for IPv6 client address assignment is Stateless Address Auto-Configuration (SLAAC). SLAAC provides simple plug-and-play connectivity where clients self-assign an address based on the IPv6 prefix. This process is achieved when the IPv6 router sends out periodic Router Advertisement (RA) messages, which inform the client of ...

  22. Configuring IPv6 Client IP Address Learning

    The most common method for IPv6 client address assignment is Stateless Address Auto-Configuration (SLAAC). SLAAC provides simple plug-and-play connectivity where clients self-assign an address based on the IPv6 prefix. ... :1 interface Vlan20 description IPv6-DHCP-Stateful ip address 192.168.20.1 255.255.255. ipv6 address 2001:DB8:0:20::1/64 ...

  23. dhcp

    Stateful DHCPv6. A node may obtain a link-local address using steps 1-3 from above. I believe this is optional and that it can simply use ::/128 (unspecified) as its source address in DHCP requests until it is assigned an address. There are two methods of obtaining an address - normal and rapid-commit.

  24. IP Addressing Services Configuration Guide, Cisco IOS XE 17.15.x

    Both stateless and stateful DHCPv6 addressing modes are supported. In stateless mode, access points obtain IPv6 address using the Stateless Address Auto Configuration (SLAAC), while additional network information (not obtained from router advertisements) is obtained from a DHCPv6 server. ... The server cannot assign IPv6 addressess and policies ...