配置接口的 IP 地址
<SwitchA> system-view
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 10.1.1.1 25
[SwitchA-Vlan-interface2] quit
(2) 配置 DHCP 服务
# 开启 DHCP 服务。
[SwitchA] dhcp enable
# 配置 VLAN 接口 2 工作在 DHCP 服务器模式。
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] dhcp select server
[SwitchA-Vlan-interface2] quit
# 创建 DHCP 地址池 0。
[SwitchA] dhcp server ip-pool 0
# 配置采用静态绑定方式为 Switch B 分配 IP 地址。
[SwitchA-dhcp-pool-0] static-bind ip-address 10.1.1.5 25 client-identifier
0030-3030-662e-6532-3030-2e30-3030-322d-4574-6865-726e-6574
# 配置采用静态绑定方式为 Switch C 分配 IP 地址。
[SwitchA-dhcp-pool-0] static-bind ip-address 10.1.1.6 25 hardware-address 000f-e200-01c0
# 配置域名服务器、网关地址。
[SwitchA-dhcp-pool-0] dns-list 10.1.1.2
[SwitchA-dhcp-pool-0] gateway-list 10.1.1.126
[SwitchA-dhcp-pool-0] quit
通过 display dhcp server ip-in-use 命令可以查看
DHCP 服务器为它分配的 IP 地址。