*BSD News Article 84659


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.lava.net!news-w.ans.net!newsfeeds.ans.net!lantana.singnet.com.sg!usenet
From: light@singnet.com.sg (Jason Tseng)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Tips : Dynamic PPP Setup
Date: Wed, 11 Dec 1996 04:04:42 GMT
Organization: Singapore Telecom Internet Service
Lines: 98
Message-ID: <58jjp3$s8s@lantana.singnet.com.sg>
NNTP-Posting-Host: ts900-3126.singnet.com.sg
X-Newsreader: Forte Free Agent 1.0.82


This is a short guide for setting ppp with dynamic addresses. Its done
in a real hurry because I'm still trying to get ppp on-demand to work
with dynamic addresses (somehow I don't think it ever will).

Firs,  I want to thank people like Jay Sachs (your Ctrl-Z & bg
suggestion was correct !), Charlie Sorsby and Brian Somers, who have
offered some very useful tips.

Here are the steps (roughly):

1) Follow the 'Final Setup' of sysconfig, found in the Handbook. Apart
from adding the tun0 device to the network interface, you do not need
to add the 'ifconfig' for tun0. The addresses will be alloted
dynamically with the ppp program.

2) Follow the Handbook guidelines on setting the
hosts,host.conf and resolv.conf files. 

3)  Set up these 2 files : ppp.conf and ppp.linkup

4) My ppp.conf 
(where xxxxx is where i have my ISP's number, yyyyy is the ISP a/c
login name and zzzzz is the ISP a/c password)

default:
	 set device /dev/cuaa1
	 set speed 115200
	 set redial 1 10
	 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0M0W2

		OK-AT-OK \\dATDTxxxxx\\T TIMEOUT 25 CONNECT"
	 set login "TIMEOUT 5 name-\\r-name yyyyy word zzzzz cal c\\sppp "
	 set timeout 1200
	 set ifaddr 192.168.0.0/0 165.21.1.10/0 netmask 0xffffff00
	 set openmode active

* The important thing is in the last 2 lines :
- You can also use "set ifaddr 0 0 ", I am just using some dummy
addresses here to test out ppp on-demand.
- You MUST "set openmode active" or there will be no ip address
negotiation after loggin in.

5) My ppp.linkup

MYADDR:
	 delete ALL
	 add 0 0 HISADDR

6) I haven't tried this yet but some users have suggested adding
"delete ALL" and "add 0 0 HISADDR" to ppp.conf as well. Currently, I
can get ppp to work without having these 2 lines in ppp.conf but
perhaps it may help with ppp on-demand...

7) From your ppp program, use command "dial" to
log on. The screen output is something like this:

ppp ON mymachine > dial
Dial attempt #1
dial ok
login ok

8) After a successful login, the program returns:
"ppp ON mymachine >". Wait a few seconds
for ip address negotiation. That is the reason why I need to  "set
openmode active", earlier on. It WILL NOT WORK if you "set openmode
active" after logging in. Don't even ask me why.

9) After getting your ip address, the program returns automatically
with :"PPP ON mymachine >" ("PPP" is now in upper-case)


** IMPORTANT **
10) YOU MUST NOT USE THE "SHEL:L" MENU ITEM from ppp program.
Ctrl-Z to shell out instead. At your shell prompt, do a job list by
typing "jobs" (or "job"... I can't remember) and look for the ppp
program which has been "stopped" or "suspended". This job has an ID, 
type "bg xxx" (where xxx is the job ID) to get the ppp running in the
background eg. (roughly)

$ jobs

[1] 123 Stopped ppp

$ bg 123


11) At this point, you should have the ppp working. It is useless
"pinging" your own address, ping  your ISP instead.


Well, thats about it, as far as I know. Please tell me if you can get
ppp on-demand to work at all. 

Thanks and bye now.