Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > de96f693fc41a166d9a22b72d373055c > files > 63

mserver-0.5.5-8mdv2010.0.i586.rpm

==============================================================================
PPPsetup.v.2.16 by Kent Robotti <krobot@erols.com> (5/2/99)
==============================================================================

PPPsetup is a bash shell script to help you in creating a chat script, for
establising a PPP connection to a internet service provider.

There's support in pppsetup for creating pap, chap, ms-chap, scripts, as 
well as the standard chat scripts, you should get a recent version off chat 
and pppd for ms-chap support, ppp-2.3.7 or later.

Most if not all versions of 'pppd' that come with linux distributions
will not have 'ms-chap' support, if you require 'ms-chap' or 'callback' 
support you usally have to compile the ppp-2.?.? package yourself. 

MS-CHAP is commonly used by windows NT RAS servers.

To establish a PPP connection, you need to have networking and
ppp support compiled in your kernel or as a module.

Most if not all linux distributions will have ppp in the kernel 
or as a module, usally as a module.

~# dmesg | grep -i ppp    <To see if you have ppp compiled in the kernel>
PPP: version 2.?.?        <You should see this>

Or if you have ppp compiled as a module you should have this.

/lib/modules/kernel-version/net/ppp.o
/lib/modules/kernel-version/net/slhc.o

Before you make the ppp connection you have to have ppp running, if
you have ppp in the kernel it's always running, but if you have ppp
as a module you have to load it first, if you have 'kerneld' running
or 'kmod' support in the kernel the ppp module should be loaded when 
ppp is required.

~# depmod -a `uname -r`   <You only need to do this once>

~# modprobe ppp           <Load the ppp module>

You should put this below in the /etc/modules.conf or conf.modules file, 
create the file if it doesn't exist.

alias ppp-compress-1 off        
alias ppp-compress-21 bsd_comp
alias ppp-compress-24 ppp_deflate
alias ppp-compress-26 ppp_deflate

You also need the programs 'pppd' & 'chat' on your system.
These will be part of any linux distribution in the ppp-2.?.? package.

~# man pppd
 # man chat

You need the 'dialog' program on your system to run pppsetup.

~# dialog           <To see if you have 'dialog' on your system>
command not found   <You don't have it>

You can get a compiled static elf version of 'dialog' from:

ftp://ftp.tux.org/pub/people/kent-robotti "dialog-0.9a-15.elf.tar.gz"

You can put pppsetup in /usr/sbin usr/bin etc.

There's a script called 'ppp-off' included with pppsetup, you should
put it in the /usr/sbin directory. 

~# pppsetup       <Create chat script to make the PPP connection>

Just answer the questions and take a look at /etc/ppp/pppsetup.txt when 
you're done.

~# ppp-go         <Make PPP connection>
 # ppp-off        <To end the ppp0 connection>
 
Now see if you're connected.

~# ftp lynx etc.
 # ping foo.boo.com   <Ping your internet service provider>
 # whois or fwhois foo.boo.com
 
Or from X windows in a xterm...

~# startx
 # ppp-go 
 # netscape etc.

You can run 'ifconfig' anytime to see if you're PPP connected.

~# ifconfig

You should see something like this if you're PPP connected.

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:105.207.127.86  P-t-P:205.252.116.61  Mask:255.0.0.0

Usally if you add 'W2' to the modem init string the modem will give the 
DCE = CARRIER speed when you connect, look at your modem manual to see 
what command will make your modem report the DCE = CARRIER speed.

Example: AT&FW2
  
If you're having a problem making the ppp connection, look at the
/var/log/messages and or debug file for the output from pppd and
chat.

When 'chat' sends the modem init string that's in /etc/ppp/ppp.chatscript 
to your modem you should get OK from the modem, if you don't get OK
then maybe you need to change the init string.

AT&FW2H0   <Modem init string>
OK

Linux has no support for Winmodems, if you have one of these you
won't be able to use it on linux.

Linux does support (p)lug (n) (p)lay modems, but you may need help 
from 'isapnptools' to get your pnp modem working properly on linux.

You can get a compiled elf version of isapnptools from here, 
it will work with a libc5 or libc6 system.

ftp://sunsite.unc.edu/pub/Linux/system/hardware
isapnptools-1.15.bin.tgz

http://www.roestock.demon.co.uk/isapnptools   <Home page>

You can put isapnp and pnpdump in /sbin and the man pages in
/usr/man.

This is the first thing you have to do.

~# pnpdump > /etc/isapnp.conf

Take a look at /etc/isapnp.conf to see if your pnp modem was found, and
what IRQ etc. it was found on.

~# man isapnp        <Man pages for the isapnptools package>
 # man isapnp.conf   <You have to read this to know how to configure
 # man pnpdump        the /etc/isapnp.conf file>
 
~# isapnp /etc/isapnp.conf   <After you configuresd the /etc/isapnp.conf 
                              file>

Usally when you boot your system the setserial script 
/etc/rc.d/rc.serial is run and your modem is recognized 
by setserial.

The script "rc.serial" may be called something else and or be in
another directory, it depends on what linux system you have i.e. 
slackware redhat debian etc.

Run setserial for your modem to see if it's detected correctly, because
if setserial can't detect your modem correctly then nothing will.

I don't have a pnp modem so there was no problem getting it detected 
correctly by setserial, i have a 28.8 modem on /dev/ttyS1 which 
/dev/modem is a symbolic link to.
 
~# setserial -v /dev/modem auto_irq skip_test autoconfig
  
/dev/modem, UART: 16550A, Port: 0x02f8, IRQ: 3
 
There's a option in the pppsetup script for speeds higher than
115200 for the modem, but usually pppd only supports speeds as 
high as 115200. 

If you get this message when you start pppd "speed ? not supported",
your version of pppd only supports modem speeds as high as 115200, 
put 115200 or less in the /etc/ppp/options file.

ppp-2.3.3 or later supports higher speeds i.e. 230400 and 460800.

=============================================================================
You can get the latest version of ppp from the home site of ppp.

ftp://cs.anu.edu.au/pub/software/ppp   <Home site>

ppp-2.3.7.tar.gz etc.         
=============================================================================

You don't really need the latest version of ppp, the one you have on your
system should be fine, but if you do get and compile the latest version 
of ppp, you'll have to compile your kernel source in /usr/src/linux also, 
or at least the ppp module part.

You may also want to get and read these docs.

ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO "PPP-HOWTO"
ftp://sunsite.unc.edu/pub/Linux/docs/faqs/PPP-FAQ "PPP-FAQ"

==============================================================================

These are some other ways to make a PPP connection.

The best way to make a PPP connection is to create a chat script, if
you're having trouble with the chat script you can use these methods
below to make the PPP connection.

You can also use these methods below to see what's going on when you
connect to your service provider, i.e. what do they require, do they
present you with a Login: or Username: and Password: prompt etc.

What steps do you have to go through before they start PPP at there
end?

First make sure the IP address of your service providers nameserver  
is in the /etc/resolv.conf file.

nameserver 205.117.312.56   <For example>
 
=========================================================================
Using 'dip' to make the PPP connection.
=========================================================================

~# dip -tv
Host name lookup failure

If you get the above messgae when you start 'dip', it's because you
don't have your hostname in the /etc/hosts file.

~# hostname
foobar

If your hostname were 'foobar' you should put it in the /etc/hosts file.

127.0.0.1   localhost
0.0.0.0     foobar.localnet foobar

~# dip -tv
dip> port /dev/ttyS1
can't open - problems with locking ttyS1

If you get the above message after "port /dev/modem", it means you have a
lock file in /var/lock/LCK..ttyS1, remove the lock file and kill dip.

~# rm /var/lock/LCK*
 # killall -9 dip

~# dip -tv

dip> port /dev/ttyS1   <Where's the modem? ttyS0 = com1 ttyS1 = com2 etc>
dip> speed 115200      <Modem speed: 19200 38400 57600>
dip> term

at&fw2                 <Modem init string>
atdt1234567            <Replace 1234567 with the phone number>

Usally you give your username and password then ppp is started, if
they use PAP or CHAP you probably won't be asked for a username and
password, they will just say that PPP has been started or nothing.

Press Ctrl ] to exit dip term mode when PPP is started at their end.

dip> default              <Use default route>
dip> mode ppp             <Start PPP at your end>

~# ping sunsite.unc.edu   <To see if you're connected>

~# dip -k                 <To kill dip and the PPP connection>

=========================================================================
Using 'minicom' to make the PPP connection.
=========================================================================

Keep the /etc/ppp/options file that was created by pppsetup, it should 
have at least these options in it.

lock
defaultroute
noipdefault
/dev/ttyS1         <ttyS0 = com1 ttyS1 = com2 ttyS2 = com3 ttyS3 = com4>           
115200
modem
crtscts
debug
asyncmap 0

~# minicom -m -s

at&fw2
atdt1234567

Press Alt Q to exit minicom without reset after PPP is started at 
the other end.

~# pppd                <Start PPP at your end>

~# ppp-off             <To end the PPP connection>
 # killall -INT pppd   <If you don't have 'ppp-off' end it this way>

End ... 5/2/99
=========================================================================