Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Apr 2007 10:24:11 +0800
From:      Zhang Weiwu <zhangweiwu@realss.com>
To:        freebsd-questions@freebsd.org
Subject:   dhcpd assign duplicated IP address
Message-ID:  <1176949451.7739.15.camel@joe.realss.com>

next in thread | raw e-mail | index | archive | help

--=-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/--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1176949451.7739.15.camel>