From owner-freebsd-questions@FreeBSD.ORG Sun Nov 1 11:31:13 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0E431065704 for ; Sun, 1 Nov 2009 11:31:13 +0000 (UTC) (envelope-from trond@fagskolen.gjovik.no) Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no [IPv6:2001:700:1100:1:200:ff:fe00:b]) by mx1.freebsd.org (Postfix) with ESMTP id 989AF8FC0A for ; Sun, 1 Nov 2009 11:31:12 +0000 (UTC) Received: from mail.fig.ol.no (localhost [127.0.0.1]) by mail.fig.ol.no (8.14.3/8.14.3) with ESMTP id nA1BV7oP011379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 1 Nov 2009 12:31:08 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) Received: from localhost (trond@localhost) by mail.fig.ol.no (8.14.3/8.14.3/Submit) with ESMTP id nA1BV7sN011376; Sun, 1 Nov 2009 12:31:07 +0100 (CET) (envelope-from trond@fagskolen.gjovik.no) X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs Date: Sun, 1 Nov 2009 12:30:52 +0100 (CET) From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= Sender: Trond.Endrestol@fagskolen.gjovik.no To: =?ISO-8859-1?Q?D=E1nielisz_L=E1szl=F3?= In-Reply-To: <806321.83601.qm@web30807.mail.mud.yahoo.com> Message-ID: References: <82804.79685.qm@web30804.mail.mud.yahoo.com> <516971.12872.qm@web30807.mail.mud.yahoo.com> <806321.83601.qm@web30807.mail.mud.yahoo.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) Organization: =?ISO-8859-1?Q?Fagskolen_i_Gj=F8vik?= OpenPGP: url=http://fagskolen.gjovik.no/~trond/trond.key MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="2055831798-2103798825-1257075067=:44239" X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.fig.ol.no Cc: freebsd-questions@freebsd.org Subject: Re: dhcpd related issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 11:31:13 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --2055831798-2103798825-1257075067=:44239 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT -----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ó > To: patrick > Cc: freebsd-questions@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 > To: Dánielisz László > Cc: freebsd-questions@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ó : > > 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 ; > > 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@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----- --2055831798-2103798825-1257075067=:44239--