getting ppp up
> Does anyone have any experience getting ppp started from a base system
> that just has been installed in a computer?
I just went through this yesterday.... pain in the ass (figuring it all
out, that is).
> I don't have any experience
> with ppp because all my other debian systems have been connected to lans.
> I think I got my ppp.chatscript correct, but I can't get the modem to
Well, here's what worked for me:
You need to tell pppd to use an input file. I used /etc/ppp/options.
The problem with it is that... well, there are a few, actually:
- The biggest is that it has a line that says "disconnect" with the
appropriate chat directives to disconnect the modem. What you need to
do is comment out this line and put in a line that says something
to the effect of:
connect "chat -f /etc/ppp.chatscript"
which tells chat to use file /etc/ppp.chatscript. You might also want to
toss a -v in before the -f to tell chat to log the conversation to
/var/log/ppp.log so that you can make sure it logged you in ok.
- Next, to make sure that you connect at the fastest speed, put "38400"
somewhere in the beginning of the options file.
- Also, somewhere near the beginning of the file, you should see a line
that says "/dev/modem". You'll need to make a symbolic link from your
appropriate serial line to /dev/modem.
For COM1: use "ln -s /dev/ttyS0 /dev/modem",
for COM2: use "ln -s /dev/ttyS1 /dev/modem", etc.
The alternative is to change the /dev/modem in the options file so that
it points directly to the appropriate serial port.
At that point, you should be able to get it to dial by typing:
"pppd file /etc/ppp/options"
Go check your ppp.log file in /var/log. Just check the end of it by using
tail: "tail /var/log/ppp.log" and keep doing it for about a minute until
you either see something about a host IP and a peer IP address... either
that or something about "Failure". Once you see either of those, you're
not going to see anything else that matters until you run pppd again.
Anyway, assuming that you get a peer IP and a host IP, then you're all set
*EXCEPT* for one major part that nobody ever tells you and that I haven't
been able to find in any howto anywhere:
You need to tell linux to use the peer IP address for all of your net
To do this, first run "route". You should see two lines, one with the IP
"127.0.0.1" on the same line as "lo0" (or something like that) and one
with another IP address (which is the IP of the peer you're connected to)
on the same line as "ppp0". Write down that peer IP, because you're going
to use it.
"route add default gw <peer-ip> metric 1" (where <peer-ip> is the address
of the peer that you just wrote down.
Now, if you run "route" you should see 3 lines... the third one listing the
peer as the default gateway. You should be ready to rock-n-roll now.
Try pinging some site whose IP address you know to know for sure.
To get nameservice working you'll need to edit your /etc/resolv.conf to
point to the nameservers you want to use.
In the /etc/ppp directory, there are two scripts called ip-up and ip-down
that are executed when the connection goes up and comes down. You can
use this to automate that "route" command that I spoke of (why Debian
doesn't ship this way, I have no idea). Basically, the ip-up is called
with several parameters: the baudrate, the serial device, the host IP,
the peer IP, etc. They tell you what they are in the script file...
in the comments. I *think* the peer IP is $4, so you'd put in a line that
"route add default gw $4 metric 1" or whatever the right variable is.
I'm planning on putting together a set of chatscripts, options files, and
ip-up/ip-down's that will work pretty much right out of the box... to
put an end to this silly frustration once and for all.
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com