Welcome to the ITFreeTraining video on the differences between DHCP for IPv4 and IPv6.
Even though DHCP for IPv6 performs the same function as DHCP for IPv4, there are a number
of differences in how the two protocols work.
Before I look at the difference, I will first start with looking at what is the same, or
at least what is similar between DHCP for IPv4 and DHCP for IPv6. There are three key
components of DHCP. These are DHCP Client, DHCP Server and DHCP Relay. The components
do not change depending on which version of the internet protocol that you are using.
In later videos, I will look into these components in more detail, but essentially each component
works like this. The DHCP client is a device on the network that can utilize the DHCP protocol
in order to obtain network configuration.
A DHCP server is a component which provides network configuration to a DHCP client. The
DHCP server is configured by an administrator with the network parameters set to meet their
needs.
The last component is DHCP relay, more commonly referred to as the DHCP Relay Agent. When
the DHCP client and DHCP server are on different networks they are separated by a router, the
DHCP relay will pass the DHCP messages between the networks.
Next there are scopes and leases. In later videos I will look at these concepts in more
detail. DHCP for IPv4 and IPv6 both use these concepts. Basically a scope is a collection
of configuration information that is used to configure devices on the network. A lease
determines how long a device on the network can use that configuration.
The last similarity between DHCP for IPv4 and IPv6 is that they both use four messages
to provide basic configuration to devices on the network. In later videos I will look
into how these messages work to configure a device in more detail. The important point
to remember is that, although the names of the messages in IPv4 and IPv6 are different,
the basic concept of how they work is the same; but more on that in later videos. Now
let’s look at the differences between DHCP for IPv4 and IPv6.
The first difference I will look at is reservations. I will cover reservations in a lot more detail
in later videos, but essentially when an administrator creates a reservation, a device on the network
will always get the same IP Address. This is the same principal in both IPv4 and IPv6.
In this case, I will use an example of a desktop on the network. In the case of IPv4, the desktop
has a network card. This network card has a MAC address. A MAC address is a unique number
assigned to all network adapters, kind of like a serial number. The MAC address is used
to work out which IP Address to give to the desktop.
So essentially, what happens is that when a reservation is created in IPv4, the MAC
address is linked to an IP Address. When the DHCP server receives a request from a device
this MAC address, the DHCP server will always assign that device the same IP Address.
For basic networking, having IP Addresses allocated based on MAC addresses works really
well. However, there are some problems that can occur later on which IPv6 looks to address.
Let’s consider the same example, except this time IPv6 is being used.
The desktop computer has a network card as before. Unlike IPv4, rather than use the MAC
address of the network card, the DUID and IAID are used. The DUID and IAID are essentially
numbers and in later videos I will look at how they are created. For the purpose of this
video, I will simply look at what can be achieved using these two numbers.
Using both the DUID and IAID, an IPv6 address can be allocated to the desktop. So the process
looks much the same as with IPv4. The difference is, let’s say the network card in the
computer was to fail.
It is a simple matter to replace the existing network card with a new one. The problem with
this approach is the new network card will have a new MAC address. The MAC address was
a unique value that identified the device on the network and now has changed. In IPv6,
the DUID does not change when a network card changes. However, the new network card is
give a new IAID.
Both IPv4 and IPv6 the reservation will need to be updated. IPv4 with the new MAC address,
and IPv6 with the new IAID. So essentially with IPv6, there is now a way to identify
the device in the form of the DUID and the network interface in the form of an IAID.
In later videos, I will look into more detail how the DUID and IAID are created. For the
moment, know that DHCP for IPv6 has a much more sophisticated method for reservations
than IPv4 which allows it to address many more scenarios than IPv4.
The next difference that I will look at is that IPv6 comes with both stateful and stateless
configuration. This essentially means there are two different methods that can be used
to configure a device on the network. This may seem a little confusing at first, but
it simply means that stateful stores device configuration whereas stateless does not.
Let’s have a closer look. First I will look at stateful. Consider that a server is setup
on the network with DHCP installed. The objective of the DHCP server is to automatically provide
network configuration to devices on the network.
If you use IPv4 with DHCP it will be considered to be stateful. If you use IPv6, you will
have the choice to run DHCP as either stateful or stateless. So, what does it mean when the
server is running in stateful mode?
In this case, DHCP is installed on a server, the server knows the IP Addresses of all devices
on the network. It knows them because when the DHCP server allocates an IP Address, it
records which device on the network it gave that IP Address to. This ensures that two
devices on the network are not allocated the same IP Address.
With DHCP for IPv6, a new mode of operation is supported called stateless. This is generally
used on routers. Stateless works differently from stateful in that it does not record which
devices on the network are using which IP Addresses. Devices still need some configuration
information, so messages called router advertisements are periodically sent to all devices on the
network. A device will use this router advertisement message to configure itself with an IP Address.
Part of the IP Address the device will decide for itself. The final IP Address that the
device decides to use is not recorded when stateless mode is used.
In IPv4, it was not possible for devices to configure part of their IP Addresses themselves
due to the limited number of useable addresses. In IPv6, there is not a shortage of IP Addresses
so it is possible for devices to configure their own IP Address.
The idea behind stateless is that a router should be able to provide enough configuration
information to a device on the network so that the device can configure itself. However,
if you want to configure additional network configuration, stateful mode may need to be
used. In later videos I will go into this in more detail.
The next change between DHCP IPv4 and IPv6 is that IPv6 uses multicast rather than broadcast.
Broadcast packets go to all nodes on the network. In IPv4, when a device is added to the network
and it attempts to get network configuration, since it has no network configuration it will
send a broadcast to all nodes on the network. The objective of this broadcast is to locate
a DHCP server. There may only be one DHCP server on the network but hundreds of devices
on that same network. So, you can imagine, data is being sent to potentially hundreds
of devices when it is only required by one device. This can be a very wasteful use of
network resources.
IPv6 fixes this by using multicast messages. Multicast messages are sent to selected nodes
rather than all nodes on the network. For example, if a node wants to locate a DHCP
server, the multicast would be sent to only nodes that have asked to receive that kind
of traffic. This reduces the amount of traffic that is sent on the network. This is particularly
important on large networks that have a lot of devices.
Well that is it for the major differences between DHCP for IPv4 and IPv6. In later videos
I will go into more details about the topics covered in this video. I hope to see you in
those videos, until then, I would like to thank you for watching.