Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1654391
  • 博文数量: 82
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 0
  • 用 户 组: 普通用户
  • 注册时间: 2017-12-09 12:58
文章分类

全部博文(82)

文章存档

2011年(7)

2010年(3)

2009年(11)

2008年(4)

2007年(57)

我的朋友

分类: LINUX

2007-12-15 19:16:57

# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
ddns-update-style interim;
# option definitions common to all supported networks...
option domain-name "uml.freeswan.org";
option domain-name-servers nic.uml.freeswan.org;
default-lease-time 2400;
max-lease-time 7200;
key update.2.1.192.in-addr.arpa. {
 algorithm hmac-md5;
 secret "XqB/25IIALUv1eGqnREXdWXKObc2cmy4mXs0/O+d5KFl0QI0xaa/pHFOAcDC6WWQLKxRGi7SCB8NXkTBGU+zMQ==";
}
zone 2.1.192.in-addr.arpa. {
 key update.2.1.192.in-addr.arpa.;
 primary 192.1.2.254;
}
subnet 192.1.2.0 netmask 255.255.255.0 {
  authoritative;
  range 192.1.2.64 192.1.2.127;
  option broadcast-address 192.1.2.255;
  option routers 192.1.2.254;
  option domain-name-servers 192.1.2.254;
}
host fantasia {
  hardware ethernet 00:40:96:37:d2:0b;
  fixed-address 192.139.46.66;
}
host jadefire {
  hardware ethernet 00:e0:63:81:f7:d7;
  fixed-address 192.139.46.66;
}
host aaitlol {
 hardware ethernet 00:60:1d:f6:32:c5;
 fixed-address 192.139.46.68;
}

option oe-key     code 159 = string;
option oe-gateway code 160 = ip-address;
on commit {    
  if (not static and
      ((config-option server.ddns-updates = null) or
       (config-option server.ddns-updates != 0))) {
      if exists oe-key {                                           
        set ddns-rev-name =                                                
           concat (binary-to-ascii (10, 8, ".",                           
                                     reverse (1, leased-address)), ".",    
                    pick (config-option server.ddns-rev-domainname,        
                          "in-addr.arpa."));
        set full-oe-key = option oe-key;
        switch (ns-update (delete (IN, 25, ddns-rev-name, null),
                            add (IN, 25, ddns-rev-name, full-oe-key,
                                lease-time / 2)))          
        {                                                          
        default:                                                   
          unset ddns-rev-name;                             
          break;                                                   
        case NOERROR:                                      
          on release or expiry {                                   
            switch (ns-update (delete (IN, 25, ddns-rev-name, null))) {
            case NOERROR:                              
              unset ddns-rev-name;                                 
              break;                                       
            }                                              
          }
        }                                                          
      }
  }                                                        
}

 
阅读(618) | 评论(0) | 转发(0) |
0

上一篇:DHCP小型模板

下一篇:samba详细配置PDC

给主人留下些什么吧!~~