标签:systemctl 练习 server client dhcpd dhcp DHCP root
标题配置dhcp实现动态分配和手动分分配方式
动态分配
服务器
①在服务器上安装dhcp服务,关闭防火墙和SELinux
[root@server ~]# yum install dhcp-server -y
[root@server ~]# systemctl stop firewalld.service
[root@server ~]# setenforce 0
②修改配置文件
[root@server ~]# vim /etc/dhcp/dhcpd.conf
:r /usr/share/doc/dhcp-server/dhcpd.conf.example
③重启服务
[root@server ~]# systemctl restart dhcpd
客户端
①修改NAT模式
②关闭防火墙和SELinux
[root@client ~]# systemctl stop firewalld.service
[root@client ~]# setenforce 0
③从新获取IP
未更新前
更行后
[root@client ~]# dhclient
dhclient(8724) is already running - exiting.
This version of ISC DHCP is based on the release available
on ftp.isc.org. Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.
Please report issues with this software via:
https://bugzilla.redhat.com/
exiting.
[root@client ~]# kill -9 8724
[root@client ~]# dhclient
手动分配 (在动态分配的基础上)
客户端
修改配置文件,重启
[root@server ~]# systemctl restart dhcpd
服务端
重新获取IP
标签:systemctl,练习,server,client,dhcpd,dhcp,DHCP,root 来源: https://blog.csdn.net/weixin_48325311/article/details/118855848
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。