Chinaunix首页 | 论坛 | 博客
  • 博客访问: 98228
  • 博文数量: 79
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 10
  • 用 户 组: 普通用户
  • 注册时间: 2015-06-03 21:35
文章分类
文章存档

2015年(79)

我的朋友

分类: LINUX

2015-06-03 21:39:09

原文地址:CentOS配置DHCP服务器 作者:tonecan2008

     以下是Centos5.5配置DHCP过程,(IP:192.168.1.150  网关:192.168.1.254 子网掩码:255.255.255.0 DNS:192.168.1.150 202.96.128.166 域名:seakv.com)
 
一 安装 DHCP
 
  yum -y install dhcp
 
 
二 配置 DHCP   (红色部分根据自己的实际情况进行修改)
 
[root@tonecan ~]# cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
[root@tonecan ~]# vim /etc/dhcpd.conf
 

ddns-update-style interim;  #(interim,ad-hoc,none三种启动模式)
ignore client-updates;      #(none:表示不支持动态更新,interim:表示DNS互动更新模式,ad-hoc:表示特殊DNS更新模式)

subnet 192.168.1.0 netmask 255.255.255.0 {

# --- default gateway
        option routers                  192.168.1.254;  # 网关
        option subnet-mask              255.255.255.0;  # 子网掩码

        option nis-domain               "seakv.com";    # 主机所在NIS域的名称
        option domain-name              "seakv.com";    # 主机所在域的名称
        option domain-name-servers      192.168.1.150,202.96.128.86; # DNS设置

        option time-offset              -18000; # Eastern Standard Time
#       option ntp-servers              192.168.1.1;
#       option netbios-name-servers     192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#       option netbios-node-type 2;

        range dynamic-bootp 192.168.1.1 192.168.1.253;   # IP地址池
        default-lease-time 21600;
        max-lease-time 43200;

        # we want the nameserver to appear at a fixed address
        host ns {    (保留地址 固定IP(类似IPMAC绑定,可绑定多个)
                next-server marvin.redhat.com;
                hardware ethernet 12:34:56:78:AB:CD;
                fixed-address 192.168.1.149
        }
}

 
 
三 指定DHCP服务的网络接口
 
 [root@tonecan ~]# vi /etc/sysconfig/dhcpd
 
# Command line options here
DHCPDARGS=eth0
 
 
四 启动DHCP服务
 
 [root@tonecan ~]# service dhcpd start
 启动 dhcpd:                                               [确定]
 
 
 
五 测试。
 
详细的DHCP配置请参见:http://redking.blog.51cto.com/27212/127548 
阅读(540) | 评论(0) | 转发(0) |
0

上一篇:Centos DNS配置

下一篇:Centos DNS配置 (转载)

给主人留下些什么吧!~~