*BSD News Article 83485


Return to BSD News archive

#! rnews 4009 bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news
From: Ken Bigelow <kbigelow@www.play-hookey.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Two devices with same IP
Date: Sat, 23 Nov 1996 09:47:57 +0000
Organization: Erol's Internet Services
Lines: 73
Message-ID: <3296C84D.6B55@www.play-hookey.com>
References: <56ltqk$nhv@csugrad.cs.vt.edu> <56lvvc$62f$1@gail.ripco.com>
	    <56m19m$u08@csugrad.cs.vt.edu> <328EF58B.16E4@www.play-hookey.com>
	    <56scbl$29d@anorak.utell.net> <32920988.63E7@www.play-hookey.com> <574f39$2rt@anorak.utell.net>
Reply-To: kbigelow@www.play-hookey.com
NNTP-Posting-Host: kenjb05.play-hookey.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0 (Win16; U)

Brian Somers wrote:
> 
> In article <32920988.63E7@www.play-hookey.com>,
>         Ken Bigelow <kbigelow@www.play-hookey.com> writes:
> : Brian Somers wrote:
> >> Of course this assumes that all but one of the interfaces have a netmask
> >> of 0xffffffff :)
> >>
> :
> : Sorry, brian, but no. From my /etc/sysconfig file:
> :
> :
> : network_interfaces="cuaa1 lnc0 lo0"
> : ifconfig_cuaa1="inet 206.161.179.129  netmask 255.255.255.224"
> : ifconfig_lnc0="inet 206.161.179.129  netmask 255.255.255.224  mtu 1006"
> : ifconfig_lo0="inet localhost"
> :
> : The only thing I have changed in months has been the mtu setting, and
> : that was because of some messing around that my ISP did. These settings
> : have always worked fine, as you can see by visiting my site (URL in my
> : sig). In fact, I am at this moment answering via Netscape 3's newsreader
> : in Win 3.1 (for a specific reason) on one of the computers in my subnet.
> : Seems to still be working fine.
> 
> First, I assume that you don't mean cuaa1 - there's no cuaa1 device in
> my kernel anyway.  If you *do* mean cuaa1, when /etc/netstart executes
> 
>     ifconfig cuaa1 inet 206.161.179.129 netmask 255.255.255.224
> 
> it'll do nothing but produce an error message.

Not so. I *do* mean cuaa1; cuaa1 = com2 = my 33.6k modem. When pppd
starts, the starting command in /etc/rc.local is:

	pppd /dev/cuaa1 115200

This interface *becomes* ppp0 when the connection gets established, but
has to start as just cuaa1 during bootup, when I have no ppp connection.
(It is possible that the spec of 206.161.179.129 in /etc/ppp/options
automatically connotes a singleton IP address with ~~.255 netmask, but I
didn't specify that.)

> 
> Assuming cuaa1 is something else (ppp0, tun0), what happens when you send
> a packet to 206.161.179.{225-254} ?  Does it send it down the lnc0
> interface or the {insert whatever was meant by cuaa1} interface ?  I don't
> get what the above config lines are trying to say.

My actual IP block is from ~~.128 through ~~.159 , so sending something
to an address outside this range accomplishes nothing. The netmask, in
hex, is ff.ff.ff.e0 which gives me a 32-node subnet. The mask only means
that my subnet can use any combination of the last five bits (the
zeros), not that it will respond to such an address. The ones in the
mask only mean that the rest of my IP address is locked.

Now, if I leave my "personal" PC (206.161.179.133, code-named frey) on
and running FreeBSD while I'm at work, I can telnet/ftp to it from work
without a problem. The gateway (code-named odin) gets the external
packets through the ppp0/cuaa1 interface, passes them through to lnc0,
and lets them go on to frey, which responds appropriately. No fuss, no
muss.

The same holds true for other machines on my home network (also named
for Norse gods and places; don't ask why). If I leave them on and
running FreeBSD, I can access them from inside or out, and I can access
the outside world from any of them. They all simply specify
206.161.179.129 as their gateway.
-- 
Ken

Are you interested in   |
byte-sized education    |   http://www.play-hookey.com
over the Internet?      |