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; } }
说明:
如果想给某IP分配固定的IP地址,修改host 那一项,把网卡的Mac地址和IP进行绑定,就是最后那一段,改为相应的就可以了。