配置命令:
sys
Enter system view, return user view withCtrl+Z.
[Huawei]sysna
[Huawei]sysname dhcp
[dhcp]vlan 11
[dhcp-vlan11]vlan 22
[dhcp-vlan22]qu
[dhcp]interface vlan11
[dhcp-Vlanif11] ip add
[dhcp-Vlanif11]ip add 192.168.0.254255.255.255.0
[dhcp-Vlanif11]inter vlan 22
[dhcp-Vlanif22]
[dhcp-Vlanif22]ip add 192.168.2.254255.255.255.0
[dhcp-Vlanif22]
[dhcp-Vlanif22]qu
[dhcp]interface g
[dhcp]interface GigabitEthernet 0/0/1
[dhcp-GigabitEthernet0/0/1]port link-typeaccess
[dhcp-GigabitEthernet0/0/1]port defaultvlan 11
[dhcp-GigabitEthernet0/0/1]
[dhcp-GigabitEthernet0/0/1]inter g0/0/2
[dhcp-GigabitEthernet0/0/2]port link-t
[dhcp-GigabitEthernet0/0/2]port link-typeacc
[dhcp-GigabitEthernet0/0/2]port link-typeaccess
[dhcp-GigabitEthernet0/0/2]port def
[dhcp-GigabitEthernet0/0/2]port default vla
[dhcp-GigabitEthernet0/0/2]port defaultvlan 22
[dhcp-GigabitEthernet0/0/2]qu
[dhcp]
[dhcp]dhcp enable
Info: The operation may take a few seconds.Please wait for a moment.done.
[dhcp]
[dhcp]ip pool vlan11
Info:It's successful to create an IPaddress pool.
[dhcp-ip-pool-vlan11]gateway-list192.168.0.254
[dhcp-ip-pool-vlan11]network 192.168.0.0mask 255.255.255.0
[dhcp-ip-pool-vlan11]dns-list202.102.224.68
[dhcp-ip-pool-vlan11]qu
[dhcp]
[dhcp]ip pool vlan22
Info:It's successful to create an IPaddress pool.
[dhcp-ip-pool-vlan22]
[dhcp-ip-pool-vlan22]gateway-list192.168.2.254
[dhcp-ip-pool-vlan22]network 192.168.2.0mask 255.255.255.0
[dhcp-ip-pool-vlan22]dns-list202.102.224.68
[dhcp-ip-pool-vlan22]excluded-ip-address192.168.2.253
[dhcp-ip-pool-vlan22]qu
[dhcp]
[dhcp]quit
save
The current configuration will be writtento the device.
Are you sure to continue?[Y/N]y
Now saving the current configuration to theslot 0.
Oct 22 2014 15:07:36-08:00 dhcp%%01CFM/4/SAVE(l)[0]:The user chose Y when decidi
ng whether to save the configuration to thedevice.
Save the configuration successfully.