Explain the M, O and A flags, and what a host does with each combination.
Show the answer
Say this first
M (managed) and O (other config) sit in the RA header. A (autonomous) sits in each Prefix Information Option. A=1 means "build a SLAAC address from this prefix". M=1 means "get addresses from DHCPv6". O=1 means "get other settings, like DNS, from DHCPv6". The gateway always comes from the RA, whatever the flags. Hosts treat the flags as hints, and Android ignores DHCPv6 entirely, which is the classic surprise.
Go deeper
The combinations
| M | O | A | Addresses | DNS | Typical name |
|---|---|---|---|---|---|
| 0 | 0 | 1 | SLAAC | RDNSS in the RA, or none | SLAAC only |
| 0 | 1 | 1 | SLAAC | stateless DHCPv6 | SLAAC plus stateless DHCPv6 |
| 1 | any | 0 | stateful DHCPv6 | DHCPv6 | stateful DHCPv6 |
| 1 | any | 1 | both SLAAC and DHCPv6 | DHCPv6 | both, two or more addresses |
| 0 | 0 | 0 | link-local only | none | gateway only |
With M=1, O does not matter: the stateful exchange returns options as well.
Things that catch people
- DHCPv6 has no gateway option. Even a fully managed network needs RAs with a non-zero router lifetime.
- DHCPv6 gives no prefix length. Clients install the leased address as a /128. They learn which prefix is on-link from the RA's Prefix Information Option with L=1. Without it, a host sends traffic for its own subnet through the router.
- Android does not implement DHCPv6 address assignment. On an M=1, A=0 network Android devices get only a link-local address.
- Windows starts DHCPv6 when M or O is set. Linux depends on the network manager in use.
Setting the flags on IOS
interface GigabitEthernet0/0/0
ipv6 nd managed-config-flag ! M=1
ipv6 nd other-config-flag ! O=1
ipv6 nd prefix default no-autoconfig ! A=0 for the prefixes on this interfaceshow ipv6 interface confirms with lines like "Hosts use DHCP to obtain routable addresses."
They will ask next
What does the L flag do?
L=1 says addresses in this prefix are on the link, so the host talks to them directly with NDP. L=0 means "send it to a router". A and L are independent: you can have A=1 with L=0.
If M=1, why would you still keep A=1?
To give Android and other non-DHCPv6 clients an address. The cost is that DHCPv6-capable hosts end up with both a SLAAC and a DHCPv6 address, and your lease logs do not cover every address in use.
Traps
- Saying the M flag gives hosts their default gateway from DHCPv6.
- Assuming every OS honours the flags the same way.