yum install dhcp

cat /usr/share/doc/dhcp-4.2.5/dhcpd.conf.example > /etc/dhcp/dhcpd.conf

vim /etc/dhcp/dhcpd.conf

# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

# option definitions common to all supported networks...
option domain-name "7.howhy.com";
option domain-name-servers howhy.com;

default-lease-time 600;
max-lease-time 7200;

# 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 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
# range 10.254.239.10 10.254.239.20;
# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
# range dynamic-bootp 10.254.239.40 10.254.239.60;
# option broadcast-address 10.254.239.31;
# option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
subnet 10.10.10.0 netmask 255.255.255.0 {
range 10.10.10.10 10.10.10.30;
option domain-name-servers 7.howhy.com;
option domain-name "howhy.com";
option routers 10.10.10.1;
option broadcast-address 10.10.10.255;
default-lease-time 600;
max-lease-time 7200;
}

# Hosts which require special configuration options can be listed in
# host statements. If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
# hardware ethernet 0:0:c0:5d:bd:95;
# filename "vmunix.passacaglia";
# server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts. These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP. Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
host fantasia {
hardware ethernet 00:0c:29:8f:65:aa;
fixed-address 10.10.10.22;
}

# You can declare a class of clients and then do address allocation
# based on that. The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
# match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
# subnet 10.17.224.0 netmask 255.255.255.0 {
# option routers rtr-224.example.org;
# }
# subnet 10.0.29.0 netmask 255.255.255.0 {
# option routers rtr-29.example.org;
# }
# pool {
# allow members of "foo";
# range 10.17.224.10 10.17.224.250;
# }
# pool {
# deny members of "foo";
# range 10.0.29.10 10.0.29.230;
# }
#}

centos DHCP的更多相关文章

  1. centos dhcp 服务器搭建 多vlan

    centos dhcp 服务器搭建   多vlan centos 6.5   版本     /etc/dhcp/dhcpd.conf         服务器配置文件 /etc/rc.d/init.d/ ...

  2. centos dhcp网络设置

    CentOS 网络设置修改   一.CentOS 修改IP地址 修改对应网卡的IP地址的配置文件# vi /etc/sysconfig/network-scripts/ifcfg-eth0 修改以下内 ...

  3. centos dhcp获取不到ip解决方法 Bringing up interface eth0: Device eth0 does not seem to be present,delaying initialization.

    1.删除文件: /etc/udev/rules.d/70-persistent-net.rules 2.编辑 /etc/sysconfig/network-scripts/ifcfg-eth0 删除H ...

  4. CentOs 设置静态IP 方法 dhcp的配置

    0.自动获取配置 DEVICE=eth0 HWADDR=00:0C:39:AD:11:48 TYPE=Ethernet UUID=c230a1e5-a535-487a-aab5-2fad7cd5583 ...

  5. CentOS IP丢失,切换了网络连接导致的vmnet8未启用dhcp

    解决了, 这个问题是我在开启虚拟机ubuntu系统的过程中, 在主机win7上切换了网络连接导致的, 就是刚开始我用的无线宽带上网, 此时开启了ubuntu ,然后使用过程中,我在win7上切换回静态 ...

  6. 解决Centos 7 dhcp服务器-no subnet declaration for start (no IPV4 addresses.)

    上面的配置是hyper-v 安装的 centos 7.0 安装dhcp 服务器的方法是 yum install dhcpd 在安装和配置好后,运行的时候出现错误 错误提示如下: no subnet d ...

  7. 关于linux - Centos 7 下DHCP服务的安装与配置

    DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)是一个局域网的网络协议,使用UDP协议工作, 主要有两个用途:给内部网络或网络服务供应商自动分配IP ...

  8. CentOS搭建NAT和DHCP服务,实现共享上网

    什么是NAT? NAT(Network address translation)即网络地址转换,作为一种过渡解决手段,可以用来减少对全球合法IP地址的需求.简单的说,NAT就是在内部专用网络中使用内部 ...

  9. CentOS 6.5自动化运维之基于DHCP和TFTP服务的PXE自动化安装centos操作系统详解

    前言    如果要给很多台客户端主机安装操作系统,要是每一台都拿张安装光盘一台一台主机的去装系统那就太浪费时间和精力了.在生产环境中也不实际,要实现为多台主机自动安装操作系统,那我们怎么实现自动化安装 ...

随机推荐

  1. 2018 ACM南京网络赛H题Set解题报告

    题目描述 给定\(n\)个数$a_i$,起初第\(i\)个数在第\(i\)个集合.有三种操作(共\(m\)次): 1 $u$ $v$ 将第$u$个数和第$v$个数所在集合合并 2 $u$ 将第$u$个 ...

  2. [LOJ#2328]「清华集训 2017」避难所

    [LOJ#2328]「清华集训 2017」避难所 试题描述 "B君啊,你当年的伙伴都不在北京了,为什么你还在北京呢?" "大概是因为出了一些事故吧,否则这道题就不叫避难所 ...

  3. python常用内建函数

    1.input 读取控制台的输入,输出的是字符串 2.enumerate 遍历数组的时候,能够将index 和item同时返回,返回的每一项包含index,item 3.isinstance(obje ...

  4. pat 团体天梯赛 L1-039. 古风排版

    L1-039. 古风排版 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 中国的古人写文字,是从右向左竖向排版的.本题就请你编写 ...

  5. 兼容FF和IE的tooltip 鼠标提示框

    原文发布时间为:2009-09-07 -- 来源于本人的百度文章 [由搬家工具导入] http://www.walterzorn.de/tooltip/tooltip.htm 【请见该页面】 Down ...

  6. configurationmanager.getsection usage example.

    1.app.config(note that attribute case sensitive!) <?xml version="1.0" encoding="ut ...

  7. 从头实现一个koa框架

    koajs是最流行的nodejs后端框架之一,有很多网站都使用koa进行开发,同时社区也涌现出了一大批基于koa封装的企业级框架.然而,在这些亮眼的成绩背后,作为核心引擎的koa代码库本身,却非常的精 ...

  8. CentOS下VNC使用

    1. 介绍 本文主要介绍了VNC Server的配置和使用 2. 安装 CentOS中默认就有安装VNC,可以通过命令rpm查看 [Jerry@localhost ~]$ rpm -qa | grep ...

  9. vue 设置头文件

    vue的头文件是在index.html文件中设置的,毕竟vue的入口 先说一下标签页的名字: 就是这个名字的设置,要想每个标签页的名字都不一样,需要做以下这三步:1. 首先,在index.html文件 ...

  10. Java中Vector笔记

    Vector和ArrayList Vector和ArrayList在使用上非常相似,都可用来表示一组数量可变的对象应用的集合,并且可以随机地访问其中的元素.   Vector的方法都是同步的(Sync ...