centos 7以上版本准备工作:1、systemctl stop firewalld(或者firewalld.service) 临时关闭防火墙
2.getenforce 0 临时关闭selinux
3.管理VM下dhcp功能(管理后重启网卡systemctl start network.service)
软件名:
dhcp 服务软件包
dhcp-common 默认软件包(主要是命令)
服务名:
dhcpd 服务名
dhcrelay 中继服务名
端口号:
udp 67 作为客户端的目标端口,接收客户端的请求
udp 68 作为服务器的源端口,向客户回复数据包
配置文件:
/etc/dhcp/dhcpd.conf 此配置文件模式是空的,需要模板文件重新生成
/usr/share/doc/dhcp-4.***/dhcpd.conf.sample (这个是模板文件)
cp -a dhcp.conf.sample /etc/dhcp/dhcp.con (包括源文件的属性一起全部复制)
/etc/sysconfig/dhcrelay 该文件为中继配置文件

原文:https://www.cnblogs.com/jdwy24/p/12310875.html