[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PPP connection?



Dale Scheetz writes:

>I am using the options and ppp-connect scripts with minor
>modifications to the options script (I added -detach because it
>seemed appropriate but didn't get me any farther) and to the best I
>can tell, chat dials out and the modems negotiate for baud rate but
>nothing else happens. Eventually the modem disconnects, but during
>the whole process I get no messages or indications that things are
>going either well or badly. I know if I wait till monday I can get
>help from my internet provider, but that's three days away, so here
>are my questions.

The remarks that follow are based on my experience setting up PPP at
home, networking and modems are not my hottest topics.

>a: Is there any way to get pppd to talk to me while it works?

IIRC there were some hints about this in /usr/doc/pppd/README.  In
particular: I have a line


        local2.*                        /var/log/net.log


in /etc/syslog.conf which logs pppd messages to a file, and also I
have the line


        local2.*;auth.*;daemon.*;mail.*;news.crit;news.err;news.notice;*.=debug;*.=info;*.=notice;*.=warn;cron.none     /dev/tty8


...which sends a lot of messages to one of my VCs.  (I find this
useful in general, not just for PPP.)  To make this work for the X
console as well,


        local2.*;auth.*;daemon.*;mail.*;news.crit;news.err;news.notice;*.=debug;*.=info;*.=notice;*.=warn;cron.none     |/dev/xconsole


You'll find that there are already lines in /etc/syslog.conf you can
edit or uncomment to get most of these effects.

IIRC there are various options you can pass the pppd (see
/usr/doc/pppd/README for details) which will make it much more
verbose, up to the point of giving hex dumps of large portions of the
traffic over the link.  I found this to be far too much information
but it may be worth a try.

Getting chat to be more verbose is also worthwhile, I think someone
has mentioned this before on debian-user but see also below.

!NOTE! Take care with the /var/log/net.log one; if you decide to use
it, make sure it gets rotated regularly, otherwise the log file will
just grow until it fills your disc!  I do this by putting the
following in /etc/cron.daily/local, which should be executable:

        #!/bin/sh
        #
        # Locally defined daily cron stuff
        #
        
        # rotate networking logs
        
        cd /var/log
        if [ -f net.log ]
        then
          savelog -g adm -m 640 -u root -c 7 net.log >/dev/null
        fi

(Of course if your machine is turned off when the cron scripts run
(about 6am by default, though I've altered mine to be nearer 1am when
the machine is more likely to be on) then you won't get the advantage
of the log rotation scripts.)

>b: Why is 255.255.255.255 not a valid net mask but 255.255.255.0 is?

When I initially set up my system I just told it 255.255.255.0 for the
netmask, and didn't change anything when I added PPP.  This may or may
not be right for you. ;-)

For reference, here is my /etc/ppp/options file:

	connect /etc/ppp/ppp-connect
	/dev/cua2
	38400
	crtscts
	modem
	defaultroute

...and here is my /etc/ppp/ppp-connect:

	#! /bin/sh
	#
	# WARNING!  Make sure this file is not world-readable!!!

	# The number of your PPP server.
	phone=[telephone number]

	# The login of your PPP account.
	login=sfere

	# The password of your PPP account.
	password=[password]

	# verbose mode
	if test -f /etc/ppp/ppp-verbose
	then 
	  /usr/sbin/chat -v "" ATM0DT$phone CONNECT "" ogin: $login word: $password
	else
	  /usr/sbin/chat "" ATM0DT$phone CONNECT "" ogin: $login word: $password
	fi

Creating /etc/ppp/ppp-verbose (assuming you use the scheme above)
gives a whole lot of useful information in the logs, but it also
echoes your PPP password there, which you don't want once you've got
things working.  (In fact PPP configured like this gives out your
password anyway through ps, see the bug report on this subject I made
some time ago.)

>c: What do I have to do to give a user on my system access to the PPP
>connection once I make it?

Once there is PPP running you just get ordinary IP connections; any
user should be able to use telnet, ftp, etc.

I hope some of this helps.

-- 
Richard Kettlewell                 <URL:http://www.elmail.co.uk/staff/richard/>
Work+home: <richard@elmail.co.uk>
Home only: <richard@sfere.elmail.co.uk>


Reply to: