From nobody@FreeBSD.org  Wed Jan 28 22:00:23 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 290C1106585F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Jan 2009 22:00:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 16EBE8FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Jan 2009 22:00:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n0SM0Mfw000921
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 28 Jan 2009 22:00:22 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n0SM0Mxm000920;
	Wed, 28 Jan 2009 22:00:22 GMT
	(envelope-from nobody)
Message-Id: <200901282200.n0SM0Mxm000920@www.freebsd.org>
Date: Wed, 28 Jan 2009 22:00:22 GMT
From: Jin Guojun <jguojun@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: dhclient sets wrong IP address
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         131094
>Category:       bin
>Synopsis:       dhclient(8) sets wrong IP address
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 28 22:10:01 UTC 2009
>Closed-Date:    
>Last-Modified:  Thu Jan 29 07:40:07 UTC 2009
>Originator:     Jin Guojun
>Release:        7.1-RELEASE
>Organization:
>Environment:
FreeBSD test.Belkin 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Sat Jan 10 20:47:04 PST 2009     root@test.Belkin:/usr/src/sys/i386/compile/MinMax  i386

>Description:
When network connection (0.0 subnet)to nfe0 interface is down and then up in a few minutes, dhclient somehow set wrong IP (2.0 subnet) on the nfe0 interface.

fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:90:27:71:f2:13
        inet 192.168.2.17 netmask 0xffffff00 broadcast 192.168.2.255
        media: Ethernet autoselect (100baseTX)
        status: active
nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8<VLAN_MTU>
        ether 00:1e:90:c6:6f:e6
        inet 192.168.0.99 netmask 0xffffff00 broadcast 192.168.0.255
        inet 192.168.2.6 netmask 0xffffff00 broadcast 192.168.2.255
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active

>How-To-Repeat:
Must have two netwrok interfaces.
One (fxp0) is on a network to a priamry router.
The second interface (nfe0) is on a private network (DHCP server may or may not be up).

Both interfaces are set to ="DHCP" in /etc/rc.conf.

Disconnect Ethernet cable from nfe0 (2nd NIC), the NIC will get a IP from primary network (in this case -- 192.168.2.6).
Clear this bad ip and configgure nfe0 to 192.168.0.##, then plug in the Ethernet cable on NIC nfe0, without DHCP server on, soner, this NIC will have two IP addresses shown in Description section.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
