How to configure Point to Point Protocol (PPP)

Point to Point Protocol (PPP) is a protocol for establishing connections across serial links, which are usually serial ports or connections using phone lines and modems. More information about PPP on Linux can be found in the PPP HOWTO.

To use PPP with ST Linux, the kernel must be compiled with additional options. First, PPP itself must be enabled (CONFIG_PPP), and then PPP for serial ports (CONFIG_PPP_ASYNC). These options are in the configuration menu, as follows:

Device Drivers ---> Networking support ---> PPP (point-to-point protocol) support

Device Drivers ---> Networking support ---> PPP support for async serial ports

These can either be built into the kernel or set up as loadable kernel modules. Then rebuild the kernel or modules in the normal way.

To set up the PPP connection, use the program pppd. As PPP is a symmetrical protocol, use the same program for both the client end and the server end.

To test a configuration, enter (on the host):

host# pppd passive /dev/<port> local 115200 proxyarp <local_IP>:<remote_IP> 

where:

  • is the serial port on the host (for example cua0)
  • 115200 is the baud rate of the connection
  • <local_IP> and <remote_IP> are the IP addresses assigned to the PPP device on the host and the target respectively

Then on the target simply enter:

target# pppd /dev/<tty> 115200 noipdefault

where is the serial port on the target, for example ttySC1.

There are numerous options which can be passed to pppd. These can be stored in a configuration file to save typing them on the command line. If you want to use PPP with a modem then it is also necessary to set up chat to initialize the modem and dial out. For more information see the relevant pppd man page, or the PPP HOWTO.