Christmas Offer - Every Learner Must Check Out - Flat 88% OFF on All Access Pass
00
days
:
00
hours
:
00
minutes
:
00
seconds
PyNet Labs- Network Automation Specialists

DHCP with IPv6 – Everything You Should Know

Author : PyNet Labs
Last Modified: September 13, 2024 
Date: December 19, 2022
DHCP with IPv6 Featured Image

Introduction

The configuration becomes increasingly difficult to understand as the network grows in size and complexity. Additionally, there is a dramatic growth in the number of computers and mobile devices (such as portable laptops or wireless terminals), leading to frequent IP address changes and a lack of available IP resources. Network managers often utilize Dynamic Host Configuration Protocol (DHCP) to assign IP addresses in IPv4 networks, but as IPv6 use rises, companies will have to decide between two protocols. So, in this blog, we’ll be diving deep into DHCP with IPv6.

Before we move forward, you should check out – CCNP ENCOR Training

DHCP, which has been in use since 1993, is a network application protocol that automatically assigns the IP addresses and network parameters to DHCP clients. However, IPv6 was created with an auto-configuration feature called SLAAC, which has the potential to make DHCP irrelevant. To further complicate things, a new DHCP, DHCPv6, was separately developed for IPv6 to serve better productivity.

We all know about DHCP IPv4 that it follows the DORA Process to completely assign the IP Address and other network parameters to the client but have you ever wondered how DHCP with IPv6 will work and the process it’ll follow to assign the IP and other information to clients.

Without any further delay, let’s move on to understanding DHCP with IPv6.

What is DHCP with IPv6?

As we know that IPv6 provides a large address space formed by 128-bit IPv6 addresses that require proper assignment and management policies. In IPv6 stateless address, auto-configuration is most commonly used, which means it’s the process that IPv6 nodes use to automatically configure IPv6 addresses for interfaces based on prefixes carried in Route Advertisement (RA) packets sent from a neighbouring device.

Also, the nodes configured with stateless address auto-configuration cannot obtain other information like the DNS server address. So, DHCP with IPv6 solves this problem because it’s a stateful protocol for configuring IPv6 addresses automatically. Like it will also provide other configurations, including the DNS address, etc.

Here in DHCP IPv6, we don’t have a DORA process, but instead of this, we have four types of messages which are exchanged between client and server.

Here in this blog, we’ll see stateful auto-configuration, which means a DHCPv6 server that automatically assigns the IPv6 addresses, prefixes, and other configurations like DNS.

How Address Allocation works in DHCP IPv6?

The four-message exchange is applicable to networks with multiple DHCPv6 servers. Let’s see how the address allocation is done with the exchange of four messages.

DHCPv6 address allocation
  1. Client first multicasts a Solicit packet to find the DHCPv6 servers that can provide IPv6 Addresses.
  2. The server receives the solicit packet sent via the client and after receiving the server advertise.
  3. After receiving the advertised packets from the DHCP server, the DHCPv6 client selects one of the DHCPv6 servers and requests an IPv6 address.
  4. In last, as an acknowledgment, the DHCP server replies back to the client, and the client accepts and uses the IPv6 Address.

So, here we got no broadcast, but instead, we got some solicit multicasting and configuration wise if you see, we also don’t need to define default-gateway in DHCP IPv6 configurations because the clients will automatically learn about the gateway based on router solicitation and router advertisement messages. (Clients will automatically come to know when the router will advertise with RA messages).

Also, in IPv6, we got different port numbers.

Note: The client will listen for DHCP messages on UDP Port No. 546, and the server will use UDP Port No. 547

Types of DHCPv6 and DHCPv4 Packets

These packets are the language of communication between a DHCPv6 server and a DHCPv6 client.

See the table below for a breakdown of the differences between the packets of DHCPv6 and DHCPv4, as well as a description of each.

DHCPv6 PacketsDHCPv4 PacketsDescription
SOLICITDISCOVERA DHCPv6 client sends a Solicit packet to locate DHCPv6 servers.
ADVERTISEOFFERA DHCPv6 server sends an Advertise packet in reply to a Solicit packet to confirm that it can provide DHCPv6 service.
REQUESTREQUESTA DHCPv6 client sends a Request packet to request IPv6 addresses and other parameters from a DHCPv6 server.
REPLYACKHere, the acknowledgment is done.

Let’s move on and understand the working of DHCPv6.

You may also like – Difference between Encryption and Hashing

Working of DHCPv6

Let’s try to see a quick lab of DHCPv6. The practical explanation regarding the working of DHCPv6 discussed below will assist you in getting a better understanding of the concepts.

DHCPv6 Topology

In our topology R-1 is acting as DHCPv6 Server, whereas R-2 is acting as our client, which will receive the IP from DHCPv6 (R-1).

R-1(config)#ipv6 dhcp pool Pynet-1

R-1(config-dhcpv6)#address prefix 2001:123:123:123::/64

R-1(config-dhcpv6)#dns-server 1234:1234::1212

R-1(config-dhcpv6)#domain-name pynet.com

Verification – R-1

DHCPv6 verification R-1

Now the next thing we have to do is we have to go on the DHCP server interface, which is facing the clients to provide IP and other parameters; we need to configure the interface – in our lab, we got (gig0/0) on R-1.

R-1(config)#interface gig0/0

R-1(config-if)#ipv6 address 2001:123:123:123::1/64

R-1(config-if)#ipv6 dhcp server Pynet-1

R-1(config-if)#ipv6 nd managed-config-flag

Note: This managed-config-flag command will tell the host to use the DHCP Address Information.

R-1(config-if)#no shut

Now Debug on R-1 –

R-1#debug ipv6 dhcp

   (IPv6 DHCP debugging is on)

Now let’s on our client router, which is R-2.

R-2(config)#int gig0/0

R-2(config-if)#ipv6 address dhcp

R-2(config-if)#ipv6 enable

R-2(config-if)#no shut

R-2(config-if)#end

Verification of R-2 IPv6 Interface Brief –

DHCPv6 verification R-2

On R-1 now, we are going to see some DHCP messages.

Let’s verify in the output of debug,

Debug Output

As we can see, reply, solicit, create the binding, and lastly, the allocation of IP is done. That’s how the DHCP IPv6 is going to work.

Frequently Asked Questions

Q1 – What is DHCPv6 used for?

DHCPv6 (Dynamic Host Configuration Protocol for IPv6) is used for automatic IP address assignment and configuration of IPv6 devices in a network. It enables devices to obtain network configuration details, such as IPv6 addresses, DNS server information, and other parameters, from a DHCPv6 server.

Q2 – Do I need IPv6 DHCP server?

Yes, if you have an IPv6 network and you want to automate the process of assigning and configuring IPv6 addresses for devices, you will need an IPv6 DHCP server. The DHCP server will provide the necessary network configuration details to devices, making it easier to manage and scale your IPv6 network.

Q3 – Why is there no DHCP for IPv6?

In most IPv6 networks, a DHCP server is not necessary due to the availability of stateless address autoconfiguration (SLAAC) and Router Advertisement (RA) messages.

Q4 – What is DHCP and DHCPv6?

DHCP (Dynamic Host Configuration Protocol) is a network protocol used for automatic IP address assignment and network configuration. DHCPv6 is the version of DHCP specifically designed for IPv6 networks, providing similar functionality but for IPv6 addresses and parameters.

Conclusion

We have thoroughly discussed how DHCP with IPv6 works and the process of assigning the IP and other information to clients. DHCPv6 brings a lot of benefits with it; some of these include providing more configuration options and the ability to allocate network addresses that may be reused automatically. In addition, the explanation offered above, together with the example, will assist you in comprehending DHCPv6 in a simpler and more in-depth manner.

Recent Blog Post

Leave a Reply

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

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram