配置DHCP 服务器(以AR2220 为例)
a、基于全局的DHCP协议:
<Huawei> system-view
[Huawei] sysname DHCP Server
[DHCP Server] dhcp enable //在配置模式下“启用DHCP服务”
[DHCP Server] ip pool 1 //配置DHCP地址池名1
[DHCP Server-ip-pool-1] network 192.168.1.0 mask 255.255.255.0 //地址池
[DHCP Server-ip-pool-1] lease day 2 //配置租约时间,默认为1
[DHCP Server-ip-pool-1] gateway-list 192.168.1.254 //配置网关
[DHCP Server-ip-pool-1] excluded-ip-address 192.168.1.2 //排除IP 192.168.1.2不分配
[DHCP Server-ip-pool-1] excluded-ip-address 192.168.1.200 192.168.1.253 //排除IP200-253不分配
[DHCP Server-ip-pool-1] dns-list 8.8.8.8 //配置DNS服务器
[DHCP Server-ip-pool-1] quit
[DHCP Server] int g0/0/1
[DHCP Server-GigabitEthernet0/0/1]ip address 192.168.1.254 24 //为接口配置IP地址
[DHCP Server-GigabitEthernet0/0/1]dhcp select global //基于全局配置的DHCP地址池
b、基于接口的DHCP协议:
[Huawei]dhcp enable //在配置模式下“启用DHCP服务”
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 192.168.1.254 255.255.255.0
[Huawei-GigabitEthernet0/0/0]dhcp select interface //基于接口配置的DHCP地址池
[Huawei-GigabitEthernet0/0/0]dhcp server dns-list 8.8.8.8 //配置DNS服务器
[Huawei-GigabitEthernet0/0/0]dhcp server excluded-ip-address 192.168.1.2 //排除IP 192.168.1.2不分配
[Huawei-GigabitEthernet0/0/0]dhcp server lease day 2 //配置租约时间,默认为1
[Huawei]display ip pool
华为路由器(以AR2220 为例)配置DHCP服务器
未经允许不得转载:裕普网络 » 华为路由器(以AR2220 为例)配置DHCP服务器