Portál AbcLinuxu, 7. listopadu 2025 10:32
# dhcpd.conf
#
# Configuration file for ISC dhcpd (see 'man dhcpd.conf')
#
#DHCPD_INTERFACE="eth1";
authoritative;
ddns-update-style none;
use-host-decl-names true;
option subnet-mask 255.255.255.0;
subnet 192.168.1.0 netmask 255.255.255.0 {
default-lease-time 86400;
max-lease-time 604800;
#range dynamic-bootp 192.168.1.11 192.168.1.25;
#range 192.168.1.11 192.168.1.25;
option domain-name "paranormal.org";
option domain-name-servers 213.46.172.36, 213.46.172.37;
#option ip-forwarding false;
option routers 192.168.1.10;
option broadcast-address 192.168.1.255;
}
host Amadeus {
hardware ethernet 00:C0:26:32:9A:C8;
fixed-address 192.168.1.20;
}
... ty zakomentovane veci jsou pozustatky ruznych experimentu... zkousel jsem toho vic :o)
kdyz spustim dhcpd tak je _snad_ vsechno OK:
root@p4t0k:~# dhcpd eth1 Internet Systems Consortium DHCP Server V3.0.3 Copyright 2004-2005 Internet Systems Consortium. All rights reserved. For info, please visit http://www.isc.org/sw/dhcp/ Wrote 0 deleted host decls to leases file. Wrote 0 new dynamic host decls to leases file. Wrote 0 leases to leases file. Listening on Socket/eth1/192.168.1/24 Sending on Socket/eth1/192.168.1/24nejake info o eth1 na routeru:
root@p4t0k:~# ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:01:02:10:88:B6
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::201:2ff:fe10:88b6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8850 (8.6 Kb) TX bytes:1188 (1.1 Kb)
Interrupt:10 Base address:0xf80
a posledni vec... trosku jsem si zasniffoval na eth1 a tady je hlavicka packetu od klientskyho pocitace (je na nem zrovna linux, ale predpokladam ze s widlema by to bylo asi stejne):
---[ UDP ]----------------------------------------------------------- 0.0.0.0:68(bootpc) -> 255.255.255.255:67(bootps) Version: 4 Total Lenght: 576 TTL: 64 Packet Number: 3 ---[ UDP Data ]------------------------------------------------------Klient zasila requesty, ale server neodpovida (ano, dhcpd urcite bezi!) ... tak to je asi vsechno, ted uz jen otazka -> Co delam spatne? diky
authoritative;
ddns-update-style ad-hoc;
ddns-updates on;
max-lease-time 86400;
default-lease-time 86400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option domain-name-servers 192.168.1.1;
option domain-name "vychodni.local";
option netbios-name-servers 192.168.1.1;
option netbios-dd-server 192.168.1.1;
option netbios-node-type 8;
option netbios-scope "";
option ip-forwarding off;
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
range 192.168.1.40 192.168.1.60;
ignore client-updates;
}
group {
use-host-decl-names true;
host netway {hardware ethernet 00:50:8d:4b:28:12;
fixed-address 192.168.1.100;}
}
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.