Enabling the DHCP client on an interface
Follow these guidelines when you enable the DHCP client on an interface:
An interface can be configured to acquire an IP address in multiple ways. The latest configuration overwrites the previous one.
Secondary IP addresses cannot be configured on an interface that is enabled with the DHCP client.
If the IP address that interface A obtains from the DHCP server is on the same network segment as the IP address of interface B, interface A neither uses the IP address nor requests any IP address from the DHCP server unless you do the following: Delete the IP address of interface B and bring up interface A again by first executing the shutdown command and then the undo shutdown command, or, re-enable the DHCP client on interface A by executing the undo ip address dhcp-alloc command and then the ip address dhcp-alloc command.
To enable the DHCP client on an interface:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter interface view. | interface interface-type interface-number | N/A |
3. Enable the DHCP client on the interface. | ip address dhcp-alloc [ client-identifier mac interface-type interface-number ] | Disabled by default. |