Some time ago I "discovered" that Redhat-packaged configuration scripts are little known, and you can configure a PPP dialup interface (or more than one if you have different ISP accounts) as easily as on Windoze.
The tool that allows to configure such PPP links is named netcfg, and you can run it directly or by means of Redhat control panel (panel-control). Unfortunately, this program runs only on X, and you have to get X up and running in order to reach it.
RPM dependency list is:
| Pack | Comment |
|---|---|
| python | Scripting language interpreter. |
| pythonlib | Python libs. |
| tkinter | Python graphic interface. |
Standard C library (g)Libc and XFree86 libs are required, but those should be
already installed if you have a) the Linux box, and b) a configured X system.
As you can see, those guys/gals at RedHat like Python a lot.
You must be root to run control panel and/or netcfg, because vital config files are to be edited.
To achieve this, open an xterm, and by means of su - we'll be root (after
entering password, of course).
Then, you enter:
export DISPLAY=:0
netcfg
and the network configuration window will appear. Press the "Interfaces" button and you'll get to a screen similar as the first image:
(You can see a larger version of the image clicking on it). There are two interfaces
configured: loopback one (used for the machine to communicate to itself, which is called
lo), and a private net (here named eth0).
If you dont have a network card installed and configured, there should be only the loopback interface, but this wont be a problem for PPP link. Just ignore anything I say about that network card if you dont have it.
Note: If you have any tun0 interface, or something like that, and you
dont want to activate tunneling, select them one by one and delete them. Sometimes,
after installing RedHat 4.2, an interface like that appeared in my system.
5.x version.
Well, now we're adding a new interface. Select "Add" and choose
PPP protocol. As a result, a window like this will appear:
Write your account_name@provider and your password on required fields, and press "Customize". We want to configure some more option before accomplising our task.
Note: The format account@provider is only used in Spain (AFAIK) in order to be authenticated through InfoVia+ or some Local Access Nodes to ISPs. Usually, you'll only need to write in the 'PPP login name' field your account name, or whichever your ISP instructed you to do.
/etc/sysconfig/network-scripts/chat-ppp0 that gets created after
we've finished.
16550AF and better?)
have, can be set up to 115200. If you're not sure about it or you notice that your modem loses
characters (on the other hand, something that you cant detect easily when talking about
PPP links), set this speed to 57600, 38400, 19200, or just get a better serial port/modem!
/dev/cuaX or
/dev/ttySX where your modem is attached to. As a default and when
you install RedHat (?), a symbolic link with the name /dev/modem, so you
dont have to change configuration if you change your serial port's modem. As an example,
if you have your modem attached to port COM2 (cua1), run as root:
ln -sf /dev/cua1 /dev/modem.
noipdefault, which will make
pppd not try to tell your Internet provider your IP. This is useful if you dont have
a static-IP, or if you've got it but you network card IP is not the same. A safe set
for this option is to write it.
Once completed this "Hardware" option, press "Communication"
(select this image if you want to see it larger):

This is the commands window, used to "talk" to the modem and tell pppd the
phone number that is to be dialed, if we have a touch-tone telephone line, the modem init
string, and the rest. Besides that, the "Debug connection" option will
help us to follow the connect progress by reading the system's logs (syslog).
InfoVia doenst ask for login/password pair as soon as we connect, but a PPP link is established (whose caracteristics are negotiated) first. If you need, instead, go through a login/password scheme or menu options before an actual PPP negotiation is done, this is the correct window. You can add and edit the "expect"/"send" pairs that will be used a-la chat.
Press the "Networking" button:
Some time ago, a Windows "patch" was released to boost-up internet connections, and it wasnt nothing but a chance to modify these two values. These are the maximum packet size used when interchanging information. Big values will make more effective large data transmissions (as FTPs), and little ones will make telnets and character-based protocols more responsive. I'm used to setting the minimum, but you can try other values and check if it gets better.
And now it's authentiation turn.
Press the "PAP" button. Come on, we're reaching the end.
This window shows what account we are to use (above), and the user/password pairs list
of available accounts that we have configured in our box. If we had to add another
entry, we'd select "Append" button.
A window named "CHAT Entry" appears, and input fields are named "Expect" and "Send", but this is just because it seems they have re-used the input window of other section :-). You must write your account name in the first field, and the password in the second one.
Well, that's all. You can move through the windows to check everything is OK, and you can press "Done" when you're happy. You will return to the first window.
.. which will look like this (more or less). The ppp0 interface has no IP if you have a dynamic one from your provider, and the link, as you can see, is inactive. If you want to check if it works, select the interface (just as it is dark-grayed in the image) and press the "Activate" button. If all goes well, and you havent mistaken the password (!), you should connect with no problems.
One thing must be said about the "Deactivate" button for PPP interfaces and is that it doesnt function very well when the connection is in progress (for example if Infovia is busy or there is congestion and your modem doesnt know the toot-toot), so you would have to open an xterm and kill the pppd process.
And last, a mini-FAQ about this configuration operation:
| 4.2 | 4.9.x/5.x/6.0 | |
|---|---|---|
| Connecting | ifup-ppp ifcfg-ppp0 | ifup ppp0 |
| Disconnecting | ifdown-ppp ifcfg-ppp0 | ifdown ppp0 |
| Script location: | /etc/sysconfig/network-scripts |
/usr/sbin |
/etc/ppp/pap-secrets./etc/sysconfig/network-scripts/ is located information
about different interfaces (loopback, ether, etc...). The file ifcfg-ppp0
is the one which has the configuration options. and chat-ppp0 contains
dialing commands and answers that your modem may/should send when appropiate.