Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jul 2002 03:32:57 -0400
From:      Jonathan Chen <jon@FreeBSD.org>
To:        "Jin Guojun[DSD]" <j_guojun@lbl.gov>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/21292: ifconfig warn but does duplicate IP address
Message-ID:  <20020706033257.D58146@porthos.spock.org>
In-Reply-To: <3D25FD1B.4AF0217@lbl.gov>; from j_guojun@lbl.gov on Fri, Jul 05, 2002 at 01:10:03PM -0700
References:  <200207051941.g65Jf3x2084537@freefall.freebsd.org> <3D25FD1B.4AF0217@lbl.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 05, 2002 at 01:10:03PM -0700, Jin Guojun[DSD] wrote:
> Jonathan Chen wrote:
> > 
> > Synopsis: ifconfig warn but does duplicate IP address
> > 
> > State-Changed-From-To: open->closed
> > State-Changed-By: jon
> > State-Changed-When: Fri Jul 5 12:40:04 PDT 2002
> > State-Changed-Why:
> > fixed [src/sys/netinet/in.c 1.44.2.8]
> > 
> > http://www.freebsd.org/cgi/query-pr.cgi?pr=21292
> 
> I am not sure if this is completely fixed -- it is fixed if same netmask
> is given. If a different netmask is used, the same IP can still be
> assigned to a different interface, which is meaningless even they are
> in different class.
> 
> I think this type of checking should be simple IP only; ie., it should not
> invoke netmask:

The checking you refer to is actually done on the routing table.  
Generally, If you have two interfaces directly connected to the same 
subnet, the kernel cannot decide which interface to send packets through, 
hence the 'file exists' error.

There is nothing inherently wrong with two interfaces having the same IP 
address.  For instance, a CIDR router might use the same IP address for 
both the larger and smaller subnet, and multiple point-to-point interfaces 
in a machine will often have the same IP.  Instead of having the kernel 
tell you what you don't want to do, I perfer the much simpler motto:  If 
you don't want to do it, then don't do it.

-Jon

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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