SourceForge.net Logo

4.9. Point-to-Point Protocol (PPP)

PPP defines an encapsulation mechanism for transporting multiprotocol packets across Layer 2 point-to-point links. It is widely used to authenticate modem and ISDN connections; as PPPoE to authenticate cable modem connections; or by L2TP for Windows/XP VPN connections.

The Point-to-Point daemon decapsulates the PPP packets and places them in the kernels IP stack. It can also do authentication using CHAP.

Download and unpack the sources and patches.

wget -P $DL_DIR ftp://ftp.samba.org/pub/ppp/ppp-2.4.3.tar.gz # untested is 2.4.4b1
tar -C $PRJ_DIR/apps -xvzf $DL_DIR/ppp-2.4.3.tar.gz
cd $PRJ_DIR/apps/ppp-2.4.3

Configure

# if the compile host is running Linux also, simply:
./configure --prefix=$ROOTFS_DIR/usr --sysconfdir=/etc/sysconfig

Tweak the Makefile to disable IPX and Multilink, and set the configuration path /etc/sysconfig/ppp.

#[[ -f pppd/Makefile.org ]] || mv pppd/Makefile pppd/Makefile.org
sed "/^FILTER*=/s,^FILTER,# FILTER,g
     /^COMPILE_FLAGS*=/s,-DIPX_CHANGE,,g
     /^HAVE_MULTILINK.*=/s,^HAVE,# HAVE,g
     /^USE_TDB.*=/s,^USE,# USE,g" < pppd/Makefile.linux > pppd/Makefile

[[ -f pppd/pathnames.h.org ]] || mv pppd/pathnames.h pppd/pathnames.h.org
sed "/^#define /s,/etc/ppp/,/etc/sysconfig/ppp/,g" \
    < pppd/pathnames.h.org > pppd/pathnames.h

Compile and install the PPP daemon and the PPPoE client.

( cd pppd ; \
  make clean ; \
  make CC=${TOOLCHAIN_CROSS}gcc AR=${TOOLCHAIN_CROSS}ar DESTDIR=$ROOTFS_DIR/usr install )
( cd pppd/plugins/rp-pppoe ; \
  cp Makefile.linux Makefile ; \
  make clean ; \
  make CC=${TOOLCHAIN_CROSS}gcc AR=${TOOLCHAIN_CROSS}ar DESTDIR=$ROOTFS_DIR/usr install )
echo "plugin rp-pppoe.so" > $ROOTFS_DIR/etc/sysconfig/ppp/options

Example configuration for PPP to authenticate the upstream connection can be found in Section 5.2, “External Network Configuration”. Example configuration for PPP used by L2TP for VPN connections can be found in Section 6.2.4, “PPP (for Windows/XP clients)”.