168
no common configuration file is found when a TFTP file server is used, the device obtains and uses the
default configuration file.
Script files
Script files can be used for automatic software upgrade and automatic configuration. The device
supports Python scripts (.py files) and Tcl scripts (.tcl files). For more information about Python and Tcl
scripts, see "Using Python" and
"Us
ing Tcl."
To prepare script files:
• For devices that share all or some configurations, edit a script file that contains the common
configurations.
• For the other devices, edit a separate script file for each of them.
Configuring the DHCP server
The DHCP server assigns the following items to devices that need to be automatically configured:
• IP addresses.
• Paths of the configuration files or scripts.
Configuration guidelines
When you configure the DHCP server, follow these guidelines:
• For devices for which you have prepared different configuration files, perform the following tasks for
each of them on the DHCP server:
{ Create a DHCP address pool.
{ Configure a static address binding.
{ Specify a configuration file or script file.
• For devices for which you have prepared the same configuration file, perform the following tasks on
the DHCP server:
{ Create a DHCP address pool for the devices.
{ Configure a static address binding for each of the devices in the address pool.
{ Specify the configuration file for the devices.
• If all devices on a subnet share the same configuration file or script file, perform the following tasks
on the DHCP server:
{ Configure dynamic address allocation.
{ Specify the configuration file or script file for the devices.
The configuration file can contain only the common settings for the devices. You can provide a
method for the device administrators to change the configurations after their devices start up.
Configuring the DHCP server when an HTTP file server is used
Ste
Command
Remarks
1. Enter system view.
system-view N/A
2. Enable DHCP.
dhcp enable By default, DHCP is disabled.
3. Create a DHCP address
pool and enter its view.
dhcp server ip-pool pool-name
By default, no DHCP address pool is
created.