• SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Set PPPOE reconnect timer? (or reboot timer)

ipumuk

Occasional Visitor
Hi,

thanks a lot for your great custom firmware, Merlin!

I have an ISP that disconnects me every 24 hours. it sucks when i am being disconnected during a skype or gaming session.

is there a way to set a specific time when the router should reconnect the PPPOE connection? (like reconnect PPPOE every day at 5am?)

if that is not possible, is there a way to automatically reboot the router at a specific time?

thanks for your help in advance.
 
After enabling /jffs open a terminal like putty and input this commands
Code:
[B][SIZE="3"]echo "#!/bin/sh" >/jffs/scripts/init-start
echo "cru a ScheduledWanRestart \"0 5 * * * service restart_wan\"" >>/jffs/scripts/init-start[/SIZE][/B]
Code:
[B][SIZE="3"]chmod a+rx /jffs/scripts/init-start[/SIZE][/B]
Code:
[B][SIZE="3"]reboot[/SIZE][/B]
Verify if is added to cron job list
should output
0 5 * * * service restart_wan #ScheduledWanRestart#
:)
 
Thanks a lot for the fast and great help!

It seems that it worked. I got the following feedback:

Code:
admin@RT-N66U:/tmp/home/root# cru l
0 5 * * * service restart_wan #ScheduledWanRestart#
 
I do not understand the whole log but it worked i guess ;)

Thx again, TeHashX.

Code:
Jan 11 05:00:01 crond[323]: crond: USER admin pid 13525 cmd service restart_wan
Jan 11 05:00:01 rc_service: service 13526:notify_rc restart_wan
Jan 11 05:00:01 pppd[374]: Hangup (SIGHUP)
Jan 11 05:00:01 pppd[374]: Connect time 332.7 minutes.
Jan 11 05:00:01 pppd[374]: Sent 634372987 bytes, received 1920240512 bytes.
Jan 11 05:00:01 dnsmasq[414]: read /etc/hosts - 5 addresses
Jan 11 05:00:01 dnsmasq[414]: read /etc/hosts.dnsmasq - 2 addresses
Jan 11 05:00:01 dnsmasq-dhcp[414]: read /etc/ethers - 2 addresses
Jan 11 05:00:02 pppd[374]: Terminating on signal 15
Jan 11 05:00:02 pppd[374]: Connection terminated.
Jan 11 05:00:02 pppd[374]: Sent PADT
Jan 11 05:00:02 dnsmasq[414]: using nameserver 62.xxxx
Jan 11 05:00:02 dnsmasq[414]: using nameserver 62.xxxx
Jan 11 05:00:02 dnsmasq[414]: read /etc/hosts - 5 addresses
Jan 11 05:00:02 dnsmasq[414]: read /etc/hosts.dnsmasq - 2 addresses
Jan 11 05:00:02 dnsmasq-dhcp[414]: read /etc/ethers - 2 addresses
Jan 11 05:00:02 dnsmasq[414]: ignoring nameserver 192.168.1.1 - local interface
Jan 11 05:00:02 pppd[374]: Exit.
Jan 11 05:00:02 stop_wan(): perform DHCP release
Jan 11 05:00:02 kernel: br0: port 1(vlan1) entering disabled state
Jan 11 05:00:02 kernel: vlan1: dev_set_promiscuity(master, 1)
Jan 11 05:00:02 stop_wan(): perform DHCP release
Jan 11 05:00:02 kernel: br0: port 1(vlan1) entering listening state
Jan 11 05:00:02 kernel: br0: port 1(vlan1) entering learning state
Jan 11 05:00:02 kernel: br0: topology change detected, propagating
Jan 11 05:00:02 kernel: br0: port 1(vlan1) entering forwarding state
Jan 11 05:00:04 WAN Connection: Fail to connect with some issues.
Jan 11 05:00:04 stop_nat_rules: apply the redirect_rules!
Jan 11 05:00:04 dnsmasq[414]: exiting on receipt of SIGTERM
Jan 11 05:00:04 dnsmasq[13563]: started, version 2.67 cachesize 1500
Jan 11 05:00:04 dnsmasq[13563]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth
Jan 11 05:00:04 dnsmasq[13563]: warning: interface ppp1* does not currently exist
Jan 11 05:00:04 dnsmasq[13563]: asynchronous logging enabled, queue limit is 5 messages
Jan 11 05:00:04 dnsmasq-dhcp[13563]: DHCP, IP range 192.168.1.2 -- 192.168.1.254, lease time 1d
Jan 11 05:00:04 dnsmasq[13563]: read /etc/hosts - 5 addresses
Jan 11 05:00:04 dnsmasq[13563]: read /etc/hosts.dnsmasq - 2 addresses
Jan 11 05:00:04 dnsmasq-dhcp[13563]: read /etc/ethers - 2 addresses
Jan 11 05:00:04 dnsmasq[13563]: ignoring nameserver 192.168.1.1 - local interface
Jan 11 05:00:04 pppd[13566]: Plugin rp-pppoe.so loaded.
Jan 11 05:00:04 pppd[13566]: RP-PPPoE plugin version 3.11 compiled against pppd 2.4.5
Jan 11 05:00:04 pppd[13567]: pppd 2.4.5 started by admin, uid 0
Jan 11 05:00:04 pppd[13567]: PPP session is 21265 (0x5311)
Jan 11 05:00:04 pppd[13567]: Connected to fc:48:ef:29:8a:eb via interface eth0
Jan 11 05:00:04 pppd[13567]: Using interface ppp0
Jan 11 05:00:04 pppd[13567]: Connect: ppp0 <--> eth0
Jan 11 05:00:05 pppd[13567]: Remote message: Pedo mellon a minno : xxxx atm 0/14/0/28:1.32 - <unknown>
Jan 11 05:00:05 pppd[13567]: PAP authentication succeeded
Jan 11 05:00:05 pppd[13567]: peer from calling number FC:48:EF:29:8A:EB authorized
Jan 11 05:00:05 miniupnpd[494]: Failed to get IP for interface ppp0
Jan 11 05:00:05 miniupnpd[494]: SendNATPMPPublicAddressChangeNotification: cannot get public IP address, stopping
Jan 11 05:00:05 miniupnpd[494]: Failed to get IP for interface ppp0
Jan 11 05:00:05 miniupnpd[494]: SendNATPMPPublicAddressChangeNotification: cannot get public IP address, stopping
Jan 11 05:00:05 miniupnpd[494]: Failed to get IP for interface ppp0
Jan 11 05:00:05 miniupnpd[494]: SendNATPMPPublicAddressChangeNotification: cannot get public IP address, stopping
Jan 11 05:00:05 pppd[13567]: local  IP address 77.xxxx
Jan 11 05:00:05 pppd[13567]: remote IP address 213.xxxx
Jan 11 05:00:05 pppd[13567]: primary   DNS address 62.xxxx
Jan 11 05:00:05 pppd[13567]: secondary DNS address 62.xxxx
Jan 11 05:00:05 dnsmasq[13563]: read /etc/hosts - 5 addresses
Jan 11 05:00:05 dnsmasq[13563]: read /etc/hosts.dnsmasq - 2 addresses
Jan 11 05:00:05 dnsmasq-dhcp[13563]: read /etc/ethers - 2 addresses
Jan 11 05:00:05 dnsmasq[13563]: using nameserver 62.xxxx
Jan 11 05:00:05 dnsmasq[13563]: using nameserver 62.xxxx
Jan 11 05:00:05 start_nat_rules: apply the nat_rules(/tmp/nat_rules_ppp0_eth0)!
Jan 11 05:00:05 dnsmasq[13563]: exiting on receipt of SIGTERM
Jan 11 05:00:05 dnsmasq[13590]: started, version 2.67 cachesize 1500
Jan 11 05:00:05 dnsmasq[13590]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth
Jan 11 05:00:05 dnsmasq[13590]: warning: interface ppp1* does not currently exist
Jan 11 05:00:05 dnsmasq[13590]: asynchronous logging enabled, queue limit is 5 messages
Jan 11 05:00:05 dnsmasq-dhcp[13590]: DHCP, IP range 192.168.1.2 -- 192.168.1.254, lease time 1d
Jan 11 05:00:05 dnsmasq[13590]: read /etc/hosts - 5 addresses
Jan 11 05:00:05 dnsmasq[13590]: read /etc/hosts.dnsmasq - 2 addresses
Jan 11 05:00:05 dnsmasq-dhcp[13590]: read /etc/ethers - 2 addresses
Jan 11 05:00:05 dnsmasq[13590]: using nameserver 62.xxxx
Jan 11 05:00:05 dnsmasq[13590]: using nameserver 62.xxxx
Jan 11 05:00:05 kernel: HTB: quantum of class 10002 is big. Consider r2q change.
Jan 11 05:00:05 kernel: HTB: quantum of class 10060 is big. Consider r2q change.
Jan 11 05:00:05 rc_service: ip-up 13572:notify_rc stop_upnp
Jan 11 05:00:05 rc_service: ip-up 13572:notify_rc start_upnp
Jan 11 05:00:05 miniupnpd[13636]: HTTP listening on port 53026
Jan 11 05:00:05 miniupnpd[13636]: Listening for NAT-PMP traffic on port 5351
Jan 11 05:00:09 WAN Connection: WAN was restored.
 
I do not understand the whole log but it worked i guess ;)

Thx again, TeHashX.

Code:
Jan 11 05:00:01 crond[323]: crond: USER admin pid 13525 cmd service restart_wan
Jan 11 05:00:01 rc_service: service 13526:notify_rc restart_wan
Jan 11 05:00:01 pppd[374]: Hangup (SIGHUP)
Jan 11 05:00:01 pppd[374]: Connect time 332.7 minutes.
Jan 11 05:00:09 WAN Connection: WAN was restored.

Yes, wan was restarted.

Sent from my HTC One using Tapatalk
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top