Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2000 12:09:47 +0400 (MSD)
From:      "Vladimir B. Grebenschikov" <vova@express.ru>
To:        Yar Tikhiy <yar@comp.chem.msu.su>
Cc:        freebsd-net@freebsd.org
Subject:   Re: kern/22185: Identical IP addresses on two broadcast interfaces
Message-ID:  <14837.17355.162839.648003@vbook.express.ru>
In-Reply-To: <200010240729.LAA23397@comp.chem.msu.su>
References:  <14836.34675.657339.710180@vbook.express.ru> <200010240729.LAA23397@comp.chem.msu.su>

next in thread | previous in thread | raw e-mail | index | archive | help
Yar Tikhiy writes:
 > Hello Vladimir,
 > 
 > >  > 	It's possible to add two absolutely identical IP addresses
 > >  > 	to two different broadcast interfaces.
 > >  > 
 > >  > 	I guess it would be possible to add different addresses from
 > >  > 	the same network, too.
 > >  > 
 > >  > 	The problem arises from in_control()/in_ifinit() leaving the
 > >  > 	address installed even if adding the link-layer route fails.
 > > 
 > > Is it a bug ? May be it is nice feature ? It feauter is useful if know
 > > exact what happens.
 > 
 > IMHO this feature is hard to use and likely to cause troubles because
 > interfaces' IP addresses are coupled tightly with the routing table, 
 > which is not tolerant to multiple entries pointing to the same destination.
 > Of course, I can imagine cases where the feature might appear useful.
 > Anyway, it's up to the development team to decide if it's a feature or
 > a bug. I just reported the system's behaviour that didn't seem completely
 > natural to me.

For me routing to connected interface have no deal with interface
addreses. Common use is that interface 10.0.0.1/24 appears with route 
10.0.0.0/24 to the interface, yes ? But look at small example:

ifconfig fxp0 10.0.0.1 netmask 255.255.255.0
ifconfig fxp1 10.0.0.2 netmask 255.255.255.0

and fxp0 and fxp1 coinnected to one real ethernet segment.

So route for will appear only on fxp0.

But we can use fxp2 for external input for 10.0.0.2, or use
something like 'route add default 10.0.0.77 -iface fxp1'
for setting default route through fxp1.

Another example:

I have router with pccard interface wi, and I need to use interface
address to star nat's and netgraph tunnel. On moment starting nat and
ng tunnel pccard not detected and interface wi0 not present. So I am
add exactly same address on loopback (with mask /32) and all starup
correctly, than wi0 appears with same interface address and some real
mask (/28 for example) - all works great.

 > SY, Yar

--
TSB Russian Express, Moscow
Vladimir B. Grebenschikov, vova@express.ru


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




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