zoukankan      html  css  js  c++  java
  • dhcpd.conf解读

    默认的/etc/dhcpd.conf含义如下:
     ddns-update-style interim; //设置dhcp互动更新模式
     ignore client-updates; //忽略客户端更新
     subnet 192.168.12.0 netmask 255.255.255.0 {
     //设置子网申明
     # --- default gateway
     option routers 192.168.12.1; //设置客户端默认网关
     option subnet-mask 255.255.255.0; //设置客户端子网掩码
     option nis-domain "ixdba.net "; //设置NIS域
     option domain-name " ixdba.net "; //设置DNS域
     option domain-name-servers 192.168.12.1; //设置DNS服务器地址
     option time-offset -18000; # Eastern Standard Time //设置时间偏差
     # option ntp-servers 192.168.12.1;
     # option netbios-name-servers 192.168.12.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.12.128 192.168.12.254; //设置地址池
     default-lease-time 21600; //设置默认租期,单位为秒
     max-lease-time 43200; //设置客户端最长租期,单位为秒
     # we want the nameserver to appear at a fixed address
     host ns { //以下设定分配静态IP地址,不多做解释。
     next-server marvin.RedHat.com;
     hardware ethernet 12:34:56:78:AB:CD; 
    fixed-address 207.175.42.254;
     }
     }
     就用默认的都可以正常工作了,但是我们还可以根据我们的需要来进行更改。
     其他说明:
     range 192.168.12.2 192.168.12.125; 可以限定分配的IP地址范围。
     如果想给某IP分配固定的IP地址,修改host 那一项,把网卡的Mac地址和IP进行绑定,就是最后那一段,改为相应的就可以了。
     在subnet里定义的网段要与你的网卡IP所处网段一致,也就是说比如你的网卡是192.168.0.x,而dhcp服务却为10.1.1.0的subnet提供服务是不行的,是启动不了的。

  • 相关阅读:
    The library 'hostpolicy.dll' required to execute the application was not found in
    矩阵乘法
    2019-11-1
    四边形不等式的应用
    2019-10-30
    2019-10-29
    差分与前缀和
    平衡树SPLAY
    可爱的树链剖分(染色)
    cable tv network
  • 原文地址:https://www.cnblogs.com/jydeng/p/4418479.html
Copyright © 2011-2022 走看看