# PPPoE issue, modem hangup on rc-script

## ambasta

Hi,

I am using PPPoE using a Motorola SB5100 cable model to connect to my dsl connection. I have to specify a username and login for this PPPoE connection and have correspondingly modified my /etc/conf.d/net settings as below:

```

config_eth0=( null )

plugins_ppp0=( "pppoe" )

link_ppp0="eth0"

username_ppp0="****"

password_ppp0="****"

pppd_ppp0="defaultroute usepeerdns"

config_ppp0=( "ppp" )

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

wpa_timeout_wlan0=15

```

While this setup does allow me to connect to the internet, on startup my modem keeps hanging up causing the connection to not be up for several minutes as var/log/messages shows below

```

Aug  9 16:21:44 localhost pppd[3052]: PPP session is 35933

Aug  9 16:21:44 localhost pppd[3052]: Using interface ppp0

Aug  9 16:21:44 localhost pppd[3052]: Connect: ppp0 <--> eth0

Aug  9 16:21:44 localhost pppd[3052]: PAP authentication succeeded

Aug  9 16:21:44 localhost pppd[3052]: peer from calling number 00:0D:29:16:03:1C authorized

Aug  9 16:21:44 localhost pppd[3052]: local  IP address xxx.xxx.132.110

Aug  9 16:21:44 localhost pppd[3052]: remote IP address yyy.yyy.252.129

Aug  9 16:21:44 localhost pppd[3052]: primary   DNS address yyy.yyy.255.92

Aug  9 16:21:44 localhost pppd[3052]: secondary DNS address yyy.yyy.192.15

Aug  9 16:21:45 localhost ntpd[3144]: Listen normally on 7 ppp0 xxx.xxx.132.110 UDP 123

Aug  9 16:21:51 localhost pppd[3052]: Modem hangup

Aug  9 16:21:51 localhost pppd[3052]: Connect time 0.2 minutes.

Aug  9 16:21:51 localhost pppd[3052]: Sent 3272 bytes, received 5008 bytes.

Aug  9 16:21:51 localhost pppd[3052]: Connection terminated.

Aug  9 16:21:52 localhost ntpd[3144]: Deleting interface #7 ppp0, xxx.xxx.132.110#123, interface stats: received=2, sent=2, dropped=0, active_time=7 secs

Aug  9 16:22:21 localhost pppd[3052]: PPP session is 35934

Aug  9 16:22:21 localhost pppd[3052]: Using interface ppp0

Aug  9 16:22:21 localhost pppd[3052]: Connect: ppp0 <--> eth0

Aug  9 16:22:21 localhost pppd[3052]: LCP terminated by peer

Aug  9 16:22:24 localhost pppd[3052]: Connection terminated.

Aug  9 16:22:24 localhost pppd[3052]: Modem hangup

Aug  9 16:22:54 localhost pppd[3052]: PPP session is 35937

Aug  9 16:22:54 localhost pppd[3052]: Using interface ppp0

Aug  9 16:22:54 localhost pppd[3052]: Connect: ppp0 <--> eth0

Aug  9 16:22:55 localhost pppd[3052]: Remote message: Too many simultaneous sessions for user: ****

Aug  9 16:22:55 localhost pppd[3052]: PAP authentication failed

Aug  9 16:22:55 localhost pppd[3052]: Connection terminated.

```

At this point I keep getting too many connections for a while till later it reconnects as:

```

Aug  9 13:40:47 localhost pppd[5049]: PPP session is 35403

Aug  9 13:40:47 localhost pppd[5049]: Using interface ppp0

Aug  9 13:40:47 localhost pppd[5049]: Connect: ppp0 <--> eth0

Aug  9 13:40:48 localhost pppd[5049]: PAP authentication succeeded

Aug  9 13:40:48 localhost pppd[5049]: peer from calling number 00:0D:29:16:03:1C authorized

Aug  9 13:40:48 localhost pppd[5049]: local  IP address xxx.xxx.128.82

Aug  9 13:40:48 localhost pppd[5049]: remote IP address yyy.yyy.252.129

Aug  9 13:40:48 localhost pppd[5049]: primary   DNS address yyy.yyy.255.92

Aug  9 13:40:48 localhost pppd[5049]: secondary DNS address yyy.yyy.192.15

Aug  9 13:40:50 localhost ntpd[3125]: Listen normally on 11 ppp0 xxx.xxx.128.82 UDP 123

```

What I want to fix is why my connection keeps dying on boot while it works fine after a while after booting.

Mod edit: Conventional wisdom holds posting your real IP addresses to be an invitation to trouble; masked them for you.. --timeBandit

----------

## aCOSwt

Well, I am not well versed in pppoe however, does'nt these modems come with some firmware to be loaded prior to operations ?

 *timeBandit wrote:*   

> Conventional wisdom... 

 

Yet another Aristotle follower...   :Twisted Evil: 

----------

## ambasta

Hi,

I figured a few things out looking at ppd man pages, pointing changes to conf.d/net in case anyone else faces a similar issue in the future

```

pppd_ppp0=(

    "noauth"

    "defaultroute"

    "usepeerdns"

    "persist"

    "holdoff 2"

    "lcp-echo-interval 15"

    "lcp-echo-failure 3"

    "lock"

)

```

basically here the lcp echo interval asks the peer to send a keep alive packet every 15 seconds, if 3 such packets are unresponsive then we assume that the ppp peer has disconnected

----------

