Re: dhcpd assign duplicated IP address

2007-04-19 Thread Bill Moran
In response to Zhang Weiwu [EMAIL PROTECTED]:

snip
 
 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?

You have something seriously wrong somewhere.  They may be related but
there's not enough information here to be sure.  Consider installing
arpwatch on one or more systems and see if the reports it sends narrow
down the problem.

-- 
Bill Moran
http://www.potentialtech.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: dhcpd assign duplicated IP address

2007-04-19 Thread Zhang Weiwu

Bill Moran 写道:

In response to Zhang Weiwu [EMAIL PROTECTED]:

snip
  

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?



You have something seriously wrong somewhere.  They may be related but
there's not enough information here to be sure.  Consider installing
arpwatch on one or more systems and see if the reports it sends narrow
down the problem.
I have followed Jeffrey's suggestion and reconfigured dhcpd.conf to make 
sure no host with specified IP address is within dynamic assigned IP 
range. I was mislead by my previous experience with Microsoft DHCP 
server configuration where a host with fixed IP address should be within 
the range. After updated dhcpd.conf I haven't see an IP conflict yet, 
I'll watch a few days.


For the ARP issue, thanks for suggesting arpwatch. I'd like to take a 
deeper look into how ARP works later. Thanks!

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


dhcpd assign duplicated IP address

2007-04-18 Thread Zhang Weiwu
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
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 

Re: dhcpd assign duplicated IP address

2007-04-18 Thread Jeffrey Goldberg

On Apr 18, 2007, at 9:24 PM, Zhang Weiwu wrote:

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.


No, it doesn't mean that.  You have configured dhcpd to have two ways  
of assigning the address 218.193.55.196.  One is through the dynamic  
mechanism and the other is through the fixed address.


You should set your fixed address to be outside of your dynamic pool  
range.


Cheers,

-j


--
Jeffrey Goldberghttp://www.goldmark.org/jeff/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]