0
点赞
收藏
分享

微信扫一扫

华为设备基于全局地址池配置DHCP服务器实现为动态客户端和静态客户端分配不同网络参数

华为设备基于全局地址池配置DHCP服务器实现为动态客户端和静态客户端分配不同网络参数_华为

1. 配置接口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

2. 使能DHCP服务

[LSW1]dhcp enable

3. 创建地址池并为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

4. 在Vlanif10接口下使能DHCP服务器

[LSW1]int Vlanif 10

[LSW1-Vlanif10]dhcp select global

5. 配置DHCP数据保存功能,设备发生故障时,可以在系统重启后,执行命令dhcp server database recover,从存储设备文件恢复DHCP数据

[LSW1]dhcp server database enable

6. 验证配置:PC上选择DHCP获取IP地址

华为设备基于全局地址池配置DHCP服务器实现为动态客户端和静态客户端分配不同网络参数_DHCP_02


举报

相关推荐

0 条评论