18.1. Introduction to PPP on Linux

Any Linux system with a modem attached can be configured so that other computers can dial up to it and start a PPP session, giving them TCP/IP access to the system and any networks that it is connected to. This allows it to act like a miniature ISP, and in fact some small ISPs have been run using Linux systems with multiple serial port cards as access servers.

Two separate programs are responsible for different parts of the dial-in service. The first is mgetty, which communicates on a serial port with an attached modem and instructs it to answer the phone. Once the server and client modems are connected, mgetty displays a text login prompt and waits for either a username or the start of a PPP session. A client can log in using text mode and get a UNIX shell prompt without needing to start a PPP session at all, but this is rarely done these days. Once the client disconnects or logs out, mgetty hangs up the modem and waits for a new connection.

Because most clients start a PPP session as soon as they connect, mgetty is usually configured to run the separate pppd program if it detects a PPP connection. This creates a ppp network interface on the server, authenticates the client, assigns an IP address, and starts sending and receiving data using the PPP protocol. The assigned IP address and other configuration options are usually set on a per-serial port basis, so that you can have multiple modems and support several simultaneous clients with different addresses.

The PPP Dialin Server module allows you to setup both mgetty and pppd so that clients can dial in and start PPP sessions. When you enter it from the Networking category, the main page simply shows four icons, under which are the actual configurable options.

Currently, the PPP Dialin Server module can be used only on Linux and Solaris systems, even though mgetty is available on some other versions of UNIX. If neither of the programs that it configures are installed, the main page will display an error message—however, all Linux distributions include packages for pppd and mgetty on their CDs or websites. If only mgetty is installed, you can use the Serial Port Configuration and Caller ID Access features. Conversely, if only pppd is installed, you can access only the PPP Options and PPP Accounts pages.

When you use the module to set up mgetty to answer calls on a serial port, an entry is added to the /etc/inittab file so that init will run the mgetty process at boot time, and re-run it as necessary. You will be able to see this entry in the SysV Init Configuration module (covered in Chapter 9), but you should not edit it there unless you know what you are doing.

Even though this chapter was written with Linux in mind, the module behaves almost identically on Solaris. The only difference is the names of the serial port device files—whereas /dev/ttyS0 is the first serial port on Linux, Solaris would use /dev/term/a instead.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.35.122