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

    PfSense wakes my Synology NAS boxes from hibernation every 1 hour….

    Scheduled Pinned Locked Moved General pfSense Questions
    29 Posts 7 Posters 7.5k 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.
    • P
      pfcode
      last edited by

      No. Didn't work, re-created it, but still wake up after 1 hour, but I only created it at pfSense side. would try to enter the manual IP, rather than auto DHCP, at the NAS side

      Release: pfSense 2.4.3(amd64)
      M/B: Supermicro A1SRi-2558F
      HDD: Intel X25-M 160G
      RAM: 2x8Gb Kingston ECC ValueRAM
      AP: Netgear R7000 (XWRT), Unifi AC Pro

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        Me? I'd put the NAS on a mirror port on my switch, let it sleep, then run a packet capture until it's woken up and see what caused it.

        Why guess at the problem?

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          Agreed take a sniff and see exactly what is causing a wake up.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • P
            pfcode
            last edited by

            @johnpoz:

            Agreed take a sniff and see exactly what is causing a wake up.

            As my NAS hibernation logs tells, also from Synology tech support:

            It appears that the router keeps trying to distribute DHCP addresses to the units, even though they already have an IP address.

            I'm not sure its the NAS problem or pfSense problem,  NAS is sending DHCPREQUEST command to pfSense every 1 hour, but if the lease time isn't expired, Shouldn't pfSense NOT distribute DHCP address to the unit?

            Release: pfSense 2.4.3(amd64)
            M/B: Supermicro A1SRi-2558F
            HDD: Intel X25-M 160G
            RAM: 2x8Gb Kingston ECC ValueRAM
            AP: Netgear R7000 (XWRT), Unifi AC Pro

            1 Reply Last reply Reply Quote 0
            • D
              doktornotor Banned
              last edited by

              @pfcode:

              It appears that the router keeps trying to distribute DHCP addresses to the units, even though they already have an IP address.

              Yes, of course, the DHCP server keeps "distributing" IP address requested by your NAS, kindly cf.

              
              dhcpd: DHCPREQUEST <my nas="" lan="" ip="">from <my nas="" mac="" addr="">via em1</my></my> 
              

              Also, the DHCP leases expire and need to get renewed (after a configurable period. check the GUI). So yeah, this will happen "even though they already have an IP address", perhaps the Synology support could educate themselves a bit.

              Finally, if you do not want DHCP, then configure a static IP on your NAS and move on!

              1 Reply Last reply Reply Quote 0
              • H
                hda
                last edited by

                @pfcode:

                … but I only created it at pfSense side ...

                Before you jump in mirroring investigation, if you know-how. I am not sure if you are exact & correct. You really should test giving the NAS a new number manually (outside the range/pool) AND manually input it in pfSense too.
                This is to assure yourself the volatile memory about .107 is flushed on both sides… Maybe even reboot both hardware.

                1 Reply Last reply Reply Quote 0
                • DerelictD
                  Derelict LAYER 8 Netgate
                  last edited by

                  Yes.  It should not be a DHCP static mapping.  That still has to periodically renew.  It should be a static IP address directly configured on the NAS, outside the DHCP pool.

                  Chattanooga, Tennessee, USA
                  A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                  DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                  Do Not Chat For Help! NO_WAN_EGRESS(TM)

                  1 Reply Last reply Reply Quote 0
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator
                    last edited by

                    What dhcp server doesn't just out of the blue send out hey you want to renew your lease packets.. But if it gets a request then yeah it will send back something..

                    Tell their their Tech Support to tell you how not to send a request.. What is the lease time to start with 2 hours?  Normally a dhcp client will request renewal of its lease at the 50% mark.  So if you want the nas not to request, then it should be long lease.  If the device is in standby/sleep why would it send out a dhcprequest is the question I would have.

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

                    1 Reply Last reply Reply Quote 0
                    • DerelictD
                      Derelict LAYER 8 Netgate
                      last edited by

                      True.  Should stop guessing and sniff.

                      Chattanooga, Tennessee, USA
                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

                      1 Reply Last reply Reply Quote 0
                      • D
                        doktornotor Banned
                        last edited by

                        @johnpoz:

                        If the device is in standby/sleep why would it send out a dhcprequest is the question I would have.

                        This is not really any suspend-to-disk/ram hibernation. The only thing "hibernating" are the HDDs which are spun down. Now, look at this:

                        
                        # ps ax | grep dhclient
                         4606 ?        Ss     0:00 /usr/sbin/dhclient -4 -d -q -lf /etc/dhclient/ipv4/dhcpv4.leases.eth0 -pf /etc/dhclient/ipv4/dhcpcd-eth0.pid eth0
                         5551 ?        Ss     0:00 /usr/sbin/dhclient -6 -pf /tmp/dhclient6-eth0.pid -lf /etc/dhclient/ipv6/dhcpv6.lease.eth0 -cf /etc/dhclient/ipv6/dhcpv6.conf.eth0 -nw eth0
                        
                        

                        Those dhcpv[46].lease.eth? files have stuff like this:

                        
                        lease {
                          interface "eth0";
                          fixed-address 192.168.1.10;
                          option subnet-mask 255.255.255.0;
                          option routers 192.168.1.1;
                          option dhcp-lease-time 7200;
                          option dhcp-message-type 5;
                          option domain-name-servers 192.168.1.1;
                          option dhcp-server-identifier 192.168.1.1;
                          option host-name "DiskStation";
                          option domain-name "example.com";
                          renew 2 2015/05/19 19:46:58;
                          rebind 2 2015/05/19 20:35:47;
                          expire 2 2015/05/19 20:50:47;
                        }
                        
                        

                        This is just stupid. There's /tmp which is on tmpfs (ramdisk). Now, the lease file is on /etc instead, which is a HDD. Of course, when the lease is renewed, the HDD needs to spin up to write to the file.

                        Tell Synology to move their temporary dhcpv[46].lease.eth? shit to /tmp when people enable "hibernation" – and it won't wake up HDDs from hibernation.  ::)

                        1 Reply Last reply Reply Quote 0
                        • johnpozJ
                          johnpoz LAYER 8 Global Moderator
                          last edited by

                          the hdd are just spun down - ah yeah wouldn't call that sleep anything ;)

                          If that lease file is from actual nas then looks to be only 2 hour lease..  That is not the default lease time in pfsense dhcp server is it?  Thought it was like 24, yup quick look on dhcp server tab "The default is 86400 seconds." So the nas is only requesting 2 hours by default?

                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                          If you get confused: Listen to the Music Play
                          Please don't Chat/PM me for help, unless mod related
                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                          1 Reply Last reply Reply Quote 0
                          • D
                            doktornotor Banned
                            last edited by

                            @johnpoz:

                            If that lease file is from actual nas then looks to be only 2 hour lease..  That is not the default lease time in pfsense dhcp server is it?  Thought it was like 24, yup quick look on dhcp server tab "The default is 86400 seconds." So the nas is only requesting 2 hours by default?

                            The default lease time is 7200 seconds on pfSense; the default maximum lease time is 86400 secs (one day).

                            1 Reply Last reply Reply Quote 0
                            • johnpozJ
                              johnpoz LAYER 8 Global Moderator
                              last edited by

                              you are correct as always dok

                              Lease Obtained. . . . . . . . . . : Tuesday, May 19, 2015 3:23:15 PM
                                Lease Expires . . . . . . . . . . : Tuesday, May 19, 2015 5:23:15 PM

                              doh – helps if you actually read what your doing a copy of.  quick enough fix ;)

                              Lease Obtained. . . . . . . . . . : Tuesday, May 19, 2015 3:23:15 PM
                                Lease Expires . . . . . . . . . . : Wednesday, May 20, 2015 3:28:28 PM

                              Now its 24 hours..

                              An intelligent man is sometimes forced to be drunk to spend time with his fools
                              If you get confused: Listen to the Music Play
                              Please don't Chat/PM me for help, unless mod related
                              SG-4860 24.11 | Lab VMs 2.8, 24.11

                              1 Reply Last reply Reply Quote 0
                              • DerelictD
                                Derelict LAYER 8 Netgate
                                last edited by

                                I might have read something somewhere about clients requesting renewal halfway through their lease.

                                Chattanooga, Tennessee, USA
                                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                                Do Not Chat For Help! NO_WAN_EGRESS(TM)

                                1 Reply Last reply Reply Quote 0
                                • P
                                  pfcode
                                  last edited by

                                  Thanks All,  by assigning a manual IP in the NAS network configuration, solved the issue,  It was 'get network configuration automatically (DHCP)' before.  I will let the Synology tech guys to investigate further to why it is sending dhcprequest every 1 hour (3600 seconds) to the router.

                                  Release: pfSense 2.4.3(amd64)
                                  M/B: Supermicro A1SRi-2558F
                                  HDD: Intel X25-M 160G
                                  RAM: 2x8Gb Kingston ECC ValueRAM
                                  AP: Netgear R7000 (XWRT), Unifi AC Pro

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    doktornotor Banned
                                    last edited by

                                    @pfcode:

                                    I will let the Synology tech guys to investigate further to why it is sending dhcprequest every 1 hour (3600 seconds) to the router.

                                    Well, because you did not configure any default lease time, so you get 2 hours by default, since Synology DSM does not supply any lease time in the DHCP request… That's not what wakes it up, there'd be no problem with that if they were not writing the lease file to the HDD instead of tmpfs.

                                    1 Reply Last reply Reply Quote 0
                                    • N
                                      NOYB
                                      last edited by

                                      @pfcode:

                                      @johnpoz:

                                      Agreed take a sniff and see exactly what is causing a wake up.

                                      As my NAS hibernation logs tells, also from Synology tech support:

                                      It appears that the router keeps trying to distribute DHCP addresses to the units, even though they already have an IP address.

                                      I'm not sure its the NAS problem or pfSense problem,  NAS is sending DHCPREQUEST command to pfSense every 1 hour, but if the lease time isn't expired, Shouldn't pfSense NOT distribute DHCP address to the unit?

                                      Dude or Dudette.  Whichever the case may be.  Why do you continue asking question with you've been given the answer?

                                      The definitive answer to your issue is in the sniff.  No one can tell you (without guessing) what is waking your NAS without visibility to what is on the wire.  Sniff it and report back with the capture.

                                      If you want to discuss DHCP protocol, I suggest the DHCP and DNS forum.

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        pfcode
                                        last edited by

                                        @doktornotor:

                                        @johnpoz:

                                        If the device is in standby/sleep why would it send out a dhcprequest is the question I would have.

                                        This is not really any suspend-to-disk/ram hibernation. The only thing "hibernating" are the HDDs which are spun down. Now, look at this:

                                        
                                        # ps ax | grep dhclient
                                         4606 ?        Ss     0:00 /usr/sbin/dhclient -4 -d -q -lf /etc/dhclient/ipv4/dhcpv4.leases.eth0 -pf /etc/dhclient/ipv4/dhcpcd-eth0.pid eth0
                                         5551 ?        Ss     0:00 /usr/sbin/dhclient -6 -pf /tmp/dhclient6-eth0.pid -lf /etc/dhclient/ipv6/dhcpv6.lease.eth0 -cf /etc/dhclient/ipv6/dhcpv6.conf.eth0 -nw eth0
                                        
                                        

                                        Those dhcpv[46].lease.eth? files have stuff like this:

                                        
                                        lease {
                                          interface "eth0";
                                          fixed-address 192.168.1.10;
                                          option subnet-mask 255.255.255.0;
                                          option routers 192.168.1.1;
                                          option dhcp-lease-time 7200;
                                          option dhcp-message-type 5;
                                          option domain-name-servers 192.168.1.1;
                                          option dhcp-server-identifier 192.168.1.1;
                                          option host-name "DiskStation";
                                          option domain-name "example.com";
                                          renew 2 2015/05/19 19:46:58;
                                          rebind 2 2015/05/19 20:35:47;
                                          expire 2 2015/05/19 20:50:47;
                                        }
                                        
                                        

                                        This is just stupid. There's /tmp which is on tmpfs (ramdisk). Now, the lease file is on /etc instead, which is a HDD. Of course, when the lease is renewed, the HDD needs to spin up to write to the file.

                                        Tell Synology to move their temporary dhcpv[46].lease.eth? shit to /tmp when people enable "hibernation" – and it won't wake up HDDs from hibernation.  ::)

                                        This is a good catch. Thanked.

                                        Release: pfSense 2.4.3(amd64)
                                        M/B: Supermicro A1SRi-2558F
                                        HDD: Intel X25-M 160G
                                        RAM: 2x8Gb Kingston ECC ValueRAM
                                        AP: Netgear R7000 (XWRT), Unifi AC Pro

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