华为交换机dhcp设置

华为交换机dhcp设置

<HUAWEI> system-view
[HUAWEI] sysname Switch
[Switch] dhcp enable服务器

配置接口加入VLANide

vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
interface GigabitEthernet0/0/1
port link-type access
port default vlan 20ui

interface GigabitEthernet0/0/2
port link-type access
port default vlan 10server

配置VLANIF接口IP地址blog

interface Vlanif20
ip address 10.10.20.254 255.255.255.0
quitdns

interface Vlanif10
ip address 10.10.10.254 255.255.255.0
quit接口

配置接口地址池ip

interface vlanif 10
dhcp select interface //使能接口采用接口地址池的DHCP服务器功能,缺省未使能
dhcp server lease day 30 //租期的缺省值为1天,修改租期为30天
dhcp server static-bind ip-address 10.10.10.100 mac-address 286e-d488-b684 //为Client_1分配固定的IP地址
dhcp server dns-list 8.8.8.8 //DNS
quitit

interface vlanif 20
dhcp select interface //使能接口采用接口地址池的DHCP服务器功能,缺省未使能
dhcp server lease day 30 //租期的缺省值为1天,修改租期为30天
dhcp server static-bind ip-address 10.10.20.100 mac-address 286e-d488-b684 //为Client_1分配固定的IP地址
dhcp server dns-list 8.8.8.8 //DNS
quitio

(基于全局地址池)

ip pool vlan10
gateway-list 10.10.10.254
network 10.10.10.0 mask 255.255.255.0
lease day 10 hour 0 minute 0
dns-list 10.1.2.3
static-bind ip-address 10.1.1.4 mac-address dcd2-fc96-e4c0 option-template template1 固定IP
excluded-ip-address 10.10.10.1 10.10.10.10 //排除ip地址不参与DHCP
static-bind ip-address 10.1.1.4 mac-address dcd2-fc96-e4c0 绑定MAC分配固定IP

vlanif10下配置

interface Vlanif10
ip address 10.10.10.254 255.255.255.0
dhcp select global

接口使用hybrid

interface GigabitEthernet0/0/1port link-type hybrid 默认端口 display不显示port hybrid pvid vlan 10port hybrid untagged vlan 10

相关文章
相关标签/搜索