wiki:PPPFor3GModems

FreeBSD PPP config for 3G modems

This is an example ppp configuration that allows connection to KPN networks (NL). See also the Wiki page with list of all APNs.

Issues:

  • The destination IP address negotiated by PPP when using KPN as your provider is invalid. You need to set up the default route to the interface, not the IP address, hence the ppp.link* scripts.
  • KPN does not hand out DNS servers, or at least, not that I can see. Add entries from OpenDNS, Google (8.8.8.8 and 8.8.4.4) or other free DNS resolvers.

ppp.conf

kpn:
 set device /dev/cuaU0.0
 set speed 384000
 set timeout 0
 set authname KPN
 set authkey gprs

 set dial "ABORT BUSY TIMEOUT 2 \
        \"\" \
        AT OK-AT-OK \
        AT+CFUN=1 OK-AT-OK \
        AT+CMEE=2 OK-AT-OK \
        AT+CSQ OK \
        AT+CGDCONT=1,\\\"IP\\\",\\\"internet\\\" OK \
        AT+CGACT? OK-AT-OK \
        AT+CGATT? OK \
        AT+CGCLASS? OK \
        AT+COPS? OK \
        ATD*99***1# CONNECT"

 ## Lower the MTU as this seems to make the link more stable for GPRS connections.
 #set mtu maximum 296
 #set mru maximum 296
 set crtscts on
 disable vjcomp
 disable acfcomp
 disable deflate
 disable deflate24
 disable pred1
 disable protocomp
 disable mppe
 disable ipv6cp
 disable lqr
 disable echo
 nat enable yes 
 enable dns
 resolv writable
 set dns 208.67.220.220 208.67.222.222	# openDNS
 set ifaddr 10.1.0.2/0 10.1.0.1/0 255.255.255.255 0.0.0.0
 #add default HISADDR          # See ppp.link* 

ppp.linkup:

kpn:
 shell route delete default
 shell route add default -interface INTERFACE

ppp.linkdown:

default:
 shell logger "LABEL down (up UPTIME): OCTETSIN received, OCTETSOUT sent"

kpn:
 shell route delete default

PPP configuration troubleshooting

Warning: iface add: ioctl(SIOCAIFADDR, 92.69.57.75 -> 0.0.0.0): Destination address required

means: the other party is not providing an IP address. Change the set ifaddr line to something like:

 set ifaddr 10.1.0.2/0 10.1.0.1/0 255.255.255.255 0.0.0.0

with the second argument a valid IP address, but with a /0 mask.

Last modified 3 years ago Last modified on Nov 16, 2010, 8:55:40 PM