DHCP练习

标题配置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 

DHCP练习
③重启服务

[root@server ~]# systemctl restart dhcpd

客户端
①修改NAT模式
DHCP练习
②关闭防火墙和SELinux

[root@client ~]# systemctl stop firewalld.service 
[root@client ~]# setenforce 0

③从新获取IP
未更新前DHCP练习
更行后

[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

DHCP练习
手动分配 (在动态分配的基础上)
客户端
修改配置文件,重启
DHCP练习

[root@server ~]# systemctl restart dhcpd

服务端
重新获取IP
DHCP练习

上一篇:DHCP服务器搭建


下一篇:基于SSM的医院人事管理系统的设计与实现