# Definitive ppp.conf



## balanga (Feb 19, 2018)

I have looked at lots of examples of /etc/ppp/ppp.conf but there seem to be many variations of parameters, several of which I don't understand and wonder if they are actually necessary. 

Is there anything like a definitive guide to ppp.conf explaining what each option does. For example some have timeout set to 0, the sample conf has it set to 180. 

Also what should the speed be set to? 

And how do I determine which device should be used?

Do I need to specify phone, authname or password, when using broadband?


----------



## SirDice (Feb 19, 2018)

Everything should be explained in ppp(8). Is there anything specific you want to know?


----------



## balanga (Feb 20, 2018)

SirDice said:


> Everything should be explained in ppp(8). Is there anything specific you want to know?



I basically want to know what I'm doing wrong 

/etc/ppp/ppp.conf

```
default:
 set log local Phase Chat Connect LCP IPC CCP CBCP tun command
 ident user-ppp VERSION

 # Ensure that "device" references the correct serial port
 # for your modem. (cuau0 = COM1, cuau1 = COM2)
 #
        enable echo

internet:
        set device /dev/cuaU0.0
        set timeout 0
        set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
        \"\" \
        AT OK-AT-OK \
        AT+CPIN="" OK-AT-OK \
        ATH OK-AT-OK \
        ATE1 OK-AT-OK \
        AT+CGDCONT=1,\\\"IP\\\",\\\"3\\\" OK \
        \\dATDT*99\# TIMEOUT 40 CONNECT"
        set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
        add default HISADDR
```
/var/log/ppp.log

```
Feb 20 00:54:43 FreeBSD newsyslog[603]: logfile first created
Feb 20 00:55:57 FreeBSD ppp[851]: Phase: Using interface: tun0
Feb 20 00:55:57 FreeBSD ppp[851]: Phase: deflink: Created in closed state
Feb 20 00:55:57 FreeBSD ppp[851]: Warning: IPC: Invalid log value
Feb 20 00:55:57 FreeBSD ppp[851]: Warning: usage: set log [local] [+|-]all|async|cbcp|ccp|chat|command|connect|debug|dns|hdlc|id0|ipcp|lcp|lqm|phase|physical|radius|sync|tcp/ip|timer|tun...
Feb 20 00:55:57 FreeBSD ppp[851]: Warning: Add route failed: 0.0.0.0: errno: Value too large to be stored in data type
Feb 20 00:55:57 FreeBSD ppp[853]: Phase: PPP Started (ddial mode).
Feb 20 00:55:57 FreeBSD ppp[853]: Phase: bundle: Establish
Feb 20 00:55:57 FreeBSD ppp[853]: Phase: deflink: closed -> opening
Feb 20 00:55:57 FreeBSD ppp[853]: Warning: deflink: /dev/cuaU0.0: Bad file descriptor
Feb 20 00:55:57 FreeBSD ppp[853]: Phase: deflink: Enter pause (30) for redialing.
```

Session capture:-

```
root@FreeBSD:~ # ppp -ddial internet
Working in ddial mode
Warning: IPC: Invalid log value
tun0: Warning: usage: set log [local] [+|-]all|async|cbcp|ccp|chat|command|connect|debug|dns|hdlc|id0|ipcp|lcp|lqm|phase|physical|radius|sync|tcp/ip|timer|tun...
tun0: Command: default: ident user-ppp VERSION
tun0: Command: default: enable echo
tun0: Command: internet: set device /dev/cuaU0.0
tun0: Command: internet: set timeout 0
tun0: Command: internet: set dial ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5         ""         AT OK-AT-OK         AT+CPIN= OK-AT-OK         ATH OK-AT-OK         ATE1 OK-AT-
OK         AT+CGDCONT=1,\"IP\",\"3\" OK         \dATDT*99# TIMEOUT 40 CONNECT
tun0: Command: internet: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0
tun0: Command: internet: add default HISADDR
tun0: Warning: Add route failed: 0.0.0.0: errno: Value too large to be stored in data type
Using interface: tun0
```

I have no idea what I'm doing wrong. Any help would be appreciated...


----------



## VladiBG (Feb 20, 2018)

Maybe you are hitting this bug. Where the default route is failed to save.
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=218517


----------

