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
Step | 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. |
4. Configure the address pool. |
| Use either or both methods. By default, no primary subnet or static binding is configured. You can add multiple static bindings. One IP address can be bound to only one client. To change the binding for a DHCP client, you must delete the binding and reconfigure a binding. |
5. Specify the URL of the configuration or script file. | bootfile-name url | By default, no configuration or script file URL is specified. |
Configuring the DHCP server when a TFTP file server is used
Step | 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. |
4. Configure the address pool. |
| Use either or both methods. By default, no primary subnet or static binding is configured. You can add multiple static bindings. One IP address can be bound to only one client. To change the binding for a DHCP client, you must delete the binding and reconfigure a binding. |
5. Specify a TFTP server. |
| Use either or both methods. By default, no TFTP server is specified. If you specify a TFTP server by its name, a DNS server is required on the network. |
6. Specify the configuration or script file name. | bootfile-name bootfile-name | By default, no configuration or script file name is specified. |