Logo

DHCP and PXE

In this video from ITFreeTraining, I will look at how DHCP works with PXE. PXE is a collection of protocols that allows a device to boot from the network. PXE has many uses, from diskless workstations to deploying operating systems.

Show lesson content
PXE
0:17 So what is PXE? PXE stands for Preboot eXecution Environment. If you consider that you have a desktop computer that has a network card in it and if the network card supports it, the desktop computer will be able to boot from the network. Not all network cards support booting from the network. It depends whether the network card has PXE support.

The PXE software is contained in the hardware on the network card. It is a small amount of extra software. Since the software needs to be included on the network card, the amount of software needs to be quite small. Having a lot of software on the network card will increase the cost of the network card. Let’s have a look at how this is achieved by looking at the protocols that PXE uses.

Protocols Used in PXE
1:05 The two main protocols used by PXE are DHCP client and TFTP. The DHCP client is used to obtain network configuration so the device can communicate on the network. TFTP is used to download files to the device. It should be remembered that PXE is designed for preboot, thus its purpose is to download additional software from the network. For example, PXE could be used to download a complete operating system to run on the device. For diskless workstations, PXE is what makes this possible. I will now have a closer look at TFTP.

TFTP
1:44 TFTP stands for Trivial File Transfer Protocol. As the name suggests, it is a protocol designed to transfer files. The trivial part of the name refers to having a small amount of code that is required in order to implement it. In programming, small or easy to implement code is often referred to as trivial as it is not too hard to implement.

So how does TFTP achieve this? Most file sharing and transfer protocols will have a system in place which provides authentication; the most common method that is used is having a username and password. In the case of TFTP, no authentication is supported. Essentially any device on the network can download any file from a TFTP server. So, on a TFTP server you would not install any sensitive files. For example, basic booting and basic configuration files are generally not considered to be sensitive. However, you would not store files such as your accounting files on a TFTP server.

Some TFTP servers allow the administrator to restrict which IP Address ranges can use the TFTP server. If this is not possible, the administrator can restrict access by configuring rules on a firewall. As authentication is not available, this is a method an administrator can use to reduce who can access files on the TFTP server.

Since TFTP only contains basic file transfer functions and no authentication, this means the amount of software required to implement it is small, or to put it another way, the TFTP software footprint is small. This allows it to be used in firmware on a network card where space for software is limited. This is the basics of how PXE and TFTP work, but let’s consider how it would work in the real world.

In the Real World
3:37 Consider that on your network you have a diskless workstation. A diskless workstation does not have any storage and thus will need to download software from the network in order to boot. This is a perfect example of when you would use PXE. However, it is not uncommon for PXE to be used for installing operating systems over the network. For example, an administrator may use PXE to perform the initial install of an operating system or re-install of an operating system when required.

Once the device has been configured to boot from the network using PXE, the next step is to configure a DHCP server on the network. The DHCP server is configured like a regular DHCP server to provide IP Addresses to devices on the network. The difference is that two additional options on the DHCP server need to be configured.

The first option provides an IP Address of a TFTP server on the network. The second option provides the filename of a boot file.

The next step is that the diskless workstation will contact the TFTP server and request the file. In this example, the DHCP server and TFTP server are on different servers, however it is possible to run DHCP and TFTP on the same server.

The next step is that the TFTP server will send the file to the diskless workstation over the network. The file will contain an operating system that is used to boot the device.

In some cases, this will be enough., In other cases, the operating system will be used to obtain more files from the network. For example, a deployment system will use this method to obtain setup files in order to install an operating system like Windows. This is essentially how the administrator would use PXE and TFTP in the real world.

This covers the basics of PXE and how it works with TFTP. I hope you have enjoyed this video. For more videos from us please see our YouTube channel or webpage. Until next time, I would like to thank you for watching.

References
“Installing and Configuring Windows Server 2012 R2 Exam Ref 70-410” pages 218-219
“Preboot Execution Environment” https://en.wikipedia.org/wiki/Preboot_Execution_Environment
“Trivial File Transfer Protocol” https://en.wikipedia.org/wiki/Trivial_File_Transfer_Protocol

Lesson tags: dhcp
Back to: DHCP > DHCP