Web linux-server.50webs.com

Linux Server Basics

Configuring a PPP Server:

A Linux system can be used as a PPP server for both dedicated connections and dial-up connections. Configuring pppd for a dedicated line is the simplest configuration, and it provides a good example of the structure of the pppd command. A single line inserted in the rc.local startup file is all that is necessary to configure a PPP server for a dedicated line:

pppd /dev/ttyS1 115700 crtscts

This command starts the PPP daemon, and attaches it to the serial device ttyS1. It sets the line speed for this dedicated line to 115700bps.

One option, crtscts, is also selected in this command. crtscts turns on Request To Send (RTS) and Clear To Send (CTS) hardware flow control. Hardware flow control uses the RTS and CTS pins in the serial interface to control the flow of data.

Always use hardware flow control with PPP. The alternative, software flow control, sends special characters in the data stream to control the flow of data. Software flow control, which is also called in-band flow control, at best wastes bandwidth doing something that could be done with hardware, and at worst sends control characters that can become confused with the actual data.

The pppd command for a client connected to a dedicated link would look the same as the preceding one, except that it would also have the defaultroute option:

pppd /dev/ttyS1 115700 crtscts defaultroute

defaultroute creates a default route that uses the remote PPP server as the default router. If a default route is already defined, this option is ignored. The defaultroute option is not used on the server end of the dedicated link because the server is the client's router, and therefore must already have another route to the outside world. defaultroute is used when the PPP link is the only link to the outside world, which is sometimes the case. This sample pppd command could be used to connect a small branch office into the enterprise network.

PPP configuration for a dedicated line is simple because there are always the same two systems connected to the line—one at each end, a single server and a single client. The line is dedicated to this single purpose and therefore can be configured at startup and left unchanged for as long as the system is running. There is no need to configure the server to handle multiple clients.

However, PPP clients and server are not always connected to dedicated serial lines. It is more common for them to be connected via dial-up serial lines, and configuring a server for dial-up lines is more complex than configuring it for dedicated lines.

.