DHCP failover configure

Reference from: Linux ISC DHCP Server failover under Debian

primary conf:

option domain-name "ggsre.com";
option domain-name-servers 10.160.16.33,10.160.16.34;
ddns-update-style none;
authoritative;
ping-check true;
default-lease-time 86400;
max-lease-time 172800;
log-facility local7;
failover peer "dhcp-failover" {
    primary;
    address 10.160.16.58;
    port 647;
    peer address 10.160.16.59;
    peer port 847;
    max-response-delay 60;
    max-unacked-updates 10;
    load balance max seconds 3;
    mclt 3600;
    split 128;
}
subnet 10.160.72.0 netmask 255.255.252.0 {
    option routers 10.160.72.1;
    pool {
        failover peer "dhcp-failover";
        range 10.160.72.100 10.160.72.250;
    }
    pool {
        failover peer "dhcp-failover";
        range 10.160.73.1 10.160.73.250;
    }
}
subnet 10.160.16.0 netmask 255.255.254.0 {
        option routers 10.160.16.1;
        option domain-name "outnet.com";
        option domain-name-servers 10.160.16.1;
        next-server 10.160.16.2;
        filename "pxelinux.0";
        default-lease-time 600;
    pool {
        failover peer "dhcp-failover";
        range 10.160.16.5 10.160.16.9;
    }
}

secondary.conf:

option domain-name "ggsre.com";
option domain-name-servers 10.160.16.33,10.160.16.34;
ddns-update-style none;
authoritative;
ping-check true;
default-lease-time 86400;
max-lease-time 172800;
log-facility local7;
failover peer "dhcp-failover" {
    secondary;
    address 10.160.16.59;
    port 847;
    peer address 10.160.16.58;
    peer port 647;
    max-response-delay 60;
    max-unacked-updates 10;
    load balance max seconds 3;
    #mclt 3600;
    #split 128;
}
subnet 10.160.72.0 netmask 255.255.252.0 {
    option routers 10.160.72.1;
    pool {
        failover peer "dhcp-failover";
        range 10.160.72.100 10.160.72.250;
    }
    pool {
        failover peer "dhcp-failover";
        range 10.160.73.1 10.160.73.250;
    }
}
subnet 10.160.16.0 netmask 255.255.254.0 {
        option routers 10.160.16.1;
        option domain-name "outnet.com";
        option domain-name-servers 10.160.16.1;
        next-server 10.160.16.2;
        filename "pxelinux.0";
        default-lease-time 600;
    pool {
        failover peer "dhcp-failover";
        range 10.160.16.5 10.160.16.9;
    }
}

The same conf you could use the `include /the/same/conf` command  import that.

The defferent:

diff dhcpd.*
10,14c10,14
<     primary;
<     address 10.160.16.58;
<     port 647;
<     peer address 10.160.16.59;
<     peer port 847;
---
>     secondary;
>     address 10.160.16.59;
>     port 847;
>     peer address 10.160.16.58;
>     peer port 647;
18,19c18,19
<     mclt 3600;
<     split 128;
---
>     #mclt 3600;
>     #split 128;

See more in dhcp.conf offical website DHCP ISC FAILOVER

Debian9.5 set multiple vlans ip on one NIC in DELL R710

1, If you met this error while restart network: 

Nov 08 11:07:07 debian kernel: bnx2 0000:01:00.0: firmware: failed to load bnx2/bnx2-mips-09-6.2.1b.fw (-2)
Nov 08 11:07:07 debian kernel: bnx2 0000:01:00.0: Direct firmware load for bnx2/bnx2-mips-09-6.2.1b.fw failed with error -2

You need to install the NIC driver: DELL_LAN.iso : mount the iso, 

mount -t iso9660 DELL_LAN.iso /dstdir

and use command `dpkg -i *.deb` install the two deb packages in the iso.

2, Install the `vlan` package or use this deb package vlan_1.9-3.2+b1_amd64.deb which is download from offical website or download from this website vlan_1.9-3.2+b1_amd64.deb .

3, Add such like this configure in the network conf file: "/etc/network/interface"

auto vlan170
iface vlan170 inet static
    vlan-raw-device eno1
    address 10.17.3.249
    netmask 255.255.252.0
    gateway 10.17.0.1

auto vlan174
iface vlan174 inet static
    vlan-raw-device eno1
    address 10.17.7.249
    netmask 255.255.252.0
    gateway 10.17.4.1

and then, restart the networking.

4, Run the cmd `ip r s` will get some route rule like this (these will be generate automatic):

root@debian:~# ip r s
default via 10.17.0.1 dev vlan170 onlink 
10.17.0.0/22 dev vlan170 proto kernel scope link src 10.17.3.249 
10.17.4.0/22 dev vlan174 proto kernel scope link src 10.17.7.249

Finish or you can change the route rule by yourself.