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

    Internet connexion drop all 10min because my wan IP is on different subnet than default Gateway

    Scheduled Pinned Locked Moved Routing and Multi WAN
    17 Posts 4 Posters 1.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.
    • chpalmerC
      chpalmer
      last edited by

      @Elrick75 said in Internet connexion drop all 10min because my wan IP is on different subnet than default Gateway:

      Gateway = 185.4.79.254/32 (notice /32 !!)

      What gives you the idea that that gateway only has a /32?

      Triggering snowflakes one by one..
      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

      1 Reply Last reply Reply Quote 0
      • E
        Elrick75
        last edited by Elrick75

        It's written under my pfSense page when i start my server.
        When it display me all current interface, i see my "wan ip address/32"

        97b0d182-4718-405a-8209-4521f5d0cd75-image.png

        It has static settings ? DHCP ? > DHCP
        The interface goes down - or connection is just lost ? Cannot say exactly... ping and dns resolve no more working
        What happens when you invert the LAN and WAN assignment ? Not tested

        What is is drivers name of the interface ? How to find it ?
        Bare bone hardware or VM ? Dedicated PC (Dell R230), no VM
        What shows up in the logs ( except the pinger complaining about ping loss) ? See in my previous post below Gateway log

        1 Reply Last reply Reply Quote 0
        • E
          Elrick75
          last edited by

          Any idea ?

          1 Reply Last reply Reply Quote 0
          • chpalmerC
            chpalmer
            last edited by

            @Elrick75 said in Internet connexion drop all 10min because my wan IP is on different subnet than default Gateway:

            When it display me all current interface, i see my "wan ip address/32"

            Nothing anywhere says your gateway address is a /32 and my bet is it is not. Your WAN address definitely is.

            What kind of internet connection is this and who is your ISP? Im to lazy to look.

            Triggering snowflakes one by one..
            Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

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

              The gateway is an IP, pfsense would not have a mask associated with it ;)

              Pfsense can have a mask associated with an IP that is on one if its interfaces, but not a dest IP. A route would have a mask, a firewall rule would have a mask... but a gateway would not have a mask..

              Nor do I get why you think your IP having a /32 would have anything to do with a 10 min cycle of connectivity.. The default arp cache time in pfsense is 20 minutes.. So its not related to loss of mac, and even if it was it wouldn't take 10 mintues to come back.

              If arp was your problem - you could always just create a static arp ;)

              What is the lease time your getting wan IP? look in your /var/db dir you should see a dhclient.leases.interface like mine is .igb1

              renew 5 2019/7/19 01:55:12;
              rebind 5 2019/7/19 10:55:12;
              expire 5 2019/7/19 13:55:12;

              So you can see when its schedule to renew, when it will expire, etc. So what does yours show for your lease on your IP on your wan you got via dhcp?

              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
              • E
                Elrick75
                last edited by Elrick75

                @chpalmer You have "my ip/32 in" just on screenshot copy below with all interface.

                @johnpoz That's my ip address who have /32, not the gateway, but the gateway ip is outside the subnet of my wan ip address.
                My isp provider is K-Net.

                I know that some person use ARPING and CRON to send ARP requests regulary to maintain their connection (avoid connexion drop).
                They suggest to use this command every 5 minutes :
                */5 * * * * root /usr/local/sbin/arping -v -c 3 -i em1 185.4.79.254

                See below DHCP log after start... after 10 minutes, when my connexion is not working, i have no trace in it, same things when my connexion is come back., no more log

                d26b76dd-dfe5-43d4-bf86-941803273b22-image.png

                I edit the file suggested on my WAN interface from command line, here are the result, as you see, lease time is 43200 and didn't match drop connexion timing related.

                029ebf1d-1e65-420f-a5d5-3d790d90030b-image.png

                1 Reply Last reply Reply Quote 0
                • E
                  Elrick75
                  last edited by Elrick75

                  My isp switch my IP configuration from /32 to /24 but it doesn't fix drop connexion every 10 minutes.
                  My isp give me another tips to fix this issue, more clean than ARPING every 5 minutes to keep alive my connexion.

                  I share below the method:

                  Go to System > Advanced
                  a2decb3c-ab70-48cb-9fd7-ddf4e89ca420-image.png

                  Select System Tunables
                  fb2bee0f-2426-4a5c-8921-da616d98b7d8-image.png

                  Click on New button
                  9b6d61d2-f41f-441b-b746-15b9541e27ce-image.png

                  Enter net.link.ether.inet.max_age as Tunable
                  Enter 300 as Value and enter a description
                  Click on Save button
                  819e8cce-875a-4ef7-aa44-6c5c86ffadcf-image.png

                  And voilà, no more connexion drop after 10min.

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

                    You do understand you just lowered the arp cache time from default 20 minutes to 5 minutes right. Is the mac of their IP (your gateway) changing?

                    [2.4.4-RELEASE][admin@sg4860.local.lan]/root: sysctl net.link.ether.inet.max_age
                    net.link.ether.inet.max_age: 1200
                    [2.4.4-RELEASE][admin@sg4860.local.lan]/root: 
                    
                    

                    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
                    • E
                      Elrick75
                      last edited by

                      Yes, they change my IP from /24 to /32 but WAN IP setup was not the root cause because the drop connexion were still present.
                      For unknow reason, adding this line solve my drop connexion issue that i have.

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

                        Not talking about your IP or the mask... I am talking if the mac address of your "gateway" is changing??

                        So any tcp device that wants to talk to an IP that is on its own network, or told that is via that hey gateway is on another network check box will ARP.. Hey who has 192.168.1.1 for example - and you will get back the mac address 00:11:22:33:44:55..

                        Pfsense out of the box will "cache" this for 20 minutes.. So it will not have to arp again for this mac address until that is expired.. So any time it needs to send traffic to 192.168.1.1 it knows what the mac address is.

                        If your gateway which is going to be on the same L2 as you!!! mac address is change then yeah your going to have all kinds of problems... But the mac should NEVER change!! Your setting told pfsense hey only cache that mac for 5 minutes not 20, so its going to have to arp more often.. But the mac should not be changing every X minutes... It should be the same forever, until they actually changed the hardware of their gateway, etc..

                        So what I am asking you is the mac of their gateway IP... What is your gateway IP? Look in your arp table - what is its mac? Check that every so often for a while - is the mac changing??

                        Maybe their end is dropping your mac, unless it sees an arp from you? But there is really no reason you should have to lower the arp cache time for your gateway.. If anything you should be able make it longer ;)

                        example her is mac of my gateway

                        d53-64<snipped>.nap.wideopenwest.com (64.53.xxx.xxx) at 00:01:5c:82:36:46 on igb1 expires in 914 seconds [ethernet]
                        

                        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
                          Elrick75 @johnpoz
                          last edited by

                          Mac address of my gateway seems the same than the previous gateway than i had before switching from /32 to 24.

                          • Old WAN gateway was 185.4.79.254, mac = 74:8e:f8:63:e7:c1
                          • New WAN gateway 185.109.201.254, mac = 74:8e:f8:63:e7:c1

                          For now, i monitor ARP table, when it expire, it remain the same mac address again.

                          dbc6d882-da2f-430c-add0-9ff447f154b3-image.png

                          What do you think about it ?

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

                            Well then you changing the cache default time makes no sense how it could fix anything..

                            Have your isp explain what that setting "fixes" If the mac doesn't change then your cache could be for 10 years ;)

                            Seems like your isp wants to see arps more often than every 20 minutes for whatever reason?

                            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
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.