*BSD News Article 88992


Return to BSD News archive

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!howland.erols.net!newsxfer3.itd.umich.edu!rill.news.pipex.net!pipex!tank.news.pipex.net!pipex!news.utell.co.uk!ui-gate.utell.co.uk!brian
From: brian@ui-gate.utell.co.uk (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Some PPP and Routing Problems
Date: 14 Feb 1997 11:31:49 GMT
Organization: Utell International
Lines: 52
Message-ID: <5e1if5$djj@ui-gate.utell.co.uk>
References: <seth.leigh-1002971332000001@s_leigh.dtint.com> <5dtupg$e3q@uuneo.neosoft.com>
NNTP-Posting-Host: ui-gate.utell.net
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:35380

Conrad Sabatier (conrads@neosoft.com) wrote:
: In article <seth.leigh-1002971332000001@s_leigh.dtint.com>,
: 	seth.leigh@dtint.com (Seth Leigh) writes:
[.....]
: > Anyways, if anybody can be so kind as to give me a good idea on how to
: > understand the exact relationship between the /etc/sysconfig file, the
: > /etc/hosts file, the hostname of the FreeBSD machine, the ppp.conf file,
: > etc., I would be much obliged.

: As would I also.  :-)

They're fairly un-related.  If you have a machine called my.machine with
an IP of 127.0.1.1, /etc/hosts should contain

127.0.0.1 localhost
127.0.1.1 my.machine

/etc/sysconfig will have a line saying

hostname=my.machine

If you want to connect this machine to the net, but don't know what
IP you're going to get, the following lines should appear in
/etc/ppp/ppp.conf (*NOTHING* should be added in /etc/sysconfig):

ifaddr 127.0.2.1/0 127.0.3.1/0
delete ALL
add 0 0 HISADDR

(the /0 bit is important, it means that 0 bits are relevant) and
in /etc/ppp/ppp.linkup

delete ALL
add 0 0 HISADDR

When your machine starts up, it will only know about my.machine, and
won't be able to do much networking-wise.  When you run ppp -auto ...,
you'll get two entries in your routing table (netstat -rn):

Destination        Gateway            Flags     Refs     Use     Netif Expire
default            127.0.3.1          UGSc        0        0       tun0
127.0.3.1          127.0.2.1          US          0        0       tun0

(this is from memory).

When you then try to send something to the outside world, it'll be sent
down tun0 to ppp, and ppp will do the dialing bit.

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