DHCP配置

[root@localhost ~]# rpm -ivh dhcp-3.0.5-3.el5.i386.rpm          //安装DHCP软件包
warning: dhcp-3.0.5-3.el5.i386.rpm: Header V3 DSA signature: NOKEY,key ID
37017186
   Preparing...           ###################################### [100%]
      1:dhcp               ###################################### [100%]

[root@localhost ~]# rpm -ivh dhcp-devel-3.0.5-7.el5.i386.rpm
warning: dhcp-devel-3.0.5-7.el5.i386.rpm: Header V3 DSA signature: NOKEY,key ID
37017186
   Preparing...           ###################################### [100%]
      1:dhcp-devel      ###################################### [100%]

[root@localhost ~]# cd /usr/share/doc/dhcp-3.0.5
[root@localhost dhcp-3.0.5]# ls
api+protocol                          IANA-arp-parameters  rfc2131.txt
dhcpd.conf.sample                     ja_JP.eucJP          rfc2132.txt
draft-ietf-dhc-authentication-14.txt  README               rfc2485.txt
draft-ietf-dhc-dhcp-dns-12.txt        RELNOTES             rfc2489.txt
draft-ietf-dhc-failover-07.txt        rfc1542.txt          rfc951.txt

[root@localhost dhcp-3.0.5]# cp dhcpd.conf.sample /etc/   //复制dhcpd.conf.sample
[root@localhost etc]# mv dhcpd.conf.sample  dhcpd.conf    //重命名dhcpd.conf.sample
[root@localhost etc]# service dhcpd restart              //重启dhcp服务
关闭 dhcpd:                                               [确定]
启动 dhcpd:                                               [确定]

[root@localhost etc]# vi dhcpd.conf
 
ddns-update-style interim;
ignore client-updates;
subnet 192.168.0.0 netmask 255.255.255.0 {      //设置DHCP动态IP,子网范围
range 192.168.0.20 192.168.0.30;               //设置DHCP可分配地址池范围
range 192.168.0.100 192.168.0.110;
# --- default gateway
 option routers   192.168.0.1;
 option subnet-mask  255.255.255.0;
 option nis-domain  "domain.org";
 option domain-name  "domain.org";
 option domain-name-servers 192.168.1.1;
 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.0.128 192.168.0.254;
 default-lease-time 21600;
 max-lease-time 43200;
 # we want the nameserver to appear at a fixed address
 host pcxp                           //设置静态可保留IP地址
   {
  next-server marvin.redhat.com;
   hardware ethernet 00:0C:29:E5:C5:42;
  fixed-address 192.168.0.109;
 }
}

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