Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Scheduled release/renew of an interface?

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 3 Posters 767 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      DrDrake
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott
        last edited by

        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.

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        1 Reply Last reply Reply Quote 0
        • D
          DrDrake
          last edited by

          I'm not finding any clue about the commands that should be ran.

          I tried with:
          service netif restart re0
          dhclient re0

          But 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.

          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Try /etc/rc.linkup start wan or whichever interface your LTE device is connected to.

            Steve

            D 1 Reply Last reply Reply Quote 1
            • D
              DrDrake @stephenw10
              last edited by

              @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.

              1 Reply Last reply Reply Quote 1
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Great. Thanks for confirming, might help others. 👍

                Steve

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.