注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

红烧鱼

linux & windows management

 
 
 

日志

 
 
关于我
mac

专注IT基础架构设计与运维。 欢迎给我留言,或邮件沟通zjwsk@163.com

网易考拉推荐

dhcpd 双机配置实例  

2009-09-10 21:00:33|  分类: Linux |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
# dhcpd.conf - 10.142.89.11
# configure by mac.j 2009.07.31 ver:A1
# =================================
failover peer "dhcp" {
    primary;
    address 10.0.0.5;
    port 647;
    peer address 10.0.0.6;
    peer port 647;
    max-response-delay 30;
    max-unacked-updates 100;
    load balance max seconds 3;

    mclt 600;
    split 128;
    }
include "/etc/dhcpd.conf.master";


# dhcpd.conf - 10.142.89.13
# configure by mac.j 2009.07.31 ver:A1
# =================================
failover peer "dhcp" {
    secondary;
    address 10.0.0.6;
    port 647;
    peer address 10.0.0.5;
    peer port 647;
    max-response-delay 30;
    max-unacked-updates 100;
    load balance max seconds 3;
    }
include "/etc/dhcpd.conf.master";



# /etc/dhcpd.conf.master - 10.142.89.11 & 10.142.89.13
# configure by mac.j 2009.8.3 ver:B1
# ====================================================
default-lease-time 7200;
max-lease-time 9000;

authoritative;
ddns-update-style none;
ddns-updates off;
deny client-updates;
log-facility local6;
allow unknown-clients;
option domain-name-servers 10.142.89.37,10.142.89.47;
option domain-name "ecmms.foxconn";
option ntp-servers 10.142.89.47,10.142.89.37;
one-lease-per-client true;

# If NIC MAC address match "00:25:b3", then it is A Printer Product.
class "ippd-printer-1" {
    match if substring (hardware, 1, 3) = 00:25:b3;
    default-lease-time 1200;
    max-lease-time 1200;
    }

subnet 10.142.89.0 netmask 255.255.255.0 {}

# 1. F20-2F, 10.43.104.0/22    ExcludeIP 10.143.104.1-64
subnet 10.143.104.0 netmask 255.255.252.0 {
    option routers 10.143.104.1;

    # PC Scope
    pool {
    deny members of "ippd-printer-1";
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.104.65 10.143.105.8;
    }

    # Printer Scope
    pool {
    allow members of "ippd-printer-1";
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.105.9 10.143.107.254;
    }
    }

# 2. F20-4F, 10.143.112.0/22    ExcludeIP 10.143.112.1-128
subnet 10.143.112.0 netmask 255.255.252.0 {
    option routers 10.143.112.1;

    # PC Scope
    pool {
    deny members of "ippd-printer-1";
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.112.129 10.143.113.71;
    }

    # Printer Scope
    pool {
    allow members of "ippd-printer-1";
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.113.72 10.143.115.254;
    }
    }

# 3. G5-1.5F-C, 10.143.103.0/24    ExcludeIP 10.143.103.1-64
subnet 10.143.103.0 netmask 255.255.255.0 {
    option routers 10.143.103.1;
pool {
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.103.65 10.143.103.254;
    }
    }

# 4. G5-2F, 10.143.92.0/22    ExcludeIP 10.143.92.1-64
subnet 10.143.92.0 netmask 255.255.252.0 {
    option routers 10.143.92.1;
pool {
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.92.65 10.143.95.254;
    }
    }

# 5. G5-3F, 10.143.96.0/22    ExcludeIP 10.143.96.1-64
subnet 10.143.96.0 netmask 255.255.252.0 {
    option routers 10.143.96.1;
pool {
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.96.65 10.143.99.254;
    }
    }

# 6. G5-4F, 10.143.108.0/22    ExcludeIP 10.143.108.1-10.143.109.255
subnet 10.143.108.0 netmask 255.255.252.0 {
    option routers 10.143.108.1;
pool {
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.110.0 10.143.111.254;
    }
    }

# 7. F3-2F, 10.143.116.0/22    ExcludeIP 10.143.116.1-255
subnet 10.143.116.0 netmask 255.255.252.0 {
    option routers 10.143.116.1;
pool {
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.117.0 10.143.119.254;
    }
    }

# 8. G1-3F, 10.143.120.0/22    ExcludeIP 10.143.120.1-64
subnet 10.143.120.0 netmask 255.255.252.0 {
    option routers 10.143.120.1;
pool {
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.120.65 10.143.123.254;
    }
    }

# 9. G1-4F, 10.143.124.0/22    ExcludeIP 10.143.124.1-128
subnet 10.143.124.0 netmask 255.255.252.0 {
    option routers 10.143.124.1;
pool {
    failover peer "dhcp";
    deny dynamic bootp clients;
    range 10.143.124.129 10.143.127.254;
    }
    }


---------------------
其他相关设定:
1. 在dhcpd.conf 添加dhcp log重定向设定: log-facility local6;

2. 修改/etc/syslog.conf :
   *.info;mail.none;authpriv.none;cron.none;local6.none    /var/log/messages
   local6.*                        /var/log/dhcpd.log

3. 修改/etc/logrotate.d
/var/log/dhcpd.log {
        missingok
    # rotate 6
        notifempty
        daily
    # size 5120k
        create 0600 root root
    }

  评论这张
 
阅读(1013)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017