Server/dhcp: Unterschied zwischen den Versionen

Aus C3D2
Zur Navigation springen Zur Suche springen
KKeine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
{{beinhaltet Abweichungen von der Realität}}
[[Server/freebert]] is gone!
== Hardware ==
== Hardware ==


Virtualisiert durch [[Server/freebert/FreeBSD]]
Lxc auf [[Server/flatbert]]


== Software ==
== Software ==
FreeBSD Jail Container
* isc-dhcp43-server
* isc-dhcp43-server
* tftp-hpa-5.2
* tftp-hpa-5.2
Zeile 14: Zeile 9:
== Verwendungszweck ==
== Verwendungszweck ==
* DHCP Server (primary)
* DHCP Server (primary)
* TFTP Server (für PXE Boot, derzeit Debian7 amd64)
* TFTP Server (für PXE Boot, derzeit debian 8 amd64, Linux Mint Debian Edition 32bit/amd64)
* DHCP Server Primary/Secondary (failover durch Replication, Rotzbeere ist Backup-DHCPd)


== JAIL: /etc/rc.conf ==
== PXE Boot ==


<source lang=bash>
Debian Mint Edition lädt Dateisystem über storage vom Pfad /mnt/zroot/storage/rpool/install/LinuxMint/nfs-{32,64}bit
### <--- Service // ---> ###
nach.
inetd_enable="YES"
tftpd_enable="YES"
tftpd_flags="-p -s /usr/tftpboot -B 1024 --ipv4"
dhcpd_enable="YES"
dhcpd6_enable="NO"
dhcpd_ifaces="lagg0"
### <--- // Service ---> ###
</source>


== JAIL: /usr/local/etc/dhcpd.conf ==
== /etc/dhcpd.conf ==


<source lang=bash>
<source lang=bash>
Zeile 110: Zeile 96:
</source>
</source>


== JAIL: /usr/tftpboot ==
== /var/lib/tftpboot ==


<source lang=bash>
<source lang=bash>
total 32950
drwxrwxr-x  5 nobody nogroup      11 Jul 16 19:53 .
drwxr-xr-x  6 nobody nobody        10 Apr 16 04:57 .
drwxr-xr-x 28 root  root         28 May 29 17:11 ..
drwxr-xr-x 8 root   wheel        18 Apr 16 04:57 ..
-rw-r--r--  1 root  root    47454756 Jul 1 18:21 c1841-adventerprisek9-mz.151-4.M10.bin
-rw-r--r--  1 nobody nobody      667 Apr 16 04:57 .listing
drwxrwxr-x  3 nobody nogroup        3 Apr 23 00:11 debian-installer
drwxr-xr-x  3 nobody nobody        4 Apr 16 04:57 debian-installer
drwxr-xr-x  4 root  root          4 Jul 16 19:04 images
drwxr-xr-x  4 nobody  nobody        8 Apr 16 04:57 gtk
lrwxrwxrwx 1 nobody nogroup      47 Apr 23 00:11 ldlinux.c32 -> debian-installer/amd64/boot-screens/ldlinux.c32
-rw-r--r-- 1 nobody nobody  27262976 Apr 16 04:57 mini.iso
-rw-r--r--  1 nobody nogroup 19368308 Apr 23 00:11 netboot.tar.gz
-rw-r--r--  1 nobody nobody  15789354 Apr 16 04:57 netboot.tar.gz
lrwxrwxrwx 1 nobody nogroup      33 Apr 23 00:11 pxelinux.0 -> debian-installer/amd64/pxelinux.0
-rw-r--r-- 1 nobody nobody    26716 Apr 16 04:57 pxelinux.0
drwxr-xr-x  2 root  root          3 Jul 16 21:14 pxelinux.cfg
drwxr-xr-x  2 nobody  nobody        4 Apr 16 04:57 pxelinux.cfg
-rw-rw-r-1 nobody nogroup      54 Apr 23 00:11 version.info
drwxr-xr-x 2 nobody nobody        6 Apr 16 04:57 xen
</source>
</source>
== Log ==
* 16.04.2014 - einfaches Basis Setup


[[Kategorie:Infrastruktur]]
[[Kategorie:Infrastruktur]]

Version vom 16. Juli 2015, 19:17 Uhr

Hardware

Lxc auf Server/flatbert

Software

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

Verwendungszweck

  • DHCP Server (primary)
  • TFTP Server (für PXE Boot, derzeit debian 8 amd64, Linux Mint Debian Edition 32bit/amd64)

PXE Boot

Debian Mint Edition lädt Dateisystem über storage vom Pfad /mnt/zroot/storage/rpool/install/LinuxMint/nfs-{32,64}bit nach.

/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

/var/lib/tftpboot

drwxrwxr-x  5 nobody nogroup       11 Jul 16 19:53 .
drwxr-xr-x 28 root   root          28 May 29 17:11 ..
-rw-r--r--  1 root   root    47454756 Jul  1 18:21 c1841-adventerprisek9-mz.151-4.M10.bin
drwxrwxr-x  3 nobody nogroup        3 Apr 23 00:11 debian-installer
drwxr-xr-x  4 root   root           4 Jul 16 19:04 images
lrwxrwxrwx  1 nobody nogroup       47 Apr 23 00:11 ldlinux.c32 -> debian-installer/amd64/boot-screens/ldlinux.c32
-rw-r--r--  1 nobody nogroup 19368308 Apr 23 00:11 netboot.tar.gz
lrwxrwxrwx  1 nobody nogroup       33 Apr 23 00:11 pxelinux.0 -> debian-installer/amd64/pxelinux.0
drwxr-xr-x  2 root   root           3 Jul 16 21:14 pxelinux.cfg
-rw-rw-r--  1 nobody nogroup       54 Apr 23 00:11 version.info