码迷,mamicode.com
首页 > 其他好文 > 详细

dhcp热备配置

时间:2019-10-21 11:39:33      阅读:82      评论:0      收藏:0      [点我收藏+]

标签:lan   add   out   mic   ignore   upd   seconds   热备   route   

dhcp热备配置

###dhcp热备配置

yum install -y dhcp
主服务器配置:
cat >/etc/dhcp/dhcpd.conf<<EOF
ddns-update-style interim;
ignore client-updates;
allow booting;
authoritative;
allowbootp;

failover peer "dhcp" { 
    primary; 
    address 192.168.0.54;
    port 519; 
    peer address 192.168.0.53;
    peer port 520; 
    max-response-delay 60;
    max-unacked-updates 10; 
    mclt 600;
    split 128;
    load balance max seconds 3;
}
subnet 192.168.0.0 netmask 255.255.252.0
{
    pool { 
        failover peer "dhcp";
        range 192.168.2.1 192.168.3.250;
        deny dynamic bootp clients;
    } 
    option routers 192.168.0.1;
    option domain-name "meilele.com";
    option domain-name-servers 192.168.0.10;
    option subnet-mask 255.255.252.0;
    #option time-offset -18000;
    default-lease-time 7200;
    max-lease-time 32400;
    
    #range dynamic-bootp 192.168.2.1 192.168.3.250;
    #range dynamic-bootp 192.168.3.1 192.168.3.250;    
    next-server 192.168.0.54;
    #filename "pxelinux.0"; 
}
EOF

备服务器配置:
cat >/etc/dhcp/dhcpd.conf <<EOF
ddns-update-style interim;
ignore client-updates;
allow booting;
authoritative;
allowbootp;


failover peer "dhcp" { 
    secondary; 
    address 192.168.0.53;
    port 520; 
    peer address 192.168.0.54;
    peer port 519; 
    max-response-delay 60;
    max-unacked-updates 10; 
}

subnet 192.168.0.0 netmask 255.255.252.0
{

    pool { 
        failover peer "dhcp";
        range 192.168.2.1 192.168.3.250;
        deny dynamic bootp clients;
    } 
    option routers 192.168.0.1;
    option domain-name "meilele.com";
    option domain-name-servers 192.168.0.10;
    option subnet-mask 255.255.252.0;
    #option time-offset -18000;
    default-lease-time 7200;
    max-lease-time 32400;
    
    #range dynamic-bootp 192.168.2.1 192.168.3.250;
    #range dynamic-bootp 192.168.3.1 192.168.3.250;
    
    next-server 192.168.0.53;
    #filename "pxelinux.0"; 
}
EOF

 

dhcp热备配置

标签:lan   add   out   mic   ignore   upd   seconds   热备   route   

原文地址:https://www.cnblogs.com/blog-lhong/p/11712094.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!