<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 10.1.1.1 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]dhcp select interface
[Huawei-GigabitEthernet0/0/1]dhcp server dns-list 8.8.8.8
[Huawei-GigabitEthernet0/0/1]dhcp server lease day 3
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei] int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 10.1.1.1 24
[Huawei-GigabitEthernet0/0/0]q
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool pool1
Info: It's successful to create an IP address pool.
[Huawei-ip-pool-pool1]network 10.1.1.0 m 24
[Huawei-ip-pool-pool1]gateway-list 10.1.1.1
[Huawei-ip-pool-pool1]q
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
以全局地址池为例
<Huawei>sy
Enter system view, return user view with Ctrl+Z.
[Huawei]vlan 10
[Huawei-vlan10]q
[Huawei]int v 10
[Huawei-Vlanif10]ip address 100.1.1.1 24
[Huawei-Vlanif10]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/1]q
[Huawei]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[Huawei]ip pool pool2
Info:It's successful to create an IP address pool.
[Huawei-ip-pool-pool2]network 100.1.1.0 m 24
[Huawei-ip-pool-pool2]gateway-list 100.1.1.1
[Huawei-ip-pool-pool2]dns-list 8.8.8.8
[Huawei-ip-pool-pool2]q
[Huawei]int v 10
[Huawei-Vlanif10]dhcp select global