Strange behaivior of dhcpd
Bachman Kharazmi
bkw at lindesign.se
Tue Jan 6 14:22:43 GMT 2004
dhcpd working fine now, after my /etc/init.d/dhcpd has been rewritten.
-----------------------------------------
#!/bin/bash
# chkconfig: 345 80 20
# description: DHCP Server
# processname: dhcpd
# config: /etc/config.d/dhcpd
# config: /etc/dhcpd.conf
#
#$DHCPD_INTERFACES=eth0
# Get service config
[ -f /etc/config.d/dhcpd ] && . /etc/config.d/dhcpd
ARGS="-q $DHCPD_INTERFACES" start() { echo -n "Starting dhcpd: " /usr/sbin/dhcpd $ARGS && echo -e $RESULT_OK || echo -e $RESULT_FAIL }
reload () {
# dhcpd cannot reload $0 restart
}
. /lib/lsb/init-functions
__________________________________
Thanks to sofar
/bkw
On Tue, 6 Jan 2004 10:14:04 +0100
Bachman Kharazmi <bkw at lindesign.se> wrote:
> *** From dhcp-server -- To unsubscribe, see the end of this message. ***
>
> hi
> I'am running isc-dhcpd-V3.0pl2.
> There seem to be issues during the startup of dhcpd when I boot my machine.
>
> I've "rm /var/run/* /var/lock/*" in /etc/init.d/bootmisc so I'am certain there there's nothing left after a reboot cause /var/run and and /var/lock are partitions that got remounted after every reboot, but to make sure...
>
>
> When /etc/init.d/dhcpd tries to start I get this in messages.
>
> ----------------------
>
> Jan 6 09:16:28 tellus dhcpd: Wrote 2 leases to leases file.
> Jan 6 09:16:28 tellus dhcpd: There's already a DHCP server running.
> Jan 6 09:16:28 tellus dhcpd:
> Jan 6 09:16:28 tellus dhcpd: If you did not get this software from ftp.isc.org, please
> Jan 6 09:16:28 tellus dhcpd: get the latest from ftp.isc.org and install that before
> Jan 6 09:16:28 tellus dhcpd: requesting help.
> Jan 6 09:16:28 tellus dhcpd:
> Jan 6 09:16:28 tellus dhcpd: If you did get this software from ftp.isc.org and have not
> Jan 6 09:16:28 tellus dhcpd: yet read the README, please read it before requesting help.
> Jan 6 09:16:28 tellus dhcpd: If you intend to request help from the dhcp-server at isc.org
> Jan 6 09:16:28 tellus dhcpd: mailing list, please read the section on the README about
> Jan 6 09:16:28 tellus dhcpd: submitting bug reports and requests for help.
> Jan 6 09:16:28 tellus dhcpd:
> Jan 6 09:16:28 tellus dhcpd: Please do not under any circumstances send requests for
> Jan 6 09:16:28 tellus dhcpd: help directly to the authors of this software - please
> Jan 6 09:16:28 tellus dhcpd: send them to the appropriate mailing list as described in
> Jan 6 09:16:28 tellus dhcpd: the README file.
> ----------------------------------------
> and there's no dhcpd -q eth0 running when I do ps ax | grep dhcpd :/
>
> how can the log say there's already a dhcpd running ?
>
> I donno if dhcpd.leases has to do with this. but I guess only /var/run/dhcpd.pid can cause such msg.
>
> There's a /var/run/dhcpd.pid that say:
>
> root at tellus /var/run # ls -al
> total 32
> drwxrwxrwt 2 root root 220 Jan 6 09:25 .
> drwxr-xr-x 14 root root 4096 Jan 6 09:16 ..
> -rw-r--r-- 1 root root 5 Jan 6 09:25 dhclient-eth1.pid
> -rw-r--r-- 1 root root 0 Jan 6 09:16 dhcpd.pid
>
> so it has to be created from somewhere after /var/run and /var/lock are remounted and even cleant by hand from bootmisc.
>
>
> my dhcpd.conf say:
> --------------------
> ddns-update-style interim;
> subnet 192.168.1.0 netmask 255.255.255.0 {
> range 192.168.1.2 192.168.1.5;
> option domain-name-servers 10.130.1.2, 10.251.63.240;
> option domain-name "lan";
> option routers 192.168.1.1;
> option subnet-mask 255.255.255.0;
> option broadcast-address 192.168.1.255;
>
> #lease times
> default-lease-time 86400;
> max-lease-time 2592000;
>
> ----------------------
>
> I'am running same machine as fw that might be a fact that it cant start if the proper settings isn't set.
>
> my fw lines look like.
> $IPTABLES -A udpincoming_packets -i $LAN_IFACE -p UDP -s 0/0 --dport 67:68 -j ACCEPT
> $IPTABLES -A udpincoming_packets -i $LAN_IFACE -p UDP -s 0/0 --source-port 67:68 -j ACCEPT
>
> iptables -L -n:
> Chain udpincoming_packets (2 references)
> target prot opt source destination
> ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpts:67:68
> ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp spts:67:68
>
> and I would like to show the behaivior of the the dhcpd.leases too.
> lease 192.168.1.2 {
> starts 1 2004/01/05 12:41:03;
> ends 2 2004/01/06 12:41:03;
> tstp 2 2004/01/06 12:41:03;
> binding state active;
> next binding state free;
> hardware ethernet 00:0c:6e:80:67:3e;
> uid "\001\000\014n\200g>";
> client-hostname "pluto";
> }
> lease 192.168.1.5 {
> starts 1 2004/01/05 23:12:03;
> ends 2 2004/01/06 23:12:03;
> tstp 2 2004/01/06 23:12:03;
> binding state active;
> next binding state free;
> hardware ethernet 00:03:93:49:60:44;
> uid "\001\000\003\223I`D";
> }
>
> I guess there's something strange. after a lease of 192.168.1.2 it's supposed to be .3 etc -> .5 ?
>
>
>
>
>
> I can start my dhcpd manually if I remove /var/run/dhcpd.pid by hand and then do /etc/init.d/dhcpd start.
>
> then it works fine.
> 1742 ? S 0:00 /usr/sbin/dhcpd -q eth0
>
>
> Thanks for all replys
> /bkw
>
>
> --
> ##############################
> # BKW - Bachman Kharazmi #
> # cellphone: +46 707 310 886 #
> # bkw at lindesign.se #
> # uin: #24089491 #
> # Malmö - Sweden #
> ##############################
>
> -- Attached file included as plaintext by Ecartis --
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
>
> iD8DBQE/+nxgqeCGfbhI7QMRAtAUAJ9BV6OU53pxfod1Jmycd3T8R6Om9ACfSHVL
> zr2sy8fakIwWDez/MNyEuvI=
> =QNNm
> -----END PGP SIGNATURE-----
>
>
>
> -----------------------------------------------------------------------
> List Archives : http://www.isc.org/ml-archives/dhcp-server/
> Unsubscribe : http://www.isc.org/dhcp-lists.html
> -or- : mailto:dhcp-server-request at isc.org?Subject=unsubscribe
> -----------------------------------------------------------------------
>
>
--
##############################
# BKW - Bachman Kharazmi #
# cellphone: +46 707 310 886 #
# bkw at lindesign.se #
# uin: #24089491 #
# Malmö - Sweden #
##############################
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lunar-linux.org/pipermail/lunar/attachments/20040106/cb28fad1/attachment.bin
More information about the Lunar
mailing list