To configure the DHCP server based on the interface address pool for the S series switches (excluding the S1700), configure an IP address for the interface and the switch allocates addresses that are on the same network segment as the interface IP address to clients.
This configuration mode is simple and applies only to scenarios where the DHCP server and clients are on the same network segment. That is, no DHCP relay exists.The configuration is as follows:
[HUAWEI] dhcp enable //Enable DHCP.
[HUAWEI] interface gigabitethernet 2/0/0 //Enter the view of the interface connected to the DHCP client.
[HUAWEI-GigabitEthernet2/0/0] port link-type access
[HUAWEI-GigabitEthernet2/0/0] port default vlan 10
[HUAWEI-GigabitEthernet2/0/0] quit
[HUAWEI] interface vlanif 10
[HUAWEI-Vlanif10] ip address 10.1.1.1 24 //Configure the network segment where the DHCP client resides. The IP address range of the interface-based DHCP server is: 10.1.1.2 to 10.1.1.254.
[HUAWEI-Vlanif10] dhcp select interface //Enable the DHCP server function based on the interface address pool.
[HUAWEI-Vlanif10] dhcp server dns-list 114.114.114.114 //Specify the DNS server address in the interface address pool.
[HUAWEI-Vlanif10] dhcp server lease day 2 //Set the lease of IP addresses to 2 days.
[HUAWEI-Vlanif10] quit
Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
Politically sensitive content
Content concerning pornography, gambling, and drug abuse
Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
* Including Third Party’s Trade Secret or No:?
Third Party’s Trade Secret
Third Party’s Trade Secret refers to Third Party’s (other than Huawei’s) technical or commercial information which is unknown to the public, with commercial value, and kept confidential by Third Party. It may include without limitation Price Information, Roadmap, Commercial Authorization, Core Algorithm and Source Code. Should you have any questions, please contact e.support@huawei.com.