Help needed to perform an interface reset via cron for WAN interface

Started by Baender, January 08, 2025, 10:11:08 PM

Previous topic - Next topic
Hello guys,

I already asked a similar question in the German thread, but never got an answer. So I would like to ask my question more generic, in hope to get help.

What is the appropriate way, to reset the WAN interface periodically?

I have the following interfaces, that are derived of the WAN interface:
  • WAN interface: igc1-device (not assigned)
  • WAN_INT: pppoe0-device
  • WAN_VOIP: pppoe1-device

The PPPoE devices:
  • pppoe0: VLAN 101 on WAN interface
  • pppoe1: VLAN 201 on WAN interface

Relevant VLANs:
  • VLAN 101: Parent igc1
  • VLAN 201: Parent igc1

Connection information:
  • WAN_INT
    • IPv4 Configuration Type: PPPoE (pppoe0)
    • IPv6 Configuration Type: 6to4 Tunnel
  • WAN_VOIP
    • IPv4 Configuration Type: PPPoE (pppoe1)
    • IPv6 Configuration Type: None
  • The provider regularly disconnects the active connection once a day. In other words, WAN_INT and WAN_VOIP receive new IP addresses.

A long time ago, in my early days with OPNsense, I set up a cron job that resets the WAN interface at 5 am.
  • System>Settings>Cron>Add Job
  • [ENABLE]
  • Hours: 5
  • Command: Periodic interface reset
  • Parameters: wan
  • Description: Reset the WAN interface

That worked for a very long time. I'm not saying that the same configuration worked then and doesn't now. There have certainly been changes in my OPNsense settings in the meantime. Therefore, I am asking the question of how such a cron job would have to be set with my parameters in a more general way.

The thing is, I can't find any log entries at that time that would indicate that the IP address has been changed or has changed.
If I set the job to run five minutes later from now on, nothing happens either, or I can't find the logs that should appear. Perhaps someone can help me with this. In any case, the end result is that I don't get a new IP address and the provider's forced disconnect happens at (currently) 9 a.m., which is pretty annoying.

I would really appreciate input on this, because I simply cannot find a solution to this perhaps simple problem at the moment. I am currently running version 24.7.11_2.