Friday, March 28, 2014

Updated: Provisioning Services TFTP Load Balancing on NetScaler

To be able to provide Provisioning Services (PVS) High Availability (HA), you need to setup TFTP load balancing with NetScaler. This is because of DHCPs inability to provide multiple TFTP hosts to a client in a smart way. NetScaler overcomes DHCPs limitation. The process for a typical request is as follows:

  1. A DHCP request is sent by a client, at which the DHCP server responds with an IP address and 2 DHCP options, 66 and 67. Option 66 holds the TFTP server IP, and option 67 holds the boot file name.
  2. The preboot execution environment (PXE) on the client then makes a request to the TFTP IP.
  3. NetScaler now makes a load balancing decision and will forward the request accordingly.
  4. After the TFTP server receives the request, it then sends the client the initial segment of its boot file.
  5. The client will then boot, and start talking directly with the Provisioning Servers.

Prior to NetScaler 10.1, load balancing TFTP services took a bit of effort and the process is explained in a previous post here. There are other unsupported methods that some have used like using HTTP to distribute the boot file. Now load balancing TFTP is quick and easy. Also, an actual TFTP monitor is available to verify the health of the service, not like last time where you had to rely on the basic ping monitor. You do not need to setup Direct Server Return (DSR) anymore as well as no need to add loopback adapters to the Provisioning Servers. And, of course, you don't need to distribute the boot file via HTTP.

The basic overview of what you need to do:

  1. Create a TFTP monitor on NetScaler.
  2. Create a virtual server on NetScaler pointing to your Provisioning Servers.
  3. Configure DHCP options 66 and 67.
For those that need a bit more help in navigating how to perform the above:


  1. Make sure the NetScaler appliance has 10.1 firmware or better.
  2. Open the NetScaler GUI and login.
  3. Create the server objects:
    1. Navigate to Traffic Management\Load Balancing\Servers.
    2. Click Add.
    3. Enter a name and FQDN or IP address, then click Create.
    4. Repeat step 5 for additional Provisioning Servers that are acting as TFTP servers.
  4. Create a new monitor:
    1. Navigate to Traffic Management\Load Balancing\Monitors.
    2. Click Add.
    3. Give the monitor a name.
    4. Set the Type to USER.
    5. Click Special Parameters.
    6. Click Browse and select nstftp.pl for the Script Name.
    7. Click Create.
  5. Create the service group:
    1. Navigate to Traffic Management\Load Balancing\Service Groups.
    2. Click Add.
    3. Give the service group a name.
    4. Select TFTP for the protocol.
    5. Select Server Based
    6. Select both server objects created earlier and type 69 for the port.
    7. Click on the Monitors tab.
    8. Add the monitor you created earlier.
    9. Click Create.
  6. Create the virtual server:
    1. Navigate to Traffic Management\Load Balancing\Virtual Servers.
    2. Click Add.
    3. Give the virtual server a name.
    4. Select TFTP for the protocol.
    5. Give the virtual server an IP address.
    6. Click on the Service Groups tab.
    7. Select the service group create earlier.
    8. Click Create.
  7. Configure DHCP:
    1. Add DHCP option 66 on your DHCP server with the value of the TFTP virtual server IP address assigned above.
    2. Add DHCP option 67 on your DHCP server with the boot name file (e.g. ARDBP32.bin).
  8. Test:
    1. Install the Windows TFTP client and run the following:
      1. tftp [IP of TFTP virtual server] GET [name of boot file] [name of boot file]
      2. E.g. tftp 10.1.16.10 GET ardbp32.bin ardbp32.bin
This post was written in reference to the following platforms and versions:
  • Provisioning Services 6.x + 
  • NetScaler 10.1 +

1 comment:

  1. would you mind posting your settings from the CLI? So many settings not mentioned here...

    ReplyDelete