PPP Peers

The ppp peers directory /etc/ppp/peers contains sample options files and chat scripts for GSM and CDMA. Anything specific to the network or connection should be placed in one of these files. Global options should be placed in /etc/ppp/options.

See the man pages on your development system for additional chat and pppd information.


Example setting up a GSM connection:

root@mtcdp:/# cd /etc/ppp/peers/

root@mtcdp:/var/config/ppp/peers# cat gsm
linkname ppp0
230400
defaultroute
replacedefaultroute
usepeerdns
ipcp-max-failure 4
noauth
crtscts
novj
connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/gsm_chat'

root@mtcdp:/var/config/ppp/peers# cat gsm_chat
SAY "GSM chat\n"
ECHO OFF
ABORT 'NO DIAL TONE'
ABORT 'NO DIALTONE'
ABORT 'NO ANSWER'
ABORT 'NO CARRIER'
ABORT 'DELAYED'
ABORT 'VOICE'
ABORT 'BUSY'
'' 'AT'
OK 'ATZ'
OK 'AT+CSQ'
#OK 'AT+CGDCONT=1,"IP","proxy"'
#OK 'AT+CGDCONT=1,"IP","ISP.CINGULAR"'
#OK 'AT+CGDCONT=1,"IP","internet2.voicestream.com"'
OK 'AT+CGDCONT=1,"IP","internet"'
SAY "Dialing...\n"
#OK 'ATD*99#'
OK 'ATD*99***1#'
SAY "Waiting for CONNECT...\n"
TIMEOUT 120
CONNECT ''
SAY "Connected\n"

root@mtcdp:/var/config/ppp/peers# pppd call gsm

root@mtcdp:/var/config/ppp/peers# ip a
1: lo:  mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0:  mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:d0:a0:02:0d:e1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.1/24 brd 192.168.1.255 scope global eth0
3: tunl0:  mtu 1480 qdisc noop
    link/ipip 0.0.0.0 brd 0.0.0.0
4: gre0:  mtu 1476 qdisc noop
    link/gre 0.0.0.0 brd 0.0.0.0
18: ppp0:  mtu 1500 qdisc pfifo_fast qlen 3
    link/ppp
    inet 166.213.198.88 peer 10.0.0.1/32 scope global ppp0

root@mtcdp:/var/config/ppp/peers# cat /etc/resolv.conf
nameserver 209.183.50.151

root@mtcdp:/var/config/ppp/peers# ping -c 1 google.com
PING google.com (74.125.65.99): 56 data bytes
64 bytes from 74.125.65.99: seq=0 ttl=52 time=477.997 ms

--- google.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 477.997/477.997/477.997 ms