Isc-dhcp-server
Jump to navigation
Jump to search
DHCP serveris
Norint jį priskirti tik kam tikram interfeisusi, paredaguojame /etc/default/isc-dhcp-server ir ten nustatome:
# Defaults for isc-dhcp-server (sourced by /etc/init.d/isc-dhcp-server)
# Path to dhcpd's config file (default: /etc/dhcp/dhcpd.conf).
DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
#DHCPDv6_CONF=/etc/dhcp/dhcpd6.conf
# Path to dhcpd's PID file (default: /var/run/dhcpd.pid).
DHCPDv4_PID=/var/run/dhcpd.pid
#DHCPDv6_PID=/var/run/dhcpd6.pid
# Additional options to start dhcpd with.
# Don't use options -cf or -pf here; use DHCPD_CONF/ DHCPD_PID instead
#OPTIONS=""
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="br0"
INTERFACESv6="br0"
INTERFACES="br0"
šiame konfige uždėta br0 (bridžas), jeigu pas jus vietinio tinklo intefeiso pavadinimas pvz.: eth1 tuomet pakeiskite...
Simple dhcp serverio konfigas /etc/dhcp/dhcpd.conf
option domain-name "eofnet.lt";
ddns-update-style none;
option netbios-node-type 8;
ignore client-updates;
authoritative;
log-facility local7;
allow booting;
allow bootp;
subnet
192.168.12.0 netmask 255.255.255.0 {
get-lease-hostnames on;
use-host-decl-names on;
option routers 192.168.12.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.12.255;
option domain-name-servers 8.8.8.8, 8.8.4.4;
option time-offset 0;
range 192.168.12.50 192.168.12.150;
filename "pxelinux.0"; # pxe ? why not :D
default-lease-time 86400;
max-lease-time 604800;
}
# dhcp static leasas
host imac {
hardware ethernet 98:aa:e6:e2:ad:64;
fixed-address 192.168.12.2;
}
Perkrauname ir įgaliname užsikrauti sistemos krovimosi metu:
systemctl enable isc-dhcp-server systemctl start isc-dhcp-server