Wired Intelligent Edge

 View Only

AOS-CX IPv6 - Stateless DHCP

This thread has been viewed 17 times
  • 1.  AOS-CX IPv6 - Stateless DHCP

    Posted Mar 23, 2023 05:23 PM
    Edited by DWan Mar 23, 2023 05:24 PM

    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.

    You can see it has an IPv6 address ending with :5408 and another IPv6 address ending with :8f24 assigned.
    It has DNS server and DNS search list from RA.
    It uses link local fe80::1 as default gateway to communicate beyond it's local subnet.
    It can ping to the ULA using it's link local default gateway.


    From the switch perspective.
    8360-48y6c-01# sh ipv6 nei

    IPv6 Address                                                       MAC                        Port         Physical Port              State
    --------------------------------------------------------------------------------------------------------------------------------------------
    2001:db8:2002:0:85fb:4e5f:1b76:3c6             00:50:56:9e:63:9a  vlan2002     1/1/47                     reachable   <- Windows host
    fe80::791a:9c93:73de:9949                              00:50:56:9e:37:55  vlan2002     1/1/47                     reachable   <- Linux host
    fe80::f403:4301:480:4a00                                 f4:03:43:80:4a:00  1/1/33           1/1/33                     reachable
    2001:db8:2002:0:ab3b:4707:281d:8f24          00:50:56:9e:37:55  vlan2002     1/1/47                     reachable   <- Linux host
    fe80::6101:49e6:c661:e386                              00:50:56:9e:63:9a  vlan2002     1/1/47                     reachable   <- Windows host
    2001:db8:2002:0:e4c0:ecf7:d94f:5408            00:50:56:9e:37:55  vlan2002     1/1/47                     reachable   <- Linux host
    fd25:bccf:1ffa:1000::a                                         f4:03:43:80:4a:00  1/1/33          1/1/33                     reachable

    Total Number Of IPv6 Neighbors Entries Listed: 7.
    --------------------------------------------------------------------------------------------------------------------


    We can see windows host (MAC ending with 63:9a) has IPv6 neighbor mapping for it's temp GUA IPv6 address (ending with :3c6) and link local address.
    This means the IPv6 address (ending with :3c6) is used to communicate beyond the subnet, the other 2 IPv6 addresses are not used.

    While the linux host (MAC ending with 37:55) has IPv6 neighbor mapping for it's GUA IPv6 addresses (ending with :8f24 and :5408) and link local address.
    This means the IPv6 addresses (ending with :8f24 and :5408) are used to communicate beyond the subnet. This is a host specific behavior.

    As shown above, you have seen how Windows/Linux hosts, DHCP server and AOS-CX switch interact when Stateless DHCP is used.



    ------------------------------
    DWan
    ------------------------------