centos6.8 dhcpd

rpm -q dhcp

yum install dhcp -y

cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcp.conf.$(date +%F)

cp /usr/share/doc/dhcp-4.1.1/dhcpd.conf.sample /etc/dhcp/dhcpd.conf

/etc/dhcpd.conf:

以下是我的DHCPd.conf 配置文件

default-lease-time 1296000;

max-lease-time 4000000;

option domain-name-servers 172.17.9.16,202.96.209.133;

option subnet-mask 255.255.240.0;

option broadcast-address 172.17.15.255;

option routers 172.17.10.254;

option domain-name-servers 172.17.9.16;

ddns-update-style ad-hoc;

subnet 172.17.0.0 netmask 255.255.240.0 {

#定义IP池的内容

range 172.17.15.100 172.17.15.200;

}

host xingming {hardware ethernet 48:4D:7E:BE:4D:4F;fixed-address 172.17.0.76;}

查看dhcpd服务器分配的IP:

cat /var/lib/dhcpd/dhcpd.lease IP已经分配的IP在此文件中;

/etc/init.d/dhcpd stop/start/restart 服务的启动和停止

相关文章

有时候CentOS工作在无互联网的环境下,需要在离线环境下安装一些组件,这次实现的是模拟在离线环境下安...
首先参照https://www.cnblogs.com/wdw984/p/13330074.html,来进行如何安装Centos和离线下载rpm包。 离...
有两个.NET CORE3.1网站部署在CentOS7上(内网IP是192.168.2.32),现在想实现访问http://192.168.2.32...
1、yum -y install vsftpd 安装vsftpd 2、配置vsftpd的配置文件(/etc/vsftpd/vsftpd.conf)主要修改以...
首先去mysql官网下载mysql的离线rpm安装包(https://downloads.mysql.com/archives/community/) Mysql...
第一步下载erlang环境并安装: wget https://packages.erlang-solutions.com/erlang/rpm/centos/7/x86_...