三层交换机配置DHCP

创建地址池并配置相关属性。 

# 配置IP地址池10的属性(地址池范围、DNS地址、出口网关和地址池租期)。
[Huawei]ip pool 10
Info:It's successful to create an IP address pool.
[Huawei-ip-pool-10]network 192.168.10.0 mask 255.255.255.0
[Huawei-ip-pool-10]dns-list 202.102.224.68
[Huawei-ip-pool-10]gateway-list 192.168.10.1
[Huawei-ip-pool-10]lease day 10
[Huawei-ip-pool-10]quit

# 配置IP地址池20的属性(地址池范围、DNS地址、出口网关、NetBOIS地址和地址池租期)
[Huawei]ip pool 10
Info:It's successful to create an IP address pool.
[Huawei-ip-pool-20]network 192.168.20.0 mask 255.255.255.0
[Huawei-ip-pool-20]dns-list 202.102.224.68
[Huawei-ip-pool-20]gateway-list 192.168.20.1
[Huawei-ip-pool-20]lease day 10
[Huawei-ip-pool-20]quit


# 配置VLANIF10接口下的客户端从全局地址池中获取IP地址。
[Huawei]interface Vlanif 10
[Huawei-Vlanif10]ip address 192.168.10.1 24
[Huawei-Vlanif10]dhcp select global
[Huawei-Vlanif10]quit

# 配置VLANIF20接口下的客户端从全局地址池中获取IP地址。
[Huawei]interface Vlanif 20
[Huawei-Vlanif20]ip add 192.168.20.1 24
[Huawei-Vlanif20]dhcp select global
[Huawei-Vlanif20]quit

验证
[Huawei]display ip pool