From owner-freebsd-questions@FreeBSD.ORG Thu Apr 19 02:27:30 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E9A116A400 for ; Thu, 19 Apr 2007 02:27:30 +0000 (UTC) (envelope-from zhangweiwu@realss.com) Received: from bossdog.realss.com (bossdog.realss.com [211.157.108.128]) by mx1.freebsd.org (Postfix) with ESMTP id C4ED613C457 for ; Thu, 19 Apr 2007 02:27:29 +0000 (UTC) (envelope-from zhangweiwu@realss.com) Received: from localhost (unknown [127.0.0.1]) by bossdog.realss.com (Postfix) with ESMTP id 669374C9C97 for ; Thu, 19 Apr 2007 10:27:40 +0800 (CST) Received: from bossdog.realss.com ([127.0.0.1]) by localhost (bossdog.realss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09505-05 for ; Thu, 19 Apr 2007 10:27:35 +0800 (CST) Received: from [218.193.55.195] (206.226.77.125.board.xm.fj.dynamic.163data.com.cn [125.77.226.206]) by bossdog.realss.com (Postfix) with ESMTP id 344494C97CE for ; Thu, 19 Apr 2007 10:27:35 +0800 (CST) From: Zhang Weiwu To: freebsd-questions@freebsd.org Content-Type: multipart/mixed; boundary="=-JkXerDxih1cckaMcpdr/" Organization: Real Softservice Date: Thu, 19 Apr 2007 10:24:11 +0800 Message-Id: <1176949451.7739.15.camel@joe.realss.com> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2 X-Virus-Scanned: amavisd-new at bossdog.realss.com Subject: dhcpd assign duplicated IP address 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: Thu, 19 Apr 2007 02:27:30 -0000 --=-JkXerDxih1cckaMcpdr/ Content-Type: text/plain Content-Transfer-Encoding: 7bit I am not sure if I understood DHCP correctly. I have this configuration in my /usr/local/etc/dhcpd.conf (Using FreeBSD 6.1): subnet 218.193.55.192 netmask 255.255.255.192 { range 218.193.55.194 218.193.55.254; option routers 218.193.55.193; } [snip] host sappho.realss.com { hardware ethernet 80:00:20:B0:99:31; fixed-address 218.193.55.196; option routers 218.193.55.193; } And I think this means the DHCP server should not assign IP address 218.193.55.196 to any hosts that do not have MAC address of "80:00:20:B0:99:31". But today a Windows user come with a notebook and he got assigned 218.193.55.196 IP address (and he complain he cannot surf the web). Check /var/db/dhcpd/dhcpd.leases and there is: lease 218.193.55.196 { starts 4 2007/04/19 01:49:23; ends 4 2007/04/19 11:49:23; tstp 4 2007/04/19 11:49:23; binding state active; next binding state free; hardware ethernet 00:c0:9f:73:0d:0a; uid "\001\000\300\237s\015\012"; client-hostname "dawnlinux"; } So the question is, did I misconfigured dhcpd.conf or what's the reason dhcpd is assigning an IP address it should not? Thanks a lot in advance! My dhcpd.conf is attached. P.S. In recent days we some times got another network problem and I'm not sure if it's related to this DHCP server behavior. It happens on both Linux and Windows hosts that a host suddenly is no longer accessible (Ping no response). Check 'arp -a' on other hosts shows the host being accessed have wrong Mac Address. e.g. yesterday 218.193.55.195 suddenly become in-accessible, this host is Linux and we got this behavior on a nearby host: sappho # arping 218.193.55.195 Unicast reply from 218.193.55.195 [00:0F:EA:4B:82:58] 0.638ms Unicast reply from 218.193.55.195 [00:0F:EA:4B:82:58] 0.637ms Sent 113 probes (1 broadcast(s)) Received 113 response(s) sappho # arp -a 218.193.55.195 ? (218.193.55.195) at 00:02:2A:C1:53:87 [ether] on eth0 arping reply is different from arp cache. This host become accessible the next day. Strange. Are these two problems related? -- Zhang Weiwu Real Softservice http://www.realss.com +86 592 2091112 --=-JkXerDxih1cckaMcpdr/ Content-Disposition: attachment; filename=dhcpd.conf Content-Type: text/plain; name=dhcpd.conf; charset=UTF-8 Content-Transfer-Encoding: 7bit option domain-name "realss.com"; # when ADSL is online, we use schools' name server because it's fast; # when ADSL is offline, clients who failed to reach schools' name server will try # China Telcom's name server option domain-name-servers 210.34.0.14, 210.34.0.18, 202.101.103.55, 202.101.103.54; option subnet-mask 255.255.255.0; default-lease-time 36000; max-lease-time 72000; # our DHCP server is the only one used here. authoritative; # ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates. ddns-update-style none; # this subnet does not only cover our office, but also the whole office building # our office is assigned 218.193.55.194 to 218.193.55.198 which is not enough # we simply occupy up to 218.193.55.202 and use this DHCP server to suggest # all other computers in this office building to use the rest IP address space; subnet 218.193.55.192 netmask 255.255.255.192 { range 218.193.55.194 218.193.55.254; # HITACHI PC with Pentium II processor # FreeBSD 6.1 # host 218.193.55.198 is the gateway of our office which routes packets to # ChinaTelcom if target IP address is not in CERNET # we don't want to share this gateway so we assign the rest of computers to # use school's gateway option routers 218.193.55.193; } host emerson.realss.com { # Gentoo Linux 2006.1 # 1. Development server of Real SS (a copy of the productional server); # 2. SVN server of all our projects # 2.1 SVN server of our groupware product running on Apache; # 2.2 SVN server for our small projects running on svn port; hardware ethernet 00:11:11:9d:ae:9c; fixed-address 218.193.55.194; option routers 218.193.55.198; } host joe.realss.com { # 1. Multi-seat compuater in the office; # SuSE 10.1 # 2. Offer free Internet cafe for the campus to test multi-user system; # 3. have a lot of tools for users and developers; hardware ethernet 00:0f:ea:4b:82:58; fixed-address 218.193.55.195; option routers 218.193.55.198; } host sappho.realss.com { # Ultrasparc U5 with additional 160GB IDE HDD # Gentoo Linux 2006.1 # 1. Public ftp server offering download of free-opensource software; # 2. Public rsync server offering gentoo portage rsync; # 3. Music Play Daemon runs on this host for the office; # 4. Print server for the office # note the below hw addr is not correct, sappho don't use dhcp hardware ethernet 80:00:20:B0:99:31; fixed-address 218.193.55.196; # It's important sappho.realss.com use the default router of CERNET # it is serving CERNET as well as fast networks OUTSIDE cernet option routers 218.193.55.193; } host www.linasp.com { # Mr Zhu Chenglin's PC # Windows XP hardware ethernet 00:90:27:58:9F:B5; fixed-address 218.193.55.197; option routers 218.193.55.198; } host ushang.net { # Shang Wenbin's PC # Debian Linux Sid hardware ethernet 00:60:08:46:10:7c; fixed-address 218.193.55.200; option routers 218.193.55.198; } host esmeralda.realss.com { # Zhang Weiwu's personal notebook # Ubuntu 6.10 hardware ethernet 00:16:D3:0D:F2:36; fixed-address 218.193.55.201; option routers 218.193.55.198; } host quasimodo.realss.com { # Zhang Weiwu's programming terminal # FreeBSD 6.1 hardware ethernet 00:60:97:92:c0:27; fixed-address 218.193.55.202; option routers 218.193.55.198; } host shaoxiong.realss.com { # Shao Xiong's personal notebook # Windows XP hardware ethernet 00:C0:9F:73:0D:0A; fixed-address 218.193.55.203; option routers 218.193.55.198; } host xmu.free-bsd.org { # an alternative name for sappho.realss.com # used for providing data access to CERNET hardware ethernet 80:00:20:B0:99:30; fixed-address 218.193.55.205; option routers 218.193.55.198; } host ljd { hardware ethernet 00:11:d8:71:65:51; fixed-address 218.193.55.210; option routers 218.193.55.198; } # Testbed # Freebsd 6 & Windows 98 # hardware ethernet 00:d0:b7:23:33:b9; # no static IP address for it yet --=-JkXerDxih1cckaMcpdr/--