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

    Problems between iphone and dhcp?

    Scheduled Pinned Locked Moved General pfSense Questions
    56 Posts 5 Posters 10.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.
    • E
      edpbettinelli @johnpoz
      last edited by

      @johnpoz said in Problems between iphone and dhcp?:

      are you saying you can not ping an iphone by name when unbound is restarting - this would make sense.
      Or are you saying iphone can not ping pfsense IP on the iphone vlan? By IP? By name?
      If unbound is restarting - then yeah you could have issues with resolving anything by name.. But that should not effect ping by IP..
      Registering dhcp leases in unbound has been problematic for quite some time, because any time a lease is redone or issued it forces a restart of unbound, etc.

      the effect is that all apps are blocked, with an app on iphone i verified that ping using ip. other iphone or voip phones on the same vlan respond to ping, while if in that minute I try to ping pfsense no response.

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

        @edpbettinelli ok I just started a ping to my iphone IP 192.168.2.198

        I restarted dhcp, I even did a manual reload of all the firewall rules..

        Not 1 ping dropped.

        Ping statistics for 192.168.2.198:
            Packets: Sent = 124, Received = 124, Lost = 0 (0% loss),
        Approximate round trip times in milli-seconds:
            Minimum = 2ms, Maximum = 322ms, Average = 73ms
        Control-C
        

        from a box on another vlan to the wifi vlan the iphone is on...

        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

        E 1 Reply Last reply Reply Quote 0
        • E
          edpbettinelli @johnpoz
          last edited by

          @johnpoz sorry I didn't understand, did you ping from iphone to your gateway or from pfsense to iphone?
          I see the problem from iphone to pfsense

          Sorry for my english

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

            So during the failure you are still able to ping pfSense from other devices?

            If pfSense itself stops responding then it does sounds like know pf reload issue:
            https://redmine.pfsense.org/issues/12827

            Steve

            E 1 Reply Last reply Reply Quote 0
            • E
              edpbettinelli @stephenw10
              last edited by

              @stephenw10 I confirm that with all other devices except iphone pfsense does not lose a ping. it seems like some strange management of wifi by apple

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

                @edpbettinelli ok on my iphone.. Pinging pfsense IP on that vlan.

                Restart unbound, reload firewall filters, restarted dhcp, etc..

                Not a ping lost

                PNG image.png

                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
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  Mmm, there's really no reason the iphone should react at all to dhcpd restarting.

                  Can we see your test results so we know exactly what you're seeing?

                  Steve

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

                    @stephenw10 said in Problems between iphone and dhcp?:

                    there's really no reason the iphone should react at all to dhcpd restarting.

                    exactly - the only thing I could see having any possible effect at all is a reload of the firewall rules.. if that got hung up then maybe ok, but states are not flushed on a reload, I don't think that is a default setting - mine don't flush the states, etc..

                    So if you started a ping just as the firewall rules were reloading I could see maybe an issue?

                    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

                    E 1 Reply Last reply Reply Quote 0
                    • E
                      edpbettinelli @johnpoz
                      last edited by

                      @johnpoz Last night I tried from home in vpn to reload the rules I am attaching the ping screen to pfsense.
                      vpn.JPG
                      vlandati.JPG
                      sorvegl.JPG
                      There was an iphone connected which never lost the ping during all my tests (the ping, however, was from my pc in vpn to the iphone).
                      This morning I tried to activate a dhcp on a test vlan and my iphone crashed as usual,
                      while the rest of the devices had no problems (same behavior of the attached snap).
                      I forgot the iPhones are managed by a mdm in the cloud.
                      Other tests I will be able to do only when the company is stopped.
                      Do you have tests to recommend to me to get more data to find the cause of the problem?
                      Thank you very much for your support, I will keep you updated on the developments.
                      Luca Bottini

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

                        @edpbettinelli said in Problems between iphone and dhcp?:

                        my iphone crashed

                        I assume you mean it was unable to connect out via WIFI?

                        It didn't actually crash?

                        E 1 Reply Last reply Reply Quote 0
                        • E
                          edpbettinelli @stephenw10
                          last edited by

                          @stephenw10 said in Problems between iphone and dhcp?:

                          I assume you mean it was unable to connect out via WIFI?
                          It didn't actually crash?

                          I mean that the iphone has lost the connection to the pfsense for the usual minute.
                          After that everything goes back to normal even on iPhones

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

                            How exactly are you seeing this on the iphone?

                            You are running a ping?

                            You can't connect to the webgui?

                            Can't pull a new IP?

                            I have a phone connected via wifi to pfSense here but unless I was actively testing I wouldn't notice if it got disconnected for 1min.

                            Even if dhcp failed completely any client should just continue to use it's existing IP until the lease expires.

                            Is the iphone pulling a very short dhcp lease? Like 1min?

                            Steve

                            E johnpozJ 2 Replies Last reply Reply Quote 0
                            • E
                              edpbettinelli @stephenw10
                              last edited by

                              @stephenw10
                              I launch an extended ping to pfsense from the iphone no problem, I do an apply on dhcp vlan test activation and the ping stops responding (between 50 and 60 lost pings)
                              The phone can only communicate with devices on the same vlan, no internet, no GUI,no routing to other vlan. When the iphone loses the ping client just continue to use existing ip.
                              Default lease time on this VLAN 7 days.

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

                                @stephenw10 said in Problems between iphone and dhcp?:

                                Is the iphone pulling a very short dhcp lease? Like 1min?

                                Yeah the only thing that would make sense on dhcp issue like that is lease time crazy crazy low!! I mean insane low!!

                                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

                                E 1 Reply Last reply Reply Quote 0
                                • E
                                  edpbettinelli @johnpoz
                                  last edited by

                                  @johnpoz said in Problems between iphone and dhcp?:

                                  Yeah the only thing that would make sense on dhcp issue like that is lease time crazy crazy low!! I mean insane low!!

                                  I don't know the details of how iPhones manage dhcp.. Sniffing with wireshark ?

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

                                    Try running a packet capture on pfSense for the pings during the outage.

                                    Are the pings arriving?

                                    Are the replies going back to the correct MAC?

                                    E 1 Reply Last reply Reply Quote 0
                                    • E
                                      edpbettinelli @stephenw10
                                      last edited by

                                      @stephenw10 said in Problems between iphone and dhcp?:

                                      Try running a packet capture on pfSense for the pings during the outage.
                                      Are the pings arriving?
                                      Are the replies going back to the correct MAC?

                                      As soon as I find the time since these tests cause voice problems in the company I try to do everything and let you know. Thanks a lot for the moment.
                                      Luca

                                      1 Reply Last reply Reply Quote 0
                                      • GertjanG
                                        Gertjan @edpbettinelli
                                        last edited by Gertjan

                                        @edpbettinelli said in Problems between iphone and dhcp?:

                                        I don't know the details of how iPhones manage dhcp

                                        Look in the pfSense log for details.
                                        Look at the dhcp leases file (the file the DHCP uses to store all the leases it gave away to devices)
                                        On the apple.com site, the 'dev' part, there are tools to be downloaded to can detail much more a what can be seen in the apple phone GUI.
                                        Is this iOS 14.6 ?

                                        This is the lease duration as the DHCP server registered my "192.168.2.222" iPhone lease :

                                        lease 192.168.2.222 {
                                          starts 4 2022/03/17 15:52:06;
                                          ends 4 2022/03/17 21:52:06;
                                        ......
                                        

                                        This doesn't mean the DHCP client on the iPhone side will respect this delay.

                                        So, in theory, my iPhone will renew the lease after 3 hours.
                                        But most probably I will walk out of the Wifi covered zone, walk back into it, so the DHCP client will kick in again, and most probably ask a new lease, etc etc.

                                        Btw ; I've read here that there are VLANs in play.
                                        There is another factor, not mentioned because we can't see, smell or hear it :what about the AP used ? These devices are not all equal. What about the equality of the radio waves ? Other radio devices near by ? Is there a micro wave close by that blast out of orbit the frequency range from 0 to 5 Ghz ??

                                        I've been using iStuff from day one, on good AP's and plain crap ones. Very rare that I even suspected that the Apple stuff was doing things wrong. And if so, an Apple update took care of things.
                                        Right know, I"m using iOS 14.x 6 ? (as since this morning) : no issues known to me.

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

                                        E 1 Reply Last reply Reply Quote 0
                                        • E
                                          edpbettinelli @Gertjan
                                          last edited by

                                          @gertjan
                                          I'm trying to create a small factory to be able to test without impacting the company. Soon the wifi bubble created by 60 old AP extreme will be replaced with 50 AP Aruba. I will try factory testing using both an Aruba AP and an old extreme to evaluate any differences. Maybe so I'll have a little clearer ideas. A thousand thanks
                                          Luca

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

                                            Yeah, the iphones could still be requesting a very short lease time. Check the logs to see what they are actually being given.

                                            Steve

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