Portál AbcLinuxu, 14. července 2025 20:58
subnet 192.168.6.0 netmask 255.255.255.0 { option domain-name-servers 192.168.6.1; authoritative; option broadcast-address 192.168.6.255; option subnet-mask 255.255.255.0; option routers 192.168.6.1; option ntp-servers 192.168.6.1; range 192.168.6.50 192.168.6.199; host PC85-recepce { hardware ethernet 00:21:9b:35:6a:79; fixed-address 192.168.6.41; } }Kdyz to udelam v teto verzi tak mi syslog vypisuje warning
Oct 14 14:14:44 mail dhcpd: WARNING: Host declarations are global. They are not limited to the scope you declared them in. Oct 14 14:14:44 mail dhcpd: Internet Systems Consortium DHCP Server V3.1.1 Oct 14 14:14:44 mail dhcpd: Copyright 2004-2008 Internet Systems Consortium. Oct 14 14:14:44 mail dhcpd: All rights reserved. Oct 14 14:14:44 mail dhcpd: For info, please visit http://www.isc.org/sw/dhcp/ Oct 14 14:14:44 mail dhcpd: Wrote 0 deleted host decls to leases file. Oct 14 14:14:44 mail dhcpd: Wrote 0 new dynamic host decls to leases file. Oct 14 14:14:44 mail dhcpd: Wrote 2 leases to leases file.musim dat deklaraci hostu do globalu Mam ale otazku - kdyz mam vic siti, jak zajistim ze dana mac adresa bude mit v ruznych sitich prislusnou statickou adresu, dejme tomu 192.168.6.41 v siti 192.168.6.0/24 a 192.168.7.41 v siti 192.168.7.0/24 Dekuji
Řešení dotazu:
subnet 192.168.6.0 netmask 255.255.255.0 { option domain-name-servers 192.168.6.1; authoritative; option broadcast-address 192.168.6.255; option subnet-mask 255.255.255.0; option routers 192.168.6.1; option ntp-servers 192.168.6.1; range 192.168.6.50 192.168.6.199; } host PC85-recepce { hardware ethernet 00:21:9b:35:6a:79; fixed-address 192.168.6.41; }
subnet
. Je lepsi je umistit na globalni uroven, aby vas jejich umisteni zbytecne nematlo. Muzete pak sekci host
pro jednu MAC adresu opakovat, nebo do jedne sekce host
dat vice radku fixed-address
- dhcpd
pak sam podle subnetu, odkud prisel pozadavek, vybere, kterou sekci host
nebo kterou IP adresu pridelit.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.