dhcpd related issue

Trond Endrestøl Trond.Endrestol at fagskolen.gjovik.no
Sun Nov 1 11:31:13 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 1 Nov 2009 02:06-0800, Dánielisz László wrote:

> I had one more idea: try nmap on my dhcp server, and port 67 does 
> not seems to be opened, after I tried telneting in and my connection 
> was refused:
> 
> $ telnet 192.168.1.1 67
> Trying 192.168.1.1...
> telnet: connect to address 192.168.1.1: Connection refused
> telnet: Unable to connect to remote host

DHCP uses UDP, telnet uses TCP, no wonder you're getting refused.

Do you have bpf (Berkeley packet filter) compiled in the kernel?
dhcpd relies on bpf. Just a thought, although dhcpd would probably 
shut down if bpf is unavailable.

As others have suggested, please post the output from ifconfig rl1, 
and from netstat -rnf inet.

> Than I disabled pf
> # pfctl -d
> No ALTQ support in kernel
> ALTQ related functions disabled
> pf disabled

Just another (silly) thought, does your pf setup allow UDP from 
192.168.1.1:67 to *:68 over the rl1 interface?

> Than I checked telnet/nmap again but still don't found any 67 port 
> ever there. I checked again that the dhcpd is running, and its up:
>
> # ps ax|grep dhcp
>   958  ??  Is     0:00.00 /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf -lf /var/db/dhcpd/dhcpd.lease
> 
> Any idea?

Did you restart dhcpd?
What's the output from fstat with respect to dhcpd?

The output should be something resembling:

dhcpd    dhcpd      18990 root /             2 drwxr-xr-x    1024  r
dhcpd    dhcpd      18990   wd /             6 drwxr-xr-x    1024  r
dhcpd    dhcpd      18990 text /usr     10505569 -rwxr-xr-x  595924  r
dhcpd    dhcpd      18990    0 /dev         14 crw-rw-rw-    null rw
dhcpd    dhcpd      18990    1 /dev         14 crw-rw-rw-    null rw
dhcpd    dhcpd      18990    2 /dev         14 crw-rw-rw-    null rw
dhcpd    dhcpd      18990    3* local dgram c32224b4 <-> c32228bc
dhcpd    dhcpd      18990    4* internet raw icmp c32d8b2c
dhcpd    dhcpd      18990    5* internet dgram udp c3173974
dhcpd    dhcpd      18990    6 /var      70999 -rw-r--r--   93335  w
dhcpd    dhcpd      18990    7 /dev          7 crw-------     bpf rw

If you happen to have lsof installed, it should yield something like 
this:

dhcpd     18990     1 dhcpd  cwd   VDIR       0,98       1024        6 /root
dhcpd     18990     1 dhcpd  rtd   VDIR       0,98       1024        2 /
dhcpd     18990     1 dhcpd  txt   VREG      0,106     595924 10505569 /usr/local/sbin/dhcpd
dhcpd     18990     1 dhcpd  txt   VREG       0,98     220136    26684 /libexec/ld-elf.so.1
dhcpd     18990     1 dhcpd  txt   VREG       0,98    1143792     1327 /lib/libc.so.7
dhcpd     18990     1 dhcpd    0u  VCHR       0,14        0t0       14 /dev/null
dhcpd     18990     1 dhcpd    1u  VCHR       0,14        0t0       14 /dev/null
dhcpd     18990     1 dhcpd    2u  VCHR       0,14        0t0       14 /dev/null
dhcpd     18990     1 dhcpd    3u  unix 0xc31719a8        0t0          ->0xc3171b44 (QR=0 QS=0 SO=PQLEN=0,QLEN=0,QLIM=0,RCVBUF=32768,SNDBUF=16384 SS=ISCONNECTED)
dhcpd     18990     1 dhcpd    4u  IPv4 0xc32d8b2c        0t0     ICMP *:* (QR=0 QS=0 SO=PQLEN=0,QLEN=0,QLIM=0,RCVBUF=73728,SNDBUF=73728)
dhcpd     18990     1 dhcpd    5u  IPv4 0xc3175060        0t0      UDP *:bootps (QR=0 QS=0 SO=PQLEN=0,QLEN=0,QLIM=0,RCVBUF=262144,REUSEADDR,SNDBUF=73728)
dhcpd     18990     1 dhcpd    6w  VREG      0,104      94061    70999 /var (/dev/ufs/var)
dhcpd     18990     1 dhcpd    7u  VCHR        0,7 0t26744985        7 /dev/bpf


HTH,
Trond.

> ________________________________
> From: Dánielisz László <laszlo_danielisz at yahoo.com>
> To: patrick <gibblertron at gmail.com>
> Cc: freebsd-questions at freebsd.org
> Sent: Sun, November 1, 2009 8:34:03 AM
> Subject: Re: dhcpd related issue
> 
> It's the same, I still don't got any IP address.
> 
> 
> 
> 
> ________________________________
> From: patrick <gibblertron at gmail.com>
> To: Dánielisz László <laszlo_danielisz at yahoo.com>
> Cc: freebsd-questions at freebsd.org
> Sent: Sun, November 1, 2009 6:38:31 AM
> Subject: Re: dhcpd related issue
> 
> What happens if you disable pf temporarily?
> 
> 2009/10/31 Dánielisz László <laszlo_danielisz at yahoo.com>:
> > Hello,
> >
> > I just configured my dhcpd but it gives no IP-s.
> > What had I done until now:
> >
> >  1. Installed isc-dhcp via ports
> >
> > 2. edited the /usr/local/etc/dhcpd.conf
> >
> > option domain-name "bsd";
> > option domain-name-servers <my dns server ip>;
> > option subnet-mask 255.255.255.0;
> > authoritative;
> >
> > default-lease-time 3600;
> > max-lease-time 86400;
> > ddns-update-style none;
> >
> > subnet 192.168.1.0 netmask 255.255.255.0 {
> > range 192.168.1.129 192.168.1.250;
> > option routers 192.168.1.1;
> > }
> >
> > 3. Added the following ones to /etc/rc.conf
> > ifconfig_rl1="inet 192.168.1.1  netmask 255.255.255.0"
> > dhcpd_enable="YES"
> > dhcpd_conf="/usr/local/etc/dhcpd.conf"
> > dhcpd_ifaces="rl1"
> >
> >
> > 4. Opened the adequate port in pf
> > pass in log on rl1 inet proto tcp from 192.168.1.0/24 to 192.168.1.1 port = bootps flags S/SA keep state
> > pass in log on rl1 inet proto udp from 192.168.1.0/24 to 192.168.1.1 port = bootps keep state
> >
> > 5.. When I start de daemon:
> > # /usr/local/etc/rc.d/isc-dhcpd start
> > Starting dhcpd.
> > Internet Systems Consortium DHCP Server V3.0.7
> > Copyright 2004-2008 Internet Systems Consortium.
> > All rights reserved.
> > For info, please visit http://www.isc.org/sw/dhcp/
> > Wrote 0 leases to leases file.
> > Listening on Socket/rl1/192.168.1/24
> > Sending on   Socket/rl1/192.168.1/24
> >
> > Everythings looks to be ok there but on the client (I tried OS-X and Nokia symbian) I can not obtain the IP address, do you have any idea what should I check?
> >
> >
> > Thanks!
> > Laci

- -- 
- ----------------------------------------------------------------------
Trond Endrestøl                  | Trond.Endrestol at fagskolen.gjovik.no
ACM, NAS, NUUG, SAGE, USENIX     |    FreeBSD 7.2-STABLE & Alpine 2.00
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (FreeBSD)

iEYEARECAAYFAkrtcXsACgkQbYWZalUoElvP0gCeLU+/YYnZ07hy2K5atOeN35kj
yk4Ani+Ip66CWpzIzp8986tIu9Ya172n
=ksU6
-----END PGP SIGNATURE-----


More information about the freebsd-questions mailing list