*BSD News Article 58194


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!zombie.ncsc.mil!news.mathworks.com!news.kei.com!nntp.coast.net!lll-winken.llnl.gov!enews.sgi.com!sgigate.sgi.com!wetware!nntp-hub.barrnet.net!informix.com!informix.com!ahogben
From: ahogben@informix.com (Andy Hogben)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Making a ppp connection with slirp
Date: 27 Dec 1995 04:50:05 GMT
Organization: Informix Software, Inc. Menlo Park, CA 94025
Lines: 112
Message-ID: <4bqj9t$13s@news.informix.com>
NNTP-Posting-Host: mirage.informix.com
X-Newsreader: TIN [version 1.2 PL2]

Ok, so I'm completely confused.  I'm trying to set up (iij)ppp from home
(running 2.0.5) to my machine at work using slirp, and I'm not having much
success.  I've obviously got something configured incorrectly, but what?!
I've gone through the FAQ and everything else I could find to no avail.

If anyone could shed any light on what I'm doing wrong, I'd _really_
appreciate it.

What I want is...
   Home (mini 10.0.2.15) -> ppp -> Work (mirage 158.58.29.28) -> internet

Here's what I have currently for the config files on my machine at home (the
slirp end is pretty simple with mtu, mru, baud rate and accmap - of all 'f'
just to make sure) -

(sysconfig)
hostname=mini.chicago.com
defaultdomainname=NO
network_interfaces="lo0 tun0"
ifconfig_lo0="inet localhost"
ifconfig_tun0="inet mini.chicago.com 158.58.29.28 netmask 0xfffffc00"
                      This is the netmask uses at work,   ^^^^^^^^^^
                      is it what I should be using?
                      Also, it changes once ppp has connected - see below
route_multicast="224.0.0.0 -netmask 0xf0000000 -interface ${hostname}"
route_loopback="${hostname} localhost"
defaultrouter=NO
routedflags=-s

(hosts)
127.0.0.1       localhost               loghost
10.0.2.15       mini.chicago.com        mini
158.58.29.28    mirage

(resolv.conf)
nameserver      158.58.8.57
nameserver      158.58.8.17

(host.conf)
hosts
bind

After rebooting the machine, checking with 'ifconfig -a' and 'netstat -r'
shows the following:

$ ifconfig -a
lp0: flags=810<POINTOPOINT,SIMPLEX> mtu 1500
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
tun0: flags=51<UP,POINTOPOINT,RUNNING> mtu 1500
        inet 10.0.2.15 --> 158.58.29.28 netmask 0xfffffc00

$ netstat -r
Routing tables

Internet:
Destination      Gateway            Flags     Refs     Use     Netif Expire
mini.chicago.com localhost          UH          0        0       lo0
localhost        localhost          UH          0        0       lo0

My ppp.conf and ppp.linkup look like this:

default:
  set device /dev/cuaa0
  set speed 38400
  disable lqr
  deny lqr
  set dial "xxxxxxxxx"

work:
  set phone 15551111
  set login "xxxxxxxxxx"
  set ifaddr 10.0.2.15 158.58.29.28
  add 0 255.255.252.0 158.58.29.28
  set accmap ffffffff

After manually logging in using 'term'inal mode in ppp I run slirp on my
machine at work and then when it says 'ready' ppp takes over and starts the
connection process.  Checking things at this point shows the following (the
'ifconfig -a' is wierd, what happened to my netmask?):

$ ifconfig -a
lp0: flags=810<POINTOPOINT,SIMPLEX> mtu 1500
lo0: flags=8009<UP,LOOPBACK,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000
ppp0: flags=8010<POINTOPOINT,MULTICAST> mtu 1500
tun0: flags=51<UP,POINTOPOINT,RUNNING> mtu 1500
        inet 10.0.2.15 --> 158.58.29.28 netmask 0xff000000

PPP ON mini> show route
default          158.58.29.28       ffffffff  UG     (4)
10.0.2.15        127.0.0.1          ffffffff  UH     (2)
127.0.0.1        127.0.0.1          ffffffff  UH     (2)
158.58.29.28     10.0.2.15          ffffffff  UH     (4)
PPP ON mini> show lcp
LCP [Opend]
 his side: MRU 1500, ACCMAP ffffffff, PROTOCOMP 1, ACFCOMP 1 MAGIC d1f5bdfb
 my  side: MRU 1500, ACCMAP ffffffff, PROTOCOMP 1, ACFCOMP 1 MAGIC f932f8a0

Defaults:   MRU = 1500, ACCMAP = ffffffff       Open Mode: passive
PPP ON mini> show ipcp
IPCP [Opend]
 his side: 158.58.29.28, 2d0f01
 my  side: 10.0.2.15, 2d0f00
connected: 144 secs, idle: 11 secs

Defaults:  My Address: 10.0.2.15/32  His Address: 158.58.29.28/32

I think that's it.  As I said, any information would be appreciated.

Andy