华为CE交换机和S系列交换机配置dhcp的差异

s交换机配置dhcp有“基于全局地址池”和“基于接口地址池”两种方法。
ce交换机v300版本配置dhcp有“基于全局地址池”和“基于接口地址池”两种方法。且配置方法和s交换机的一致,需要在接口下配置dhcp select命令。不同的是ce交换机配好功能后需要commit提交。
ce交换机v200版本配置dhcp只有一种方式:基于全局方式的地址池。没有接口方式地址池。v200版本是先配置dhcp服务和地址池,再配置接口分配地址。且无需在接口下配dhcp select global命令。
如下是dhcp关键配置举例,还有更多功能此处未列举。现网配置以实际需求为准。案例仅供参考。
【s交换机基于接口地址池配置举例】
1、配置接口ip地址(步骤1为基础配置,如已经配置好,可忽略)。
system-view //进入系统视图
[switch] vlan batch 10 //创建vlan
[switch] interface gigabitethernet 0/0/1 //进入ge0/0/1接口
[switch-gigabitethernet0/0/1] port link-type access //配置接口vlan类型为access
[switch-gigabitethernet0/0/1] port default vlan 10 //配置接口加入vlan10
[switch-gigabitethernet0/0/1] quit //退出
[switch] interface vlanif 10
[switch-vlanif10] ip address 10.1.1.1 24 //配置vlanif10接口地址
[switch-vlanif10] quit
2、能dhcp服务。
[switch] dhcp enable
3、配置接口地址池。配置vlanif10接口下的客户端从接口地址池中获取ip地址和相关网络参数。
[switch] interface vlanif 10
[switch-vlanif10] dhcp select interface //配置基于接口的dhcp
[switch-vlanif10] dhcp server gateway-list 10.1.1.1 //配置网关地址
[switch-vlanif10] dhcp server dns-list 10.1.3.1 //(可选)配置dns服务器
[switch-vlanif10] dhcp server lease day 30 //(可选)配置租期
[switch-vlanif10] dhcp server excluded-ip-address 10.1.1.2 10.1.1.3 //(可选)配置需要排除的ip地址
[switch-vlanif10] dhcp server static-bind ip-address 10.1.1.100 mac-address 00e0-fc12-3456 //(可选)配置ip和mac地址绑定,给固定mac分配固定ip
[switch-vlanif10] dhcp server domain-name //(可选)分配给dhcp客户端的dns域名后缀
[switch-vlanif10] quit
【s交换机基于全局地址池配置举例】
1、配置接口ip地址(步骤1为基础配置,如已经配置好,可忽略)。
system-view //进入系统视图
[switch] vlan batch 10 //创建vlan
[switch] interface gigabitethernet 0/0/1 //进入ge0/0/1接口
[switch-gigabitethernet0/0/1] port link-type access //配置接口vlan类型为access
[switch-gigabitethernet0/0/1] port default vlan 10 //配置接口加入vlan10
[switch-gigabitethernet0/0/1] quit //退出
[switch] interface vlanif 10
[switch-vlanif10] ip address 10.1.1.1 24 //配置vlanif10接口地址
[switch-vlanif10] quit
2、使能dhcp服务。
[switch] dhcp enable
3、创建地址池并在地址池视图下为pc配置网关地址、租期和dns服务器地址;
[switch] ip pool pool1
[switch-ip-pool-pool1] network 10.1.1.0 mask 255.255.255.0 //配置dhcp分配的ip范围
[switch-ip-pool-pool1] gateway-list 10.1.1.1 //配置网关地址
[switch-ip-pool-pool1] dns-list 10.1.1.2 //(可选)配置dns服务器
[switch-ip-pool-pool1] lease day 10 hour 0 minute 0 //(可选)配置租期
[switch-ip-pool-pool1] excluded-ip-address 10.1.1.2 10.1.1.3 //(可选)配置保留地址,这部分地址不会分配出去
[switch-ip-pool-pool1] static-bind ip-address 10.1.1.4 mac-address 00e0-fc12-3456 //(可选)配置ip和mac地址绑定,给固定mac分配固定ip
[switch-ip-pool-pool1] domain-name //(可选)分配给dhcp客户端的dns域名后缀 [switch-ip-pool-pool1] quit
[switch] interface vlanif 10
[switch-vlanif10] dhcp select global //配置基于全局地址池的dhcp
[switch-vlanif10] quit
【ce交换机(v200版本)配置dhcp服务举例】
注意:ce交换机配置后需要commit提交才生效)
1、使能dhcp服务。
system-view
[~switchb] dhcp enable
[~switchb] dhcp server request-packet all-interface enable //v2r19 版本后需要配置该命令
[*switchb] commit
2、配置ip地址池1的属性(地址池范围、dns地址、出口网关和地址池租期)。
[~switchb] ip pool pool1
[*switchb-ip-pool-pool1] gateway-list 10.1.1.1
[*switchb-ip-pool-pool1] network 10.1.1.0 mask 255.255.255.128
[*switchb-ip-pool-pool1] dns-list 10.1.1.2
[*switchb-ip-pool-pool1] excluded-ip-address 10.1.1.2
[*switchb-ip-pool-pool1] lease day 10
[*switchb-ip-pool-pool1] commit
[~switchb-ip-pool-pool1] quit
3、配置接口ip地址,以及配置vlanif接口下地址分配方式。
[~switchb] vlan batch 10 //创建vlan10
[*switchb] interface 10ge 1/0/1
[*switchb-10ge1/0/1] port link-type access //配置接口vlan类型为access
[*switchb-10ge1/0/1] port default vlan 10 //配置接口加入vlan10
[*switchb-10ge1/0/1] commit //提交
[~switchb-10ge1/0/1] quit
[~switchb] interface vlanif 10
[*switchb-vlanif10] ip address 10.1.1.1 255.255.255.128 // 配置接口vlanif10的ip地址
[*switchb-vlanif10] commit
[~switchb-vlanif10] quit

水蜜桃 - 可溶性固形物含量的检验
无线网桥信号弱怎么办?
专家对荧光显微镜的使用分析
建筑密封材料隔离垫块 建筑密封材料隔高垫块的使用说明
-30.5~30.5mV重量变送器
华为CE交换机和S系列交换机配置dhcp的差异
正岛ZD-21G纸护角烘干除湿机 纸托纸筒烘干不变形
DACD SOLVAQ核电站所有脏的机械部件脱脂去污?
恒温恒湿试验箱不能实现制冷制热的功能怎么办?
熔喷布过滤测试仪试验流程
聚四氟乙烯楼梯板按照要求可否切割成小块
油镜的油有什么作用
刀具刃口钝化的方式提高铣削加工效率
BT103S调速型蠕动泵
国产制药设备、医疗器械加速替代进口,打破垄断
脉冲阻尼器的工作方式
温度计示值误差原因有哪些?
统筹平衡价格传递效应
GB/T3535-2006倾点测定仪测量意义分析
支撑座在实际应用中该如何正确安装