How to configure DHCP Auto Install to let Switch get configuration file and image file from TFTP server

Configuration Guide
Updated 06-27-2022 07:04:31 AM 58192
O artigo aplica-se a: 

DHCP Auto install function is used to download configuration files and images from the TFTP server automatically. It requires a DHCP server supporting option 150/125/67 and a TFTP sever on your network.

We can configure this function according to the following sections,


  1. TFTP Server configuration

You TFTP Server should have configuration file, ini file and Image file.

Configuration file: It’s the configuration file of Switch, here it’s tplink.cfg.

ini file: It’s the file to save the name of Image file. In ini file, you need to write the name of image file, and save as ini file format. Here it’s T26.ini.

Image file: It’s the firmware file of Switch, here it’s T2600G.bin.

  1. : All the file’s name can be named as your requirement.

AS the following picture, there are three files in the TFTP server and the Image file’s name(T2600G.bin) write in the ini file(T26.ini).

  1. DHCP Server configuration

You need to configure the following DHCP options in your DHCP Server.

  1. Option 150: Used to inform client the TFTP server address.

It need to fill in the TFTP server’s IP address in this option.

  1. Option 125: Used to inform client the Image file’s name.

We need to know the format of the option 125, it’s follows,

Type Length {vendor-value Length {sub-type sub-length value}}

The meaning of main parameters is as follows,

Vendor-value: The vendor's registered 32-bit Enterprise Number. TP-LINK is 11863 (Decimal)

Sub-type: Defined by the vendor which identified in the Vendor-value field. Here TP-LINK define it as 5.

Value: The data of Sub-type option. Here we need to fill in ini file’s name.

  1. Option 67: Used to inform client the configuration file’s name.

You need to fill in the configuration file’s name in this option.

The following is the configuration examples of DHCP option on different platforms.

  1. ISC DHCP server on Linux

c0:a8:01:fa is the hexadecimal format of the IP address;

00:00:2e:57:09:05:07:54:32:36:2e:69:6e:69 is the hexadecimal format of option 125,

Length 09 and sub-length 07 need change according to the length of the data.

  1. DHCP server on Windows Server 2008 R2

DHCP option 150:

DHCP option 125:

DHCP option 67:

  1. DHCP server on Mikrotik RouterOS

0x74706c696e6b2e636667 is the hexadecimal format of the bootfile name ‘tplink.cfg’.

PS: If you only want Switch to get configuration file, you just need to set option 150 and option 67.

If you only want Switch to get image file, you just need to set option 150 and option 125.

Other configuration is the same as general DHCP server.

After you configure the above DHCP options, you can see them in the DHCP packet as follows,

  1. Switch configuration

If DHCP Auto Install is enabled and there is no layer 3 interface whose IP address mode is DHCP, the switch will choose a layer 3 interface and change its IP address mode to DHCP. The chosen interface is the last created interface whose status up.

So if enable DHCP Auto Install and switch only has one layer 3 interface of VLAN1, the interface will change to DHCP mode and get a new IP address. And maybe you need access management web with the new IP address. So we suggest to configure a new VLAN for DHCP Auto Install, and add a layer 3 interface for this new VLAN.

  1. VLAN configuration

L2 Features->VLAN->802.1Q VLAN->VLAN Config->add

Change PVID of ports which connecting DHCP Server and TFTP Server, it should be the VLAN ID which you use to get file.

L2 Features->VLAN->802.1Q VLAN->Port Config

  1. Choose DHCP Mode in VLAN interface

L3 feature->Interface->add

  1. Enable DHCP Auto install

System->System Tools->DHCP Auto Install

About the functions of Auto install Persistent Mode, Auto Save Mode, Auto Reboot Mode, Auto install Retry Count, you can see the meaning of them in CG, and you can configure them according to your requirements.

  1. Note

When you export configuration file from switch, the configuration file will contain the command of NTP server. When use DHCP Auto Install to import the configuration file, you may see the following error in the log, please delete the command about NTP server in the configuration file, because you haven’t NTP Server in the local network.

Get to know more details of each function and configuration please go to Download Center to download the manual of your product.

Este guia foi útil?

A sua resposta ajuda-nos a melhorar o nosso site.

From United States?

Obtenha produtos, eventos e serviços para a sua região.