Skip to content

04.实验1:配置DHCP服务器(Rhel10.0)中,使用Rhel10构建了DHCP服务器(kea镜像),在Rhel9.5中,通过dhcp-server构建服务器

前置条件

02.配置镜像源03.创建新的网卡

安装/配置DHCP-Server

dnf install -y dhcp-server

安装完成后,主要文件:

/etc/dhcp/dhcpd.conf —— 配置文件 /var/lib/dhcpd/dhcpd.leases —— 租约记录

编辑配置文件:

vi /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
authoritative;

subnet 192.168.159.0 netmask 255.255.255.0 {
  range 192.168.159.100 192.168.159.200;
  option routers 192.168.159.254;
  option subnet-mask 255.255.255.0;
  option domain-name-servers 8.8.8.8;
}

# 下面是静态分配DHCP


<NolebasePageProperties />




host testpc {
  hardware ethernet 00:11:22:33:44:55;
  fixed-address 192.168.50.10;
}

重启DHCP服务

systemctl restart dhcpd.service

其他内容可见: 04.实验1:配置DHCP服务器(Rhel10.0)

贡献者

The avatar of contributor named as lishu620 lishu620

文件历史

撰写