服务器技术

 首页 > 服务器技术 > Linux > 快速配置Linux下DHCP服务器配置 - Linux操作系统:

快速配置Linux下DHCP服务器配置 - Linux操作系统:

分享到:
【字体:
导读:
          在以往的学习中,我们已经了解了DHCP服务的基础内容,相对的我们也学会了Windows系统下的DHCP服务器的配置。接下来我们主要讲解一下Linux DHCP服务器的配置内容。 Linux DHCP服务器配置...

  在以往的学习中,我们已经了解了DHCP服务的基础内容,相对的我们也学会了Windows系统下的DHCP服务器的配置。接下来我们主要讲解一下Linux DHCP服务器的配置内容。

  Linux DHCP服务器配置

  1.安装Linux DHCP服务软件包

  RHEL4第四张光盘,dhcp-3.0.1-12_EL.i386.rpm

  挂载 mount /dev/cdrom /media/cdrom/

  安装DHCP包

  rpm -ivh /media/cdrom/RedHat/RPMS/dhcp-3.0.1-12_EL.i386.rpm

  2. dhcp.conf配置文件解析

  复制样例文件到 /etc/

  cp /usr/share/doc/dhcp-3.0.1/dhcpd.conf.sample /etc/dhcpd.conf

  Linux DHCP服务器配置实例

  

  1. Ddns-update-style interim;    
  2. Ignore client-updates;    
  3. Subnet  10.0.0.0  netmask  255.0.0.0  {            
  4. # --- default gateway    
  5. option routers                   “10.0.0.0.1”;    
  6. option subnet-mask              “255.0.0.0”;    
  7. #       option nis-domain                “domain.org”;    
  8. #       option domain-name              "domain.org";    
  9. #       option domain-name-servers       10.0.0.1;    
  10. #       option time-offset              -18000; # Eastern Standard Time    
  11. #       option ntp-servers              192.168.1.1;    
  12. #       option netbios-name-servers     192.168.1.1;    
  13. # --- Selects point-to-point node (default is hybrid). Dont change this unless    
  14. # -- you understand Netbios very well    
  15. #       option netbios-node-type 2;     
  16. range dynamic-bootp 10.0.0.100 10.0.0.200;    
  17. default-lease-time 21600;    
  18. max-lease-time 43200;    
  19. "/etc/dhcpd.conf" 31L852C          1,1              
  20. # we want the nameserver to appear at a fixed address    
  21. host ns {    
  22. next-server marvin.redhat.com;    
  23. hardware ethernet 12:34:56:78:AB:CD;    
  24. fixed-address 207.175.42.254;    
  25. }    
  26. }  

  3.Linux DHCP服务器多网络接口时需要配置文件

  /etc/sysconfig/dhcpd DHCPDARGS=[网络接口]

  4. 启动dhcpd服务

  Service dhcpd start

  5. 客户端配置动态获取IP

      上一篇:linux修改指定用户的密码 - Linux操作系统:Ubuntu 下一篇:nagios 使用MSN 发报警消息 - Linux操作系统:Ubuntu
    分享到:
    nagios 使用MSN 发报警消息 - Linux操作...
    公司管理的服务器太多了!在年前部属了cacti,但cacti只能做事后分析的工作,而实时报警功能不强,在部属cacti前就在监控PC上安装了nagios,只是一直没有时间详细研究!目前在我们的几百台服务器上都使用脚本自动化管理!然后发报警邮件!这段时间有点时间下来研究nagios,从今天开始就将我近段时间研究的结果记录下来!为...
    linux修改指定用户的密码 - Linux操作系...
    [root@localhost ~]# passwd username   Changing password for user username   New UNIX password: ^^^   Retype new UNIX password: ^^^   passwd: all authentication tokens updated successfully. 上一篇:限制同ip的Apache连接数 - Linux操作系统:Ubuntu_Ce 下...
    •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
    • 在这里……