The existing documentation is a bit confusing when one is trying to
connect a home Linux system with the ubiquitous PnP internal modem via
PPP
to an ISP using PAP. In particular, what i could find about using chat
was very confusing, as was its "user interface".
Four separate steps are required, not documented in any one place.
I needed:
1. the pppd program
2. the chat program
3. a utility program called isapnp which configures the pnp modem
4. a connect script (I call it /etc/ppp/pppon)
5. a scrip called isapnp.conf, read by isapnp
6. the file /etc/ppp/options, read by pppd
7. the file /etc/ppp/chat.sh, read by chat
8. the file /etc/ppp/pap-secrets, read by pppd
this is the connect script I use, which I call /etc/ppp/pppon
======================begin=pppon==============================
#first drop the ethernet route so ppp route can be made default
ifconfig eth0 down
#then configure the internal modem to base address 3E8 and irq 10
#so as not to conflict with COM1 and COM2 which use irq 3 qnd 4
#even if _nothing_ is connected to them
isapnp isapnp.conf
#then also set serial port cua2 to address 3E8 and irq 10
#so it will be a link to the internal modem
setserial /dev/cua2 uart 16450 port 0x3E8 irq 10
#then start pppd using the ppp config file "/etc/ppp/options"
# which tells it to use serial port /dev/cua2
/usr/sbin/pppd
#finally restore the ethernet interface to access the home lan
ifconfig eth0 up
======================end=========================
Also required is the file isapnp.conf :
in this file CTL3013 is the model number of the modem board and
38294 is the serial number. These only have to be detrmined once, a
companion program you get with isapnp does this.
========================begin=isapnp.conf======================
(ISOLATE)
(IDENTIFY *)
(CONFIGURE CTL3013/38294 (LD0 (IO 0 (BASE 0X3E8))
(INT 0 (IRQ 10)) (ACT Y)))
===========================end================================
The file /etc/ppp/options which is read by pppd:
=========================begin=options================================
/dev/cua2
-d
38400
debug
mru 296
lock
crtscts
defaultroute
#noipdefault
#in the following line the first IP is the home PC
#and the second is the ISP modem server
199.233.112.74:199.233.112.1
remotename router1.cafe.com user dwoodard
connect '/usr/sbin/chat -v -f /etc/ppp/chat.sh'
#the last line tells chat to use the config file chat.sh
===========================end===================================
and the file /etc/ppp/chat.sh which is read by chat. This just dials
the
modem. PAP is handled by pppd, so putting passwords in the chat file
as suggested in much documentation will cause the script to fail
totally.
The number 6353240 is just the ISP modem phone dialup number
=========================begin=chat.sh==================================
"" AT
OK ATDT6353240
CONNECT '\c'
38400 '\n'
========================end=============================
Finially, the file /etc/ppp/pap-secrets is read by pppd
dwoodard is my username on the modem server at my ISP
"mypassword" in my password on the modem server at my ISP
=====================begin=pap-secrets================================
dwoodard router1.cafe.com mypassword
=========================end===========================
A bear to figue out, but it works great. I'm running Netscape under
Xwindows. Amazing how much of Windows95 was stolen from Xwindows.
My home computer is now an Internet host (at least as long as I'm
connected), and I believe my whole home network (if I had one) would be
linked through the linux box.
This might make things a little easier. Ideally the chat and pnp setup
functions should be combined in pppd.
Dan Woodard