Články

Navigačný panel

DHCP server na Debian

Inštalácia ISC DHCP servera na Debian, aj s konfigom na PXE.



Krátky návod ako nainštalovať DHCP server na Debian. Je potom už jednoduché dorobiť boot-ovanie po sieti cez PXE.

Inštalácia

apt install isc-dhcp-server

Konfigurácia

# option definitions common to all supported networks...
option domain-name "fordo.sk";
option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
#log-facility local7;

option domain-name-servers 192.168.0.2, 8.8.8.8;

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.2, 8.8.8.8;
next-server 192.168.0.2;
option bootfile-name "pxelinux.0";
}

allow booting;

group {
next-server 192.168.0.2;
host tftpclient {
filename "pxelinux.0";
}
}

host AW1_am4_asus {
hardware ethernet f0:2f:74:19:ff:ff;
fixed-address 192.168.0.10;
}


nastavenie na ktorom interface ma fungovat
vi /etc/default/isc-dhcp-server

# Show that we want to be the only DHCP server in this network:
authoritative;

Inštalácia Trivial FTP servera pre PXE

apt install tftpd-hpa

Konfigurácia

# /etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/mnt/tftp"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"


Príspevok pridaný dňa: 21.04.2022 od užívatela: Dodoslav.
Zanechat komentár:

Nick:

Správa: