DHCP can be used to deliver configuration files to clients that require them for startup. You can save the configuration files on the DHCP server or specify the IP address of a dedicated file server. When a configuration file exists on a dedicated file server, the DHCP server needs to specify the IP address of the file server for clients. You can also specify an IP address for the file server by configuring user-defined options for clients.
If the startup configuration file is saved on a file server, the route between the DHCP client and file server must be reachable.
Enter the system view.
system-view
Enter the global address pool view.
ip pool ip-pool-name
Specify the name of the configuration file.
bootfile bootfile
By default, the name is not configured.
Specify the name of the server that hosts the configuration file.
sname sname
By default, the name of the server is not configured.
Specify the IP address of the file server that hosts the configuration file.
next-server ip-address
By default, the file server IP address is not configured.
Enter the system view.
system-view
Create a DHCP Option template and enter the DHCP Option template view.
dhcp option template template-name
By default, no DHCP Option template is created.
To allocate network parameters except IP addresses to static clients, configure a DHCP Option template. Network parameters configured in the DHCP Option template view take effect only for static clients. For static clients, if a network parameter is configured in both the DHCP Option template view and global address pool view, only the configuration in the DHCP Option template view takes effect.
To allocate only IP addresses to static clients (for details, see (Optional) Configuring Fixed IP Addresses in an Address Pool), you do not need to configure a DHCP Option template.
Specify the name of the configuration file.
bootfile bootfile
By default, the name of the startup configuration file for DHCP clients is not configured.
Specify the name of the server that hosts the configuration file.
sname sname
By default, the name of the server from which a DHCP client obtains the startup configuration file is not configured.
(Optional) Specify the name of the server that hosts the configuration file.
next-server ip-address
By default, the server IP address is not configured for the client after the client automatically obtains the IP address.
If you need to configure other items in the DHCP Option template view, complete them first before performing the following steps.
quit
ip pool ip-pool-name
static-bind ip-address ip-address mac-address mac-address option-template template-name