discuss: Red Hat Linux + ISP Dial-up + ISDN External Modem HOWTO


Previous by date: 21 Jul 2004 17:30:32 -0000 Re: rating system, Christopher Priest
Next by date: 21 Jul 2004 17:30:32 -0000 Re: Red Hat Linux + ISP Dial-up + ISDN External Modem HOWTO, Machtelt Garrels
Previous in thread:
Next in thread: 21 Jul 2004 17:30:32 -0000 Re: Red Hat Linux + ISP Dial-up + ISDN External Modem HOWTO, Machtelt Garrels

Subject: Red Hat Linux + ISP Dial-up + ISDN External Modem HOWTO
From: Bruno ####@####.####
Date: 21 Jul 2004 17:30:32 -0000
Message-Id: <009f01c46f48$6a652b00$5100a8c0@egp>

Hi all,

I've written a howto about how to configure the proper system files to make
an dial-up connection with an external ISDN modem. The resulting
configuration is the same as if you had used the "Red Hat Internet
Connection Wizard". I'll follow the redhat's way of doing this.

This howto is useful because:

- it shows the system files and utilities needed to make this configuration
work. This is handy when you donĀ“t have a graphical environment installed
on the machine. The present documentation is focused on the graphical
utilities that set up an internet connection, but what if you don't have
graphics at all? (this was my problem)

- it shows how simple is to set an external ISDN modem to work in Redhat
linux. I didn't see such an information in TLDP's site. The MODEM-HOWTO
forwards the ISDN interested users to the www.isdn4linux.de website, but
this site is about only the internal isdn cards, they don't mention about
external modems.

- it is small and easy to follow.

Well, i think its strenghs are these above.

Bellow is the howto's draft.


--------------------------------------------------------------------------
Red Hat Linux + ISP Dial-up + ISDN External Modem HOWTO

1) Introduction

This document explains how to manually configure the required system files
to make a ppp dial-up connection to an ISP (Internet Service Provider)
using an external ISDN modem.

Although we won't use any graphical user interface in this howto, the
configuration we're going to do is the same that Red Hat's "Internet
Connection Wizard" would create for you. This howto is especially useful
when your system does not have the graphical environment installed.

2) Installation environment

This installation was tested with the following system/hardware:

OS:   Red Hat Linux 9.0
Kernel:  version 2.4.20-31.9
ISDN Modem:  Leon Unik-22 UTA, external, connected via serial cable to the
  COM1 (/dev/ttyS0) PC's serial port.
PPPD:   version 2.4.1

3) Modem setup

With an ISDN external modem no special setup is needed. The OS will treat
your ISDN modem as if it was an ordinary external modem, no additional
driver will be required. Just connect the modem to an available serial port
in your machine and everything shall be all right.

To verify the communication between your machine and your modem, use
wvdialconf utility. It scans your serial ports searching for a modem and
then it creates a small wvdial configuration file with the settings it has
found.

So, to make wvdialconf create a config file called /tmp/wvdial.conf.test,
run the following:

 wvdialconf  /tmp/wvdial.conf.test

Its output is something like this:

Scanning your serial ports for a modem.

ttyS0<*1>: ATQ0 V1 E1 -- ATQ0 V1 E1
ttyS0<*1>: failed with 2400 baud, next try: 4800 baud
ttyS0<*1>: ATQ0 V1 E1 -- ATQ0 V1 E1
ttyS0<*1>: failed with 4800 baud, next try: 9600 baud
ttyS0<*1>: ATQ0 V1 E1 -- OK
ttyS0<*1>: ATQ0 V1 E1 Z -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- ERROR
ttyS0<*1>: Modem Identifier: ATI -- IsdnTAplus
ttyS0<*1>: Speed 19200: AT -- OK
ttyS0<*1>: Speed 38400: AT -- OK
ttyS0<*1>: Speed 57600: AT -- OK
ttyS0<*1>: Speed 115200: AT -- OK
ttyS0<*1>: Max speed is 115200; that should be safe.
ttyS0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK

Found a modem on /dev/ttyS0.  <= Here: he found the modem in /dev/ttyS0
/tmp/wvdial.conf.test<Warn>: Can't read config file /tmp/wvdial.conf.test:
No such file or directory
Modem configuration written to /tmp/wvdial.conf.test.

We will discard the configuration file created by wvdialconf and create a
new one for us ahead in this document. But before you remove this file,
read its contents and try to figure out what they mean. A 'man wvdial.conf'
can help you in this task.

4) Information provided by your ISP

Your ISP must provide you the following information: A user and password to
authenticate your connection and the telephone number your modem will dial
to connect with them.

In this document, we'll assume our ISP is called MYISP, the user is
"myuser", its password is "mypasswd" and the ISP telephone number is
"32254039".

DNS servers and the default route

When the ppp connection is established, the ISP will dynamically assign
your ppp interface with an IP address and a DNS number. The ppp interface
will be set as the default route.

When the ppp connection is finished, your previous DNS configuration and
default route are set up again automatically.

5) Files to be edited

We'll edit/create the following system files:

/etc/sysconfig/network-scripts/ifcfg-ppp0
ppp0 interface configuration file. Will be used by /sbin/ifup to activate
the ppp0 interface and start the connection process.

/etc/wvdial.conf
Configuration options to wvdial (the program which dials to the ISP and
calls pppd)

/etc/ppp/pap-secrets
User/password file for the pppd PAP authentication method [1].

[1] A concise explanation about PAP and CHAP configuration files is
available in the PPP-HOWTO at:
http://www.tldp.org/HOWTO/PPP-HOWTO/x1005.html

5.1) Editing /etc/sysconfig/network-scripts/ifcfg-ppp0

The /etc/sysconfig/network-scripts/ifcfp-ppp0 file will contain the
following content:

# Please read /usr/share/doc/initscripts-*/sysconfig.txt
# for the documentation of these parameters.
USERCTL=yes
PEERDNS=yes
TYPE=Modem
DEVICE=ppp0
BOOTPROTO=dialup
ONBOOT=no
NAME=MYISP
CCP=off
PC=off
AC=off
BSDCOMP=off
VJ=off
VJCCOMP=off
LINESPEED=115200
MODEMPORT=/dev/ttyS0
IDLETIMEOUT=600
DEMAND=no
PROVIDER=MYISP
DEFROUTE=yes
PERSIST=no
PAPNAME=myuser
WVDIALSECT=MYISP
MODEMNAME=Modem0

5.2) Editing /etc/wvdial.conf

The /etc/wvdial.conf file will contain the following content:

[Modem0]
Modem = /dev/ttyS0
Baud = 115200
SetVolume = 0
Dial Command = ATDT
Init1 = ATZ
FlowControl = CRTSCTS
[Dialer MYISP]
Username = myuser
Password = mypasswd
Phone = 32254039
Stupid Mode = 1
Init3 = ATc0=8c1=0 <= Attention: a special initialization string
Inherits = Modem0


The only tricky part of this file is the variable 'Init3' which is set here
to 'Atc0=8c1=0'. This enables an ISDN connection using only one ISDN
channel, usually of 64K bandwidth. If you have 2 ISDN channels to use, you
can enable them both by setting the 'Init3' variable to 'Atc0=8c1=1'. This
will provide you with a total bandwidth of 128K (64K + 64K of each
channel).

5.3) Editing /etc/ppp/pap-secrets

The /etc/ppp/pap-secrets file will contain the following content:

# Secrets for authentication using PAP
# client        server   secret        IP addresses
"myuser"        *     mypasswd

Red Hat's "Internet Configuration Wizard" uses to create another file
called /etc/ppp/chap-secrets with the same content of the file above, this
is for the case when the ISP requires CHAP authentication. Since this is
not common, and is not the case of my own ISP, I won't create this file.

Now the entire configuration is done. Remember to substitute the strings
MYISP, myuser, mypasswd and 32254039 in these 3 files to the real settings
required by your ISP.

6) Establishing the ISDN connection

To establish the ISDN connection, just run the command bellow:

 /sbin/ifup ppp0

This single command will do all the stuff. To verify if your ppp0 interface
is really up, run the command 'ifconfig ppp0' and check it out.

Also, you can run 'netstat -rn' to check your new default route attached to
the ppp0 interface.

Test the name resolution pinging a well known website: 'ping
www.nytimes.com'.

7) Finishing the connection

To finish this connection, run the command bellow:

 /sbin/ifdown ppp0

Now, check with 'netstat -rn' if your previous default route (if there was
one) is correctly in place again.

Your file /etc/resolv.conf also should have configured the same DNS server
it had before the ppp connection.

8) If there was a problem

PPPD will log useful messages to /var/log/messages. Also, try running
wvdial by yourself and dig for some clues.

---------------------------------------------------------------------------
--

That's it. Do you think I can publish it on TLDP?

Thanks,
bruno negrao


Previous by date: 21 Jul 2004 17:30:32 -0000 Re: rating system, Christopher Priest
Next by date: 21 Jul 2004 17:30:32 -0000 Re: Red Hat Linux + ISP Dial-up + ISDN External Modem HOWTO, Machtelt Garrels
Previous in thread:
Next in thread: 21 Jul 2004 17:30:32 -0000 Re: Red Hat Linux + ISP Dial-up + ISDN External Modem HOWTO, Machtelt Garrels


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.