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.


  • 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* scripts.
  • KPN does not hand out DNS servers, or at least, not that I can see. Add entries from OpenDNS, Google ( and or other free DNS resolvers.


 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	# openDNS
 set ifaddr
 #add default HISADDR          # See* 


 shell route delete default
 shell route add default -interface INTERFACE


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

 shell route delete default

PPP configuration troubleshooting

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

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

 set ifaddr

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

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