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

    Subnet mask - Dont recieve correct

    DHCP and DNS
    3
    13
    997
    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.
    • A
      AcidSleeper
      last edited by

      Hello
      I am going to change the router and have had some problems with the new router (PfSense) that it got 100% packet loss and no internet. Got IP address assigned but nothing else happened. I drive with Swedish provider Servanet via Inleed ISP.

      I got a netmask of 255.255.255.0 on the new router, but my old router got 255.255.255.128. So I changed Pfsense to ...128 and then everything worked brilliantly.
      The subnet mask should be assigned automatically!?

      My main question: Why did I get the wrong subnet mask and can I correct this somehow in pfsense without having to hardcode this in the Interfaces --> WAN: Section - Lease Requirements and Requests: Options modifiers?

      Thanks in advance!

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

        @AcidSleeper so your saying you got an IP via dhcp on your wan, but it got /24 vs the /25 you should of gotten?

        What exactly did you change to either get the 25 or did you just set the IP you got from dhcp as static.

        Yes the mask should be given to you via dhcp.. Dhcp not really going to work if don't hand you the mask.. I would sniff your dhcp traffic and see exactly what is is being handed to you..

        Here is just did a sniff locally vs having doing on my wan.. But you can see the info you want to look for.

        So the client isn't going to ask for a mask, it might ask for its old IP, etc.. But you see the server would send the mask.

        dhcp.jpg

        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.7.2, 24.11

        A 1 Reply Last reply Reply Quote 0
        • A
          AcidSleeper @johnpoz
          last edited by

          @johnpoz I started with a fresh install of Pfsense. Nothing added.

          Started right away to get 100% packet loss. I thought that I had done something wrong so I started fresh again but the same problem.
          It wasn´t after I checked against the old router that I found that the subnet mask wasn´t the same. So after I added 255.255.255.128 to Pfsense it started working.

          Cant explain in some other ways. Sorry.

          I called my ISP and they couldn´t (or wouldn´t) explain it to me but confirmed that I should have 255.255.255.128 as my subnet mask and nothing else. Dont know why pfsense couldn´t get it right.

          V johnpozJ 2 Replies Last reply Reply Quote 0
          • V
            viragomann @AcidSleeper
            last edited by

            @AcidSleeper
            Seems strange and I don't believe, that pfSense sets the mask on it's own. It probably gets the setting from the ISP.
            But to ensure what you get from the DHCP server, sniff the DHCP traffic as @johnpoz suggested.

            If you get the wrong mask show the capture to your ISP, if not we can further investigate the issue on your site.

            A 1 Reply Last reply Reply Quote 0
            • A
              AcidSleeper @viragomann
              last edited by

              @viragomann @johnpoz

              I reinstalled pfsense. I followed this guide: https://nguvu.org/pfsense/pfsense-baseline-setup/ for JUST the setup wizard.

              RESULT: No Internet.

              Lan - Getting ip via dhcp: 192.168.1.100
              Wan - Getting ip via dhcp (ISP says dhcp): 192.121.xxx.xxx
              Subnet mask is 255.255.255.128 (ISP says that correct)

              Gateway - 100% packet loss. offline.

              If I connect a computer directly to the wan-port on the modem I get the same ip-adress and internet work. No connection issues.

              Since Im new at pfsense, where do I go to create log for sniffing dhcp?

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

                @AcidSleeper said in Subnet mask - Dont recieve correct:

                I should have 255.255.255.128

                And how exactly are you setting that when you get a dhcp address with a /24 Pfsense doesn't allow you to change that if you dhcp..

                What are you setting here?

                change.jpg

                That gets you /25 (255.255.255.128) or where else are you changing it? How are you changing it?

                And to be honest not sure how it would matter.. Being on a larger mask shouldn't matter.. Now being on a /25 and needing to be on a /24 could be an issue..

                For example me pfsense is /24 if I change my box to a /23 I can still talk to my gateway..

                While it would screw up talking to other things on the network.. Because you might think something is local when you would need to send to your gateway vs just arping for it.

                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.7.2, 24.11

                A 1 Reply Last reply Reply Quote 0
                • V
                  viragomann @AcidSleeper
                  last edited by

                  @AcidSleeper said in Subnet mask - Dont recieve correct:

                  Gateway - 100% packet loss. offline.

                  The gateway monitoring is done by pinging it. If there are 100% packet loss and the gateway is shown up as offline, pfSense doesn't get a response from it.
                  Could be that the gateway is not reachable, but could also be that it simply doesn't respond to ping.

                  Go to Diagnostic > Ping in pfSense and ping any other address you know, it responses, e.g. 8.8.8.8.

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

                    @viragomann that is what is odd to me..

                    Lets say he is suppose to have 1.2.3.X, with a /24 vs a /25 how would that gateway be outside this gateway be outside his mask? Now if he was suppose to have a /24 and was getting /25 I could see how that could be a problem.

                    But a gateway sent and on a /25 would still be on the clients network if they set a /24

                    I am not even sure how you could correct getting the wrong mask from dhcp.. Without changing to static and manually setting it? So like to know how exactly he is changing to a /25 If his dhcp is handing him a /24

                    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.7.2, 24.11

                    1 Reply Last reply Reply Quote 0
                    • A
                      AcidSleeper @johnpoz
                      last edited by AcidSleeper

                      @johnpoz said in Subnet mask - Dont recieve correct:

                      What are you setting here?

                      Something must have been wrong egen I got 255.255.255.255 but nog I get …128 with a new install of Pfsense.
                      I followed this: ```
                      https://forum.netgate.com/topic/174919/pfsense-random-loss-of-wan-gateway/3
                      Perhaps I that didnt fully understand. So plz ignore that since I now have a new install.

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

                        @AcidSleeper So you are working now? And what do you show for your mask?

                        You can look under status of interfaces..

                        mask.jpg

                        That link has to do with renewal of an IP.. What exactly where you setting and where.. Doesn't really matter I guess if your working now.. Without any changes to anything in the dhcp options?

                        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.7.2, 24.11

                        A 1 Reply Last reply Reply Quote 0
                        • A
                          AcidSleeper @johnpoz
                          last edited by

                          @johnpoz Sorry but its not working. Dont have internet. Getting the right gateway, mask and ip but still 100% packet loss.

                          Namnlös.jpg

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

                            @AcidSleeper and does the gateway show up?

                            As mentioned some gateways might not answer ping.. You have your 255.255.255.128 mask. or they might stop after pfsense sends X amount of them.. Out of the box pfsense sends a ping like every half second.. Some devices might not like that, etc.

                            if your gateway is not showing up - then no pfsense wouldn't try to send traffic there..

                            Set your gateway to be forced online.. Does internet work then, ping some IP like 8.8.8.8 that is known to answer.

                            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.7.2, 24.11

                            A 1 Reply Last reply Reply Quote 0
                            • A
                              AcidSleeper @johnpoz
                              last edited by AcidSleeper

                              @johnpoz after some pondering and tearing my hair I gave up and yet again reinstalled pfsense from scratch.

                              I started pfsense with a cable from modem to pfsense wan (eth0) and a cable to windows computer on lan (eth1).
                              It started and I did have internet. I could run ping, trace etc on pfsense. I could also surf on My computer without problem.
                              I didnt run ”setup wizard”.

                              Now I did a test and changed one thing: from Interfaces - Wan I removed ”dhcp6” to ”none” since I dont have anyipv6.

                              Result: cant ping etc and dont have internet on computer.

                              Changed back the one and only setting. No change, still cant ping or do anything on the internet.

                              Whats wrong?

                              Ps. Soon I Will throw this hardware thru the wall.

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