Overview
One of the limitations of most PXE servers is that there can only be
one PXE server per subnet. For example, if a Microsoft RIS server
is configured on a subnet, it is not possible to also have an Altiris
PXE server on the same subnet. The reason one may want to have
both on the same network is so that RIS can be used to image Windows
desktops while Altiris is used to deploy and manage thin
clients. A simple solution is to put the thin clients on a
separate subnet / VLAN, but this can become an administrative headache
in a large network. Some PXE servers allow for a 'Master PXE' to
be configured which can redirect requests to another PXE server, but
this is not supported by Microsoft RIS.
To solve this problem, I have created a patch for the ISC
DHCP Relay server which allows you to specify a PXE server to
relay a client's request to based on the client's MAC address.
The MAC addresses and PXE server IP addresses are
specified in a text file. If a match is not found, then the
server specified on the dhcrelay command line is used.
Below is a sample network design to allow the use of both a RIS server
for deploying Windows and an Altiris server for managing thin clients.
In the sample network, there are much fewer thin clients than
regular desktops, so the text file only contains the thin client MAC
addresses and a default server is specified on the dhcrelay command
line.
- A dedicated subnet for the Master PXE server (patched dhcrelay):
- Subnet A (192.168.1.0 / 24)
- Master PXE server IP: 192.168.1.10
- A dedicated subnet for the Microsoft RIS server:
- Subnet B (192.168.2.0 / 24)
- Microsoft RIS server: 192.168.2.10
- A dedicated subnet for the Altiris PXE server:
- Subnet C (192.168.3.0 / 24)
- Altiris PXE server: 192.168.3.10
- One or more user / server subnets:
- Subnet D (192.168.50.0 / 24)
- Subnet E (192.168.51.0 / 24)
- Subnet F (192.168.52.0 / 24)
- Routers on subnets D, E and F are configured to forward DHCP
requests to the Master PXE server at 192.168.1.10, in addition to any
regular DHCP servers as needed. They should not forward any
requests directly to the Microsoft RIS or Altirix PXE server.
Create an /etc/dhcrelay.hosts file that has on each line the MAC
address of the client and the IP address of the PXE server it should be
forwarded to. For example:
00:11:22:33:44:55 192.168.3.10 # Thin Client 1
00:11:22:33:44:56 192.168.3.10 # Thin Client 2
00:11:22:33:44:57 192.168.3.10 # Thin Client 3
00:11:22:33:44:58 192.168.3.10 # Thin Client 4
Launch dhcrelay using:
dhcrelay -ch /etc/dhcrelay.hosts 192.168.2.10
The above command will tell dhcrelay to load
the /etc/dhcrelay.hosts file and forward requests from clients
that are not listed in the dhcrelay.hosts file to 192.168.2.10.
For troubleshooting, start dhcrelay in debug mode and prevent it from forking to the background using:
dhcrelay -D -d -ch /etc/dhcrelay.hosts 192.168.2.10
The patch is available here.
Future enhancements may be to use a binary search tree to speed up MAC
address searches, and to allow wildcards. I am currently using
it with 100 MAC addresses and there is certainly no performance issue
but it would be more efficient with a binary search tree.
Please email me with any suggestions or comments.
This page was last updated on July 11th, 2008.