Web linux-server.50webs.com

Linux Server Basics

The PPP Daemon:

The PPP daemon is started by the pppd command. The command can be entered at the shell prompt, and it often is on client computers. On server systems, the command is usually stored in a shell script to run at boot time for dedicated PPP connections or on demand for dial-up connections. Red Hat systems provide the /etc/sysconfig/network-scripts/ifup-ppp script to start the PPP daemon. However, the script is not edited directly. The values that control the ifup-ppp script are found in the ifcfg-ppp0 file in the same directory. Values can be placed in the ifcfg-ppp0 file through the same Network Configuration tool used earlier in this chapter for the Ethernet configuration.

Some administrators find it more convenient to create a custom pppd configuration using the standard pppd commands and configuration files. Many administrators find it just as simple as using a graphical configuration tool, and they like the fact that the commands and files are the same on all Linux distributions. The syntax of the pppd command is:

pppd [tty-device] [speed] [options]

  • tty-device is the name of the serial device over which the PPP protocol will operate. If no device is specified, the controlling terminal is the device that is used. As you'll see later, the ability to use the controlling terminal is very useful when creating a dial-up PPP server.
  • speed is the transmission speed of the port, written in bits per second.
  • options are just that—command-line options.

There are an enormous number of pppd options. In addition to specifying options on the command line, there are three different files available to store these options:

  • /etc/ppp/options is used to store system-wide PPP options. This file is created and maintained by the system administrator.
  • .ppprc, which each user can create and store in their home directory, is used to set personal PPP options.
  • /etc/ppp/options.device sets PPP options for a specific serial device. For example, options.ttyS0 sets PPP options for /dev/ttyS0.
The files are read in the order listed previously, which means that options in the last file read can override options in the first file read. Thus, the order of precedence for options from all of these sources is as follows:
  1. Options defined on the command line have the highest priority.
  2. Options defined in the options.device file have the next priority.
  3. Options defined by the user in the .ppprc file have the next priority.
  4. Options from the /etc/ppp/options file have the lowest priority.
Looking at this list raises the concern that the system-wide options defined in the /etc/ppp/options file can be overridden by the user with the .ppprc file. Don't be overly concerned. Items that relate to system security cannot be overridden by the user. Additionally, you can always specify important options in the options .device file, which has a higher priority.

Note:
There are more than 70 options available for the pppd command. If you want to read about all of them, see Using and Managing PPP, by Andrew Sun (O'Reilly, 1999).

The following sections cover just those pppd options that you are most likely to use. By selecting the correct options, you can configure pppd for a dedicated line or for a dial-up line as either a PPP server or as a client.
.