华为DHCP配置
![在这里插入图片描述](https://img-blog.csdnimg.cn/e89d6a13693e43e48eb265206ad390b7.png)
R1配置
<R1>system-view
[R1]sysname R1 [R1]ip pool 1 //创建地址池
[R1-ip-pool-1] gateway-list 192.168.1.254 //配置网关
[R1-ip-pool-1] network 192.168.1.0 mask 255.255.255.0//配置网段
[R1-ip-pool-1] excluded-ip-address 192.168.1.100 //排除地址
[R1-ip-pool-1] dns-list 1.1.1.1 //分配DNS
[R1] dhcp enable
[R1] interface GigabitEthernet0/0/0
[R1-GigabitEthernet0/0/0] ip address 192.168.1.254 255.255.255.0
[R1-GigabitEthernet0/0/0] dhcp select global // 使能dhcp全局地址
华为中继
![在这里插入图片描述](https://img-blog.csdnimg.cn/012a317de00248bf96175c9a97f7bfea.png)
dhcp_server配置
system-view
dhcp enable ip pool 1
gateway-list 192.168.1.254
network 192.168.1.0 mask 255.255.255.0
dns-list 1.1.1.1 interface
GigabitEthernet0/0/0 ip address 10.0.12.2 255.255.255.0
dhcp select global
中继设备
system-view
dhcp enable
interface GigabitEthernet0/0/0
ip address 192.168.1.254 255.255.255.0
dhcp select relay
dhcp relay server-ip 10.0.12.2