OpenWrt Forum Archive

Topic: PPPoE Automatic Reconnect?

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

My setup is LAN --> Ubiquity/OpenWRT Router --> 2Wire DSL modem --> ISP/Internet. My router runs Backfire (10.03.1-RC5, r27608) and connects to the ISP (TelMex) using PPPoE.

My problem is that the ISP/PPPoE connection goes down frequently, and specifically every night in the early morning hours. My /etc/config/network  WAN section is below, but this does not cause the WAN/PPPoE to reconnect automatically, and I have to physically recable to connect a PC to the modem, connect using Windows PPPoE client, and recable the LAN to the router/modem to get things going again.

Is there a way to configure the OpenWRT router to reconnect automatically if the PPPoE connection is dropped?

config 'interface' 'wan'
        option 'ifname' 'eth0'
        option 'proto' 'pppoe'
        option 'username' 'xxxxxxxxxx'
        option 'password' 'xxxxxxx'
        option 'defaultroute' '1'
        option 'gateway' '189.177.191.157'                                                                                                                                         
        option 'dns' '216.131.95.20 216.131.94.5 208.67.222.222'
        option 'keepalive' '10'
        option 'ppp_redial' 'persist'

This is all I have for wan config, and my router always reconnects immediately if the connection is dropped.

config interface wan
        option ifname   'eth1'
        option proto    'pppoe'
        option username 'xxxxxxxx'
        option password 'xxxxxxxx'

Maybe you should delete the keepalive and ppp_redial lines.

Option 'ppp_redial' has been deprecated.
If option "demand" unset,  the default option is "persist".

        option 'keepalive' '2 10' #lcp-echo-interval and lcp-echo-failure
#       option 'pppd_options' 'maxfail 0'

It looks like /etc/ppp/options already includes "maxfail 0".

The question is, why it still doesn't persist? A workaround is to periodically "ifdown wan ; ifup wan" by a cron job.

pppd(8): Point-to-Point Protocol Daemon - Linux man page
OpenWrt / How restart ppp-connection every morning?

The discussion might have continued from here.