The objective of this post is to help understand and discuss AOS-CX IPv6 - Stateless DHCP
We covered AOS-CX IPv6 - IPv6 address types, Link Local Addresses, solicited-node multicast addresses, duplicate address detection, ICMPv6 Neighbor Solicitation/NS, GUA for BGP peering, GUA for inter subnet connectivity, Unique Local Addresses, SLAAC, EVPN VXLAN and EVPN VXLAN with multicast previously in
https://community.arubanetworks.com/discussion/aos-cx-ipv6-link-local-addresses
https://community.arubanetworks.com/discussion/aos-cx-ipv6-link-local-addresses-part-2
https://community.arubanetworks.com/discussion/aos-cx-ipv6-global-unicast-addresses
https://community.arubanetworks.com/discussion/aos-cx-ipv6-unique-local-addresses
https://community.arubanetworks.com/discussion/aos-cx-ipv6-slaac
https://community.arubanetworks.com/discussion/aos-cx-ipv6-evpn-vxlan
https://community.arubanetworks.com/discussion/aos-cx-ipv6-evpn-vxlan-with-multicast
Stateless DHCP which depends on ICMPv6 Router Advertisement/RA can be used to assign IPs dynamically to hosts.
The difference between Stateless DHCP and Stateful DHCP is Stateless DHCP doesn't require the DHCP server to assign IPs, SLAAC is used to generate IPv6 address, while Stateful DHCP will utilize the DHCP server to assign IPs.
DHCP and DHCPv6 are used interchangeably in this post.
Stateless DHCP:
- Allows GUA IPv6 addresses to be dynamically generated by hosts using SLAAC without relying on a DHCP server
- Allows a host to uses the RA to derive IP addressing and default gateway info
- Default gateway information is sent in the RA and the router link local address is typically used as the default gateway
- A DHCP server can provide additional information (DNS server, domain name etc)
The ICMPv6 RA sent by the L3 default gateway will provide default gateway information and guide host behavior with regards to IPv6 address assignment.
However, final behavior is still dependent on the host OS , e.g. Some hosts might not support DHCPv6
Managed address configuration (M), Other Configuration (O) and Autonomous address-configuration (A) flag bit combinations in the RA message will help IPv6 hosts determine if SLAAC or DHCPv6 should be used.
To indicate Stateless DHCP should be used by hosts, the router should send M flag set to 0 and O/A flags set to 1. When A flag is set to 1, SLAAC is used for IP assignment.
We will use this topology, an AOS-CX switch, a DHCP server, a windows host and a linux host can be seen in our example.
ULA on Lo0 is used to verify hosts can communicate beyond their local subnet.
This sample config will set the M flag to 0/off and O/A flags to 1/on, and enable the AOS-CX switch to function as a DHCPv6 relay to the DHCP server.
dhcpv6-relay
!
interface vlan2002
ipv6 address 2001:db8:2002::2/64
active-gateway ipv6 mac 00:00:00:00:00:01
active-gateway ipv6 fe80::1
! We assume VSX and active-gateway is used for default gateway redundancy
ipv6 nd ra other-config-flag
! Set O flag to 1/on
no ipv6 nd suppress-ra
! Allow RA, it is suppressed by default
ipv6 helper-address unicast 2001:db8:2000::5
! DHCPv6 relay to remote DHCPv6 server
Here is a packet capture of the RA sent to ff02::1 (all hosts).
Here is a screenshot of a Windows DHCP server with scope options.
Here is a screenshot of a Windows host with DHCP working as expected.
You can see it has an IPv6 address ending with :e386 assigned and another IPv6 address ending with :5564 assigned.
There is also a 3rd temp IP ending with :3c6.
It uses link local fe80::1 as default gateway to communicate beyond it's local subnet.
It has DNS server and DNS search list from DHCP server.
It can ping to the ULA using it's link local default gateway.
Here is a packet capture of the DHCP relay reply from the DHCP server to the AOS-CX switch.
Here is a screenshot of a Linux host with DHCP working as expected.
------------------------------
DWan
------------------------------