Linux DHCP server 配置笔记

DHCP server 配置
 
[root@test root]# rpm -qa | grep dhcp
dhcpv6_client-0.10-33.el5
[root@test root# cd /var/ftp/pub/Server/
[root@test Server]# rpm -ivh dhcp- 3.0.5 -3.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:dhcp                   ########################################### [100%]
[root@test Server]# rpm -ivh dhcp-devel- 3.0.5 -3.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:dhcp-devel             ########################################### [100%]
[root@test Server]# rpm -ivh dhcpv6-0.10-33.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:dhcpv6                 ########################################### [100%]
[root@test Server]#
[root@test Server]# rpm -qa | grep dhcp
dhcp- 3.0.5 -3.el5
dhcpv6-0.10-33.el5
dhcpv6_client-0.10-33.el5
dhcp-devel- 3.0.5 -3.el5
[root@test Server]# cp /etc/dhcpd.conf /etc/dhcpd.conf.bak
[root@test Server]# cp /usr/share/doc/dhcp- 3.0.5 /dhcpd.conf.sample /etc/dhcpd.conf
[root@test Server]# vi /etc/dhcpd.conf
 
ddns-update-style interim;
ignore client-updates;
subnet 10.6.0 .0 netmask 255.255.255.0 {
# --- default gateway
        option routers                  10.6.0 .156;
        option subnet-mask              255.255.255.0;
 
        option nis-domain               "domain.org";
        option domain-name              "domain.org";
        option domain-name-servers      10.6.0 .156;
 
        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-boot p 10.6.0 .157 10.6.0.159;    
                作用: 获取的IP
        default-lease-time 21600;                     
                作用:定义默认 IP 租约时间  
        max-lease-time 43200;                          
                作用:定义客户端 IP 租约时间的最大值
 
        # we want the nameserver to appear at a fixed address
        host ns {
                next-server marvin.redhat.com;
                hardware ethernet 12:34:56:78:AB:CD;
                fixed-address 207.175.42.254;
 
[root@test Server]# chkconifg dhcpd on
[root@test Server]# service dhcps start

你可能感兴趣的:(linux,server,职场,DHCP,休闲)