- 配置接口IP地址
[LSW1]vlan 10
[LSW1-GigabitEthernet0/0/2]port link-type hybrid
[LSW1-GigabitEthernet0/0/2]port hybrid pvid vlan 10
[LSW1-GigabitEthernet0/0/2]port hybrid untagged vlan 10
[LSW1-Vlanif10]ip add 10.1.1.1 24 - 使能DHCP服务
[LSW1]dhcp enable - 创建地址池并为PC配置网关地址、租期和DNS服务器地址;为PC1配置分配固定IP地址和启动配置文件信息
[LSW1]ip pool pool1
[LSW1-ip-pool-pool1]network 10.1.1.0 mask 24
[LSW1-ip-pool-pool1]dns-list 10.1.1.2
[LSW1-ip-pool-pool1]gateway-list 10.1.1.1
[LSW1-ip-pool-pool1]excluded-ip-address 10.1.1.2
[LSW1-ip-pool-pool1]lease unlimited
[LSW1-ip-pool-pool1]static-bind ip-address 10.1.1.10 mac-address 5489-9882-18E5 - 在Vlanif10接口下使能DHCP服务器
[LSW1]int Vlanif 10
[LSW1-Vlanif10]dhcp select global - 配置DHCP数据保存功能,设备发生故障时,可以在系统重启后,执行命令dhcp server database recover,从存储设备文件恢复DHCP数据
[LSW1]dhcp server database enable - 验证配置:PC上选择DHCP获取IP地址
华为设备基于全局地址池配置DHCP服务器实现为动态客户端和静态客户端分配不同网络参数
最新推荐文章于 2024-09-20 00:49:13 发布
