二分钟搭建LINUX dhcp服务器
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了二分钟搭建LINUX dhcp服务器相关的知识,希望对你有一定的参考价值。
直接采用: yum install dhcp*
设置配置文件:vim /etc/dhcp/dhcpd.conf
配置文件:dhcpd.conf
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# option definitions common to all supported networks...
option domain-name "jerry.com";
option domain-name-servers 114.114.114.114;
default-lease-time 43600;
max-lease-time 87200;
# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;
# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;
# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;
# No service will be given on this subnet, but declaring it helps the
# DHCP server to understand the network topology.
subnet 192.168.0.0 netmask 255.255.0.0 {
range 192.168.26.100 192.168.26.110;
option routers 192.168.25.3;
}
启动DHCPD服务:/etc/init.d/dhcpd start #设置配置文件有误会报错,按错误提示修正再启动即可。
开一台虚拟机,设置成自动获取IP,测试效果如下:
本文出自 “在路上……找回丢失的记忆” 博客,请务必保留此出处http://jdonghong.blog.51cto.com/3473478/1888895
以上是关于二分钟搭建LINUX dhcp服务器的主要内容,如果未能解决你的问题,请参考以下文章