Scheduled release/renew of an interface?
-
Is there a way to get interface to release DHCP lease and then renew it and then schedule it?
I have this Huawei LTE-router on bridged mode and it's causing some trouble with my WAN connection. Once in the week it drops connection and reconnects but pfSense does not react to this other than " >>> Gateway alarm: WAN_DHCP (Addr:8.8.4.4 Alarm:1 RTT:43.641ms RTTsd:5.278ms Loss:41%)" on the system log. It just sits there until lease goes out or I manually go and release/renew the interface and after IP changes connection works again. And when I forget to do this before leaving work in the morning I get angry calls "internet is down!" from the people at home.So, once again: is there a way to schedule release/renew of an interface?
-
You'd use /etc/crontab to schedule a script that does what you want. There are commands dhclient and dhclient-script that may be used to control dhcp. You could also use ifconfig to shut down and start an interface.
-
I'm not finding any clue about the commands that should be ran.
I tried with:
service netif restart re0
dhclient re0But this doesn't work. Is there any way to find out what commands on the Status / Interfaces -page uses? Connection starts working when I first use release (Relinquish Lease checked ) and then Renew on that page.
-
Try
/etc/rc.linkup start wan
or whichever interface your LTE device is connected to.Steve
-
@stephenw10 said in Scheduled release/renew of an interface?:
Try
/etc/rc.linkup start wan
or whichever interface your LTE device is connected to.Steve
Thank you! This did the trick. I didn't need to worry about nonworking internet this morning.
-
Great. Thanks for confirming, might help others.
Steve