DHCP服务器搭建
1.在服务端安装dhcp服务
yum install dhcp -y
2.配置dhcp配置文件
[root@gjm ~]# vim /etc/dhcp/dhcpd.conf [root@gjm ~]# cat /etc/dhcp/dhcpd.conf # # DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.example # see dhcpd.conf(5) man page subnet 192.168.10.0 netmask 255.255.255.0 { 声明dhcp作用域 range 192.168.10.200 192.168.10.210; 地址池 option domain-name-servers 8.8.8.8,8.8.4.4; dns服务器 option routers 192.168.10.1; 默认网关 default-lease-time 600; 默认租约时间 max-lease-time 7200; 最大租约时间 } host fantasia { 客户机物理地址 hardware ethernet 00:0C:29:93:01:9D; 指定客户机ip fixed-address 192.168.10.205; }
3.启动服务
systemctl restart dhcpd
4.在客户机验证
将网卡文件的static改成dhcp并且重启客户机
标签:conf,客户机,192.168,dhcpd,dhcp,服务器,搭建 From: https://www.cnblogs.com/gjm-study-test/p/16717737.html