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

    Packet Loss Restart Script

    Scheduled Pinned Locked Moved General pfSense Questions
    22 Posts 3 Posters 3.0k 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.
    • GertjanG
      Gertjan @newUser2pfSense
      last edited by Gertjan

      @newuser2pfsense said in Packet Loss Restart Script:

      The ONT power supply has been connected to a UPS

      Ok, that is good thing.
      It's ok that the power goes away, the ONT will restart when it comes back.
      The real danger is what I call brown out or yellow outs. These can really 'f*ck' electronic.

      @newuser2pfsense said in Packet Loss Restart Script:

      I pressed the on/off switch for a hard shutdown

      Please, do this never again.
      Or do it at least a couple of time with your PC : remove the power cable or battery.
      You will loose your file system, the system won't boot any more, and you have to be far better as a 'coder' to repair the situation. You most probably wind up res installing everything -- loosing all recent data.
      pfSense is : the same big OS - the same big complex file system on the same hard drive. The same risks.

      I can't proof it to you, but when the pfSEnse comes up and it connects, and it comes ups and it won't connect, it's not a pfSense issue.
      Check the DHCP logs pn pfSense : you can see it sending DHCPdiscover (the dhcpclient process) messages .... but its not receiving any answers from from your ISP.
      You could reboot pfSEnse - something that just creates a small pause, or remove the WAN cable for the same duration : if your ISP isn't ready, not listening or whatever, the chances of receiving an answer to the DHCP negotiation are identical.

      Have a look at this :
      https://forum.netgate.com/topic/64563/pfsense-auto-reboot-script-when-google-is-unreachable

      It's a script - from 2014 (!!), so some retouching could be needed.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      N 1 Reply Last reply Reply Quote 0
      • N
        newUser2pfSense @Gertjan
        last edited by

        @gertjan
        I should've mentioned that I have the BIOS set to a graceful shutdown once the power button is pressed. I would never just push and hold the power button for a hard power down unless something was really wrong. pfSense has been pretty rock solid in staying up all the time.

        Thank you for providing the link to the script. I'll be the first to say that I'm not a coder/programmer, but looking at the code in the script, I'm wondering if the ALLDEST is necessary? I guess by pinging whatever is chosen for ALLDEST you could tell whether or not any data was able to get in or out. I like the idea of checking the WAN to see if any data is able to pass, and if not, restart.

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