From owner-freebsd-questions@FreeBSD.ORG Sat Jul 22 07:08:36 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B31516A4E2 for ; Sat, 22 Jul 2006 07:08:36 +0000 (UTC) (envelope-from glists@comcast.net) Received: from rwcrmhc15.comcast.net (rwcrmhc15.comcast.net [204.127.192.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id E49D443D6D for ; Sat, 22 Jul 2006 07:08:31 +0000 (GMT) (envelope-from glists@comcast.net) Received: from [172.16.2.5] (c-67-180-120-136.hsd1.ca.comcast.net[67.180.120.136]) by comcast.net (rwcrmhc15) with ESMTP id <20060722070554m1500n1hgse>; Sat, 22 Jul 2006 07:05:54 +0000 From: Serban Giuroiu To: freebsd-questions@freebsd.org Date: Sat, 22 Jul 2006 00:05:54 -0700 User-Agent: KMail/1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607220005.54412.glists@comcast.net> Subject: DHCPd Will Not Listen on the Correct Interface X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gyzmobro@yahoo.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jul 2006 07:08:36 -0000 Hello, everybody. I have a fresh install of FreeBSD 6.1-RELEASE on a machine with several NICs, and I need to run different DHCP servers for different subnets on different NICs. I installed isc-dhcp3-server-3.0.4_2 from ports with the default options enabled (of importance: DHCP_PARANOIA and DHCP_JAIL). These are the interfaces I need to run DHCPd on: fxp0: flags=8843 mtu 1500 options=8 inet6 fe80::2d0:b7ff:fee1:620f%fxp0 prefixlen 64 scopeid 0x1 inet 172.16.2.9 netmask 0xfffffc00 broadcast 172.16.3.255 ether 00:d0:b7:e1:62:0f media: Ethernet autoselect (100baseTX ) status: active rl0: flags=8843 mtu 1500 options=8 inet6 fe80::250:baff:fed1:a75a%rl0 prefixlen 64 scopeid 0x2 inet 10.0.0.1 netmask 0xfffffc00 broadcast 10.0.3.255 ether 00:50:ba:d1:a7:5a media: Ethernet autoselect (100baseTX ) status: active According to the man page, dhcpd takes as a last argument the interface it should bind to. I run one dhcpd for the interface rl0 like so: /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf.rl0.10.0.0.0 -lf /var/db/dhcpd.leases.rl0.10.0.0.0 -pf /var/run/dhcpd.pid.rl0.10.0.0.0 -user dhcpd -group dhcpd rl0 ps ax | grep dhcp shows it running: 20463 ?? Is 0:00.00 /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf.rl0.10.0.0.0 -lf /var/db/dhcpd.leases.rl0.10.0.0.0 -pf /var/run/dhcpd.pid.rl0.10.0.0.0 -user dhcpd -group dhcpd rl0 However, it binds to all interfaces, not just rl0. netstat -nat | grep 67 confirms this: udp4 0 0 *.67 *.* Naturally, I cannot start any other DHCP servers on the other interface: # /usr/local/sbin/dhcpd -cf /usr/local/etc/dhcpd.conf.fxp0.172.16.0.0 -lf /var/db/dhcpd.leases.fxp0.172.16.0.0 -pf /var/run/dhcpd.pid.fxp0.172.16.0.0 -user dhcpd -group dhcpd fxp0 Internet Systems Consortium DHCP Server V3.0.4 Copyright 2004-2006 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 BPF/fxp0/00:d0:b7:e1:62:0f/172.16.0/22 Sending on BPF/fxp0/00:d0:b7:e1:62:0f/172.16.0/22 Can't bind to dhcp address: Address already in use Please make sure there is no other dhcp server running and that there's no entry for dhcp or bootp in /etc/inetd.conf. Also make sure you are not running HP JetAdmin software, which includes a bootp server. After searching through Google, forums, and mailing lists, I have not encountered a post describing a similar situation. Does anybody know what the problem might be? Regards, --Serban Giuroiu