Server/dhcp

Aus C3D2
Wechseln zu: Navigation, Suche

Hardware

Lxc auf Server/flatbert

Software

  • isc-dhcp43-server
  • tftp-hpa-5.2

Verwendungszweck

  • DHCP Server (primary)
  • TFTP Server (für PXE Boot)

/etc/dhcpd.conf

#
# /etc/dhcpd.conf for primary DHCP server
#
### ### ### C3D2 ### ### ###

option local-proxy-config code 252 = text;

authoritative;                                             # server is authoritative
option domain-name "hq.c3d2.de";                           # the domain name issued
option domain-name-servers 172.22.99.51, 172.22.99.251, 213.73.91.35, 74.82.42.42;        # name servers issued
#option netbios-name-servers 192.168.1.2;                  # netbios servers
allow booting;                                             # allow for booting over the network
allow bootp;                                               # allow for booting
next-server 172.22.99.50;                                  # TFTP server for booting
#filename "pxelinux.0";                                    # kernel for network booting
filename "pxelinux.0";                                     # kernel for network booting
ddns-update-style interim;                                 # setup dynamic DNS updates
ddns-updates on;
ddns-domainname "dhcp.hq.c3d2.de";                         # domain name for DDNS updates
#
default-lease-time 3600;
max-lease-time 604800;
#
#key rndckey {
#        algorithm       hmac-md5;
#        secret          "xxxxxxxxxx";                     # get from the /etc/rndc.key file on the master
#}
zone dhcp.hq.c3d2.de                                       # forward zone to update
{
        primary 89.238.79.221;                             # update on the local machine
#        key rndckey;                                      # key to use for the update
}
zone 99.22.172.in-addr.arpa                                # reverse zone to update
{
        primary 89.238.79.221;                             # update on the local machine
#        key rndckey;                                      # key for update
}
failover peer "dhcp-failover" {                            # fail over configuration
         primary;                                          # This is the secondary
         address 172.22.99.50;                             # our ip address
         port 647;
         peer address 172.22.99.9;                         # primary's ip address
         peer port 647;
         max-response-delay 60;
         max-unacked-updates 10;
         mclt 3600;
         split 128;
         load balance max seconds 3;
}
subnet 172.22.99.0 netmask 255.255.255.0                   # zone to issue addresses from
{
        pool {
                failover peer "dhcp-failover";             # pool for dhcp, bootp leases with failover
                option routers 172.22.99.1;
                range 172.22.99.100 172.22.99.199;

                option local-proxy-config "http://172.22.99.54/proxy.pac";

### fixed-address // ###
...
### // fixed-address ###

        }
#        pool {                                             # accomodate our bootp clients here no replication and failover
#                option routers 172.22.99.4;
#                range 172.22.99.50 172.22.99.99;
#        }
        allow unknown-clients;
        ignore client-updates;
}

log-facility local7;

### ### ### C3D2 ### ### ###
# EOF

PXE

Lädt derzeit netboot.

/srv/tftp/netboot.xyz.kpxe