Chinaunix首页 | 论坛 | 博客
  • 博客访问: 105325
  • 博文数量: 15
  • 博客积分: 1531
  • 博客等级: 上尉
  • 技术积分: 135
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-19 23:22
文章分类
文章存档

2011年(7)

2010年(2)

2009年(1)

2008年(5)

我的朋友

分类: LINUX

2009-06-10 10:39:17

FC9下安装配置DHCP服务器

1:利用yum安装dhcp-4.0.0-14.fc9.i386.rpm

yum install dhcp

------------------------------------------------------------------------------

[root@localhost dhcp-3.0.7]# yum install dhcp

Loaded plugins: refresh-packagekit

fedora                                                  | 2.4 kB     00:00

primary.sqlite.bz2                                       | 6.1 MB     05:27

updates                                                  | 2.3 kB     00:00

primary.sqlite.bz2                                       | 296 kB     00:29

Setting up Install Process

Parsing package install arguments

Resolving Dependencies

--> Running transaction check

---> Package dhcp.i386 12:4.0.0-14.fc9 set to be updated

--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================

 Package                 Arch       Version          Repository        Size

=============================================================================

Installing:

 dhcp                    i386       12:4.0.0-14.fc9  fedora            804 k

Transaction Summary

=============================================================================

Install      1 Package(s)

Update       0 Package(s)

Remove       0 Package(s)

Total download size: 804 k

Is this ok [y/N]: y

Downloading Packages:

(1/1): dhcp-4.0.0-14.fc9.i386.rpm                        | 804 kB     00:41

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing: dhcp                         ######################### [1/1]

Installed: dhcp.i386 12:4.0.0-14.fc9

Complete!

--------------------------------------------------------------------------------

2:cd usr/share/doc/dhcp-4.0.4

3:复制一个配置实例到/etc目录下

  cp dhcpd.conf.sample  /etc/dhcpd.conf

4:修改chcpd.conf文件

# dhcpd.conf

# option definitions common to all supported networks...

option domain-name "elab.org";                                              #定义domain名称     

option domain-name-servers 192.168.40.8,192.168.40.9,192.168.40.12;         #定义DNS服务器,可以添加多个,用逗号隔开

option broadcast-address 192.168.63.255;                                    #为客户端制定广播地址

option routers 192.168.41.253;                                              #为客户端制定网关

default-lease-time 60000;                                                   #指定默认的租约期限

max-lease-time 720000;                                                      #指定最大租约期限

# option netbios-name-servers 192.168.40.#;                                 #可以指定wins服务器

ddns-update-style ad-hoc                                                    #定义所支持的DNS动态更新类型(必选)

subnet 192.168.32.0 netmask 255.255.224.0                                   #定义作用域(IP子网)

{                                

  range 192.168.43.1 192.168.55.255;                                        #定义客户端获取地址的范围

  host 405zx01   { hardware ethernet 00:19:21:48:A2:2A; fixed-address 192.168.54.1;}    #为指定客户端绑定IP地址

  host 403zl30   { hardware ethernet 00:19:21:48:9E:23; fixed-address 192.168.43.50;}

 }

5:查看DHCP服务情况

   chkconfig --list |dhcpd

6:启动dhcp服务

   service dhcpd start

7:设置开机自启动dhcpd服务

  chkconfig dhcpd on

阅读(1559) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~