# DHCP Server Configuration file. # see /usr/share/doc/dhcp*/dhcpd.conf.example # see dhcpd.conf(5) man page # # ddns-update-style interim; # ddns-domainname "corp.example.ru"; # update-static-leases on; # local-address 10.1.2.4; # # , DHCP-relay if exists agent.circuit-id { log ( info, concat( " Accepted DHCP RELAY request for ", binary-to-ascii (10, 8, ".", leased-address), " Network segment: ", option agent.circuit-id, " DHCP Agent: ", option agent.remote-id)); } # this DHCP server to be declared valid authoritative; # failover peer "dhcp-failover" { primary; # address 10.1.2.4; # port 519; # peer address 10.1.2.14; # DHCP peer port 520; # DHCP # max-response-delay 30; max-unacked-updates 10; load balance max seconds 3; mclt 1800; split 128; # DHCP # , # "" . auto-partner-down 86400; # @baf28 } # option domain-name "corp.example.ru"; # DNS- option domain-name-servers 10.1.2.2, 10.1.2.3; # DNS-. Windows- option domain-search "example.lan corp.example.ru"; # default-lease-time 604800; # 7 days max-lease-time 2419200; # 4 weeks # default netmask /24 option subnet-mask 255.255.255.0; # Servers vlan - DHCP subnet 10.1.2.0 netmask 255.255.255.0 { } # VLAN' include "/etc/dhcp/dhcpd.d/vlan10.conf"; include "/etc/dhcp/dhcpd.d/vlan11.conf"; include "/etc/dhcp/dhcpd.d/vlan20.conf"; include "/etc/dhcp/dhcpd.d/vlan21.conf";
# zone 10.1.10.in-addr.arpa. { primary 10.1.2.2; secondary 10.1.2.3; } # DHCP-relay class "VLAN10" { match if option agent.circuit-id = "VLAN10"; } # subnet 10.1.10.0 netmask 255.255.255.0 { option routers 10.1.10.1; pool { failover peer "dhcp-failover"; # , failover range 10.1.10.51 10.2.56.254; # allow members of "VLAN10"; # } # === Static hosts # Admin host admin { hardware ethernet 01:23:45:67:89:ab; fixed-address 10.1.10.20; } # Admin's printer host admin { hardware ethernet cd:ef:01:23:45:67; fixed-address 10.1.10.21; } # , # # Insert automatic text above this }
failover peer "dhcp-failover" { secondary; # address 10.1.2.14; # port 520; # peer address 10.1.2.4; # DHCP peer port 519; # DHCP # max-response-delay 30; max-unacked-updates 10; load balance max seconds 3; # DHCP # , # "" . auto-partner-down 86400; # @baf28 }
Source: https://habr.com/ru/post/323984/
All Articles