PPP/Linux (RedHat)

by Jonathan Ruano <jonah@encomix.es>
Last modified on Jul 17 10:26:18 CEST 1999
This HOW-TO has been sent over the net a lot of times.
Spanish version

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:

PackComment
pythonScripting language interpreter.
pythonlibPython libs.
tkinterPython 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.

Netcfg Interfaces window

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:

Create PPP interface window

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.

Edit PPP interface

Once completed this "Hardware" option, press "Communication"
(select this image if you want to see it larger):

Dialing and connection
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:

Opciones TCP/IP

And now it's authentiation turn.
Press the "PAP" button. Come on, we're reaching the end.

PAP Authentication 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.

Final view

.. 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:

  1. Is there any way of running connection/hang-up script without entering X?
    Yes, check out the table below to find the right way.
    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

  2. Where is stored all these things we have configured?
    All the password-stuff is stored in /etc/ppp/pap-secrets.
    In directory /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.

Comments/complaints to Jonathan Ruano <jonah@encomix.es>