*BSD News Article 97666


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.edu.au!munnari.OZ.AU!uunet!in3.uu.net!128.230.129.106!news.maxwell.syr.edu!feed1.news.erols.com!news.nl.innet.net!INnl.net!feed1.news.innet.be!INbe.net!stns.news.pipex.net!warm.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!usenet
From: brian@shift.utell.net (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: routing to self via localhost?
Date: 13 Jun 1997 08:49:18 GMT
Organization: Awfulhak Ltd.
Lines: 43
Message-ID: <5nr1ie$quc@ui-gate.utell.co.uk>
References: <33A0C249.41C67EA6@servtech.com>
Reply-To: brian@awfulhak.org, brian@utell.co.uk
NNTP-Posting-Host: shift.utell.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Newsreader: knews 0.9.8
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:42846

In article <33A0C249.41C67EA6@servtech.com>,
	shawn carey <smc@servtech.com> writes:
> Hello,
> 
> I have a FreeBSD 2.2.2 system with no hardware network intefaces that I
> need to get CDE running on.  CDE requires that the system be able to
> communicate (even to itself) via the network.
> 
> My first attempt was to add a route from the system's IP address to the
> loopback inetrface:
> 
> % route add 192.168.1.1 127.0.0.1
> 
> But packets do not make it to localhost, or at least localhost does not
> recognize these packets as something it needs to worry about.  This
> makes some amount of sense to me, however it doesn't help my situation
> much, and from what I can gather I have three possible solutions, all of
> which feel like they're in poor networking "taste" to me.
> 
> 1) I can add a second loopback interface and ifconfig lo1 inet
> 192.168.1.1
> 2) I can specify the system's IP address as an alias on the loopback
> interface.
> 3) I can put the system's hostname on the same line as localhost in
> /etc/hosts.
> 
> I am fairly comfortable with UNIX networking, but I have never before
> needed to network a system to itself without having at least one
> hardware inteface to hang an IP address from.  Some kind soul please
> save me from putting a NIC in this machine and tell me what is the right
> way to do this?

All three should work.  Personally, I'd go for 3) in your case, and
2) if you had a network (inc. ppp/slip/plip).  1) is just a more
long-winded version of 2) :)

> Thanks,
> -Shawn Carey

-- 
Brian <brian@awfulhak.org> <brian@freebsd.org>
      <http://www.awfulhak.org>
Don't _EVER_ lose your sense of humour !