I try to setup my daily DSL reset and it seems the "dumb" way is to just cron: 0 05 * * * ifdown wan; sleep 30; ifup wan or use watchcat and do a daily reboot.
I was wondering if there is a more "gentle" way to tell pppd directly to hangup/disconnect and connect/authenticate, so that the actual WAN interface can stay up?
I don't see any init.d script so not sure how to handle a stop/start correctly.
The wan interface in your case is the pppoe. By calling the ifdown wan you are not bringing down the ethernet interface, if that is what you're asking. Also you could just call ifup wan, without ifdown wan and sleep 30, if you don't care about the half minute delay.
I try to debug a problem, since sometimes ifdown/up wan wont work, while a reboot always works. I noticed some services trigger on WAN up/down, so i want to see if directly triggering pppd works more reliable.
You can replace the down/ up dance with a simple invocation of ifup wan, I just needed to tear down my he.net tunnel gracefully to avoid getting deadlocked.
Than neither a ifup wan or luci wan restart or kill pppd works to reconnect, yet a reboot does....
Not really sure what a reboot does that fixes this, problem is atm my wlan is down after a reboot (some bug) and i need to manually restart Radio1 to fix this, so a reboot would only fix the pppoe issue..
I see this in the logs?
daemon.info pppd[25951]: Plugin rp-pppoe.so loaded.
daemon.info pppd[25951]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.8
daemon.notice pppd[25951]: pppd 2.4.8 started by root, uid 0
daemon.warn pppd[25951]: Timeout waiting for PADO packets
daemon.err pppd[25951]: Unable to complete PPPoE Discovery
PS: My startup line looks like this: /usr/sbin/pppd nodetach ipparam wan ifname pppoe-wan lcp-echo-interval 1 lcp-echo-failure 5 lcp-echo-adaptive set PEERDNS=0 nodefaultroute usepeerdns maxfail 1
Maybe i need to change the maxfail 1 option?
PS: This is from master btw (OpenWrt SNAPSHOT r12034-1322190fd3)
only problem is i see the "sync" LED on the modem, so it is synced.
should than still be "not connected" after a i reboot the router
its not checked via ifconfig
It also does not keep trying and only a manual reboot reconnects at this point.
Are you trying to configure and start pppd manually instead of using the UCI and netifd systems?
Not really all i try is 1) setup my 24h reconnect stuff and 2) figure out why pppd does not reconnect if a disconnect happens or as noted not even a luci-restart of WAN works reliably. It did work yesterday night with the 30s timeout, but it should always work not just "sometimes".