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

    How to set the same VLANs between the switch and PfSense

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    102 Posts 6 Posters 19.7k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator @JT40
      last edited by johnpoz

      @jt40 said in How to set the same VLANs between the switch and PfSense:

      192.168.200.1 is the IP management interface for the WebUI, it doesn't correlate with other IP communications for my knowledge.

      That makes no sense - the management IP of pfsense would be its LAN IP.. Or you could manage with any IP on pfsense as long as your rules allow access. Where did you set this 192.168.200.1 address??

      255.555.0.0 subnet mask on both devices (modem/router and PfSense

      Well that is a PROBLEM.. that means anything 192.168.x.x is the same network.. So 192.168.140 and 192.168.anything else would overlap - you can not do that. and expect anything to actually work.

      If your device in front of pfsense is using 192.168.140/16, you have to pick something other than 192.168 for your LAN side network 10.x.x.x network or 172.16-31.x.x network.

      Pfsense wouldn't even allow you to actually do that - if you were setting static IPs on both wan and lan. But if wan is dhcp and gets a 192.168/16 network - then yeah that could overlap with your lan network.. 192.168.140 would normally be a 255.255.255.0 or /24 network.. Then you could use any other 192.168.x/24 network or even other masks like /23 or /22 etc.. as long as they do not overlap with the 192.168.140/24 network.

      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

      J 1 Reply Last reply Reply Quote 0
      • J
        JT40 @johnpoz
        last edited by

        @johnpoz Thank you, I need to tell you more about it.

        After your recommendation to remove the gateway, without gateway the connection works as it is written in the previous graph, despite it's wrong as you say.
        I think it's wrong in theory, not in practice, plus I'll be assigning the IPs manually and the DCHP IP point of start won't bother me at all.
        Plus, being on the same network doesn't scare my use case, as long as I use VLANs, am I wrong?
        I do agree that this is the wrong way to design a network, I'll change it if my modem/router allows a different range, determined by a different subnet mask.

        I still can't manage the switch connection though... I've set the IP from the switch interface (on Pfsense), but whatever device I plug in, for example with IP manually assigned of 10.9090.91 and beyond, it doesn't work.

        Quoting you

        192.168.140 would normally be a 255.255.255.0 or /24 network..
        

        I have another router sitting on 192.168.5.1, hence why I've chosen 255.255.0.0 mask, am I wrong?
        I mean, I need to be able to change x.x.N.x , for that I need 255.255.0.0 mask as far as I know.

        S 1 Reply Last reply Reply Quote 0
        • S
          SteveITS Galactic Empire @JT40
          last edited by

          @jt40 if 192.168.0.0/16 is the WAN then you can use whatever address you want in that range, but those devices all need to be in the WAN. Otherwise pfSense won’t know where to route packets.

          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
          Upvote 👍 helpful posts!

          1 Reply Last reply Reply Quote 0
          • J
            JT40
            last edited by

            I can't setup an IP range of 172.x.xx. or 10.x.x.x from the modem/router, I precisely tried to reserve that IP address, nothing.

            Not sure why, I guess it's a limitation of these crappy ISP devices.
            What choice remains?
            It seems anything of a range like 192.168.x.x
            Well, not even that it's supported :D
            I tried 192.169.x.x or 192.166.x.x, it says both are out of range with a mask of 255.255.0.0

            S johnpozJ 2 Replies Last reply Reply Quote 0
            • S
              SteveITS Galactic Empire @JT40
              last edited by

              @jt40 you can use 192.168.x.x for your pfSense WAN just fine. You just can’t also use it on other interfaces.

              Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
              Upvote 👍 helpful posts!

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

                @jt40 said in How to set the same VLANs between the switch and PfSense:

                I can't setup an IP range of 172.x.xx. or 10.x.x.x from the modem/router, I precisely tried to reserve that IP address, nothing.

                Well use that range on your lan then behind pfsense.

                I have another router sitting on 192.168.5.1

                And where was that on your drawing? Dude can not help you if get wrong or missing info..

                Where and the F does this router sit?? is that some network behind a wifi router doing nat?

                Not sure why, I guess it's a limitation of these crappy ISP devices.

                What device does not let you change the lan IP address? You can not just change the scope of the dhpc, you have to change its lan IP!

                I mean, I need to be able to change x.x.N.x , for that I need 255.255.0.0 mask as far as I know.

                What?? Why do you need to change that? Dude You seem to have a REAL mess - none of this stuff was in your drawing - there was no masks set on anything in your drawing, etc. Still haven't answered where you setup 192.168.200.1 on pfsense, etc..

                I tried 192.169.x.x or 192.166.x.x, it says both are out of range with a mask of 255.255.0.0

                Why would you think that is valid? Maybe its time you do a bit a research on what network is and what the masks actually means.. And what the valid rfc1918 space is 10/8,192.168/16,172.16/12

                Your going to have a real hard time getting anything working, especially if your goal is to have multiple vlans/networks without understanding the basic concepts.

                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

                J 1 Reply Last reply Reply Quote 1
                • J
                  JT40 @SteveITS
                  last edited by

                  @steveits Every interface has its own IP, that's for sure.

                  1 Reply Last reply Reply Quote 0
                  • J
                    JT40 @johnpoz
                    last edited by

                    @johnpoz
                    Ok for the LAN, I'll use something like 192.168.140.130 as it is right now.

                    I didn't represent the other router because it will be removed, I just mentioned it as an example, but in any case it's like that, it's after the modem/router with IP 192.168.5.1, manually assigned in the modem/router, it works fine.
                    The machines behind have IPs like 192.168.5.2 and so on...

                    I need to clarify that also the IP 192.168.20.1 can't be reserved on the modem/router, which means that I can't reserve anything else, only 192.168.0.x seems faultless, I just wonder how I've set up 192.168.5.1 at this point.....
                    It keeps saying that the address is out of range.

                    I think I know what do you mean about that range, you mean that I can't set up something like 192.169.x.x, but I can set 192.168.x.x, is it right?

                    I don't use DHCP at the moment to avoid complexity.

                    I've set up 192.168.200.1 on my Pfsense on a dedicate port for management (pfsense management or WebUI).
                    This IP doesn't have anything to do with the rest of the production network, I have direct access to it, that's how I manage the Pfsense box, as well as any other if I need to.
                    I just assigned this custom address for the management, sorry for the confusion.
                    Do you see anything bad here?

                    S johnpozJ 2 Replies Last reply Reply Quote 0
                    • S
                      SteveITS Galactic Empire @JT40
                      last edited by

                      @jt40 said in How to set the same VLANs between the switch and PfSense:

                      I'll use something like 192.168.140.130 as it is right now.

                      You can't, if the WAN is 192.168.anything.anything/16. In that config pfSense "knows" anything in that subnet is on the WAN so it will get confused if traffic is also on any other interface. So you can't use 192.168.200.x or anything else, on other interfaces.

                      192.169.x.x is a public IP block.

                      Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                      When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                      Upvote 👍 helpful posts!

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

                        @jt40 said in How to set the same VLANs between the switch and PfSense:

                        need to clarify that also the IP 192.168.20.1 can't be reserved on the modem/route

                        What, what device make and model is this device.. There is no freaking way they do not let you change the lan IP and force a /16 mask... Just no freaking way.

                        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

                        J 1 Reply Last reply Reply Quote 0
                        • J
                          JT40 @johnpoz
                          last edited by JT40

                          @johnpoz said in How to set the same VLANs between the switch and PfSense:

                          @jt40 said in How to set the same VLANs between the switch and PfSense:

                          need to clarify that also the IP 192.168.20.1 can't be reserved on the modem/route

                          What, what device make and model is this device.. There is no freaking way they do not let you change the lan IP and force a /16 mask... Just no freaking way.

                          Sky Hub, 2 ethernet ports.

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

                            @jt40

                            https://helpforum.sky.com/t5/Broadband/Changing-LAN-IP-subnet-address/td-p/3736225

                            https://setuprouter.com/router/bskyb/sky-hub/ip-address.htm

                            changeIP.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

                            J 1 Reply Last reply Reply Quote 0
                            • J
                              JT40 @johnpoz
                              last edited by

                              @johnpoz Thanks mate, I know it :D
                              But it says that it's out of range.
                              Let me post you the current config.

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

                                @jt40 says what is out of range your dhcp server?

                                And again doesn't matter leave that at 192.168/16 - that has zero to do with what pfsense can use on its lan side interfaces. Set them to 10 or 17.16-31 space.. There you go no possible way to have a overlap or routing problem based up some shit /16 mask on your wan in 192.168 land.

                                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

                                J 1 Reply Last reply Reply Quote 0
                                • J
                                  JT40 @johnpoz
                                  last edited by JT40

                                  @johnpoz here's the config.

                                  LAN TCP/IP SETUP

                                  • IP Address: 192.168.3.1
                                  • IP Subnet Mask: 255.255.0.0

                                  Use router as DHCP server (checked, some device is on the modem/router directly at the moment)

                                  • Starting IP Address: 192.168.0.2
                                  • Ending IP address: 192.168.255.254 (I think it was precompiled, I don't recall to have set it)

                                  Address reserved

                                  • 192.168.140.130 (uplink port of Pfsense), all the communications should pass through this port, I don't know how to set it up from PfSense at the moment.

                                  I also agree that the IP range of the modem/router shouldn't cause issues on the other side of PfSense, but there is the struggle, I can't get internet there, no ping, no routing works.

                                  The error message says: the IP is out of range, that's it.

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

                                    @jt40 your still using shit /16 mask.. WHY???

                                    The error message says: the IP is out of range, that's it.

                                    What says that?? If you set an IP of 192.168.140/24 and try and point it to a gateway of 192.168.0.1 then yeah that is out of range because its not in the 192.168.140 network.

                                    Dude change the mask on your router to 255.255.255.0 - there is no possible way have 65k some clients needed on this network.. Why would you think in any way that a /16 makes any sense??

                                    If you want to use 192.168.140/24 as pfsense - then set your router to 192.168.140.1 and pfsense to 192.168.140.2 both with /24 or 255.255.255.0 masks.

                                    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

                                    J 1 Reply Last reply Reply Quote 0
                                    • J
                                      JT40 @johnpoz
                                      last edited by

                                      @johnpoz said in How to set the same VLANs between the switch and PfSense:

                                      @jt40 your still using shit /16 mask.. WHY???

                                      The error message says: the IP is out of range, that's it.

                                      What says that?? If you set an IP of 192.168.140/24 and try and point it to a gateway of 192.168.0.1 then yeah that is out of range because its not in the 192.168.140 network.

                                      Dude change the mask on your router to 255.255.255.0 - there is no possible way have 65k some clients needed on this network.. Why would you think in any way that a /16 makes any sense??

                                      If you want to use 192.168.140/24 as pfsense - then set your router to 192.168.140.1 and pfsense to 192.168.140.2 both with /24 or 255.255.255.0 masks.

                                      No, it fails when I simply try to reserve the address, I need to reserve it because I can't have DHCP for the Pfsense Uplink.
                                      I don't understand why it's wrong, CIDR looks correct to me.

                                      I could change the mask to 255.255.255.0, but then I would not be able to change the range in this way 192.168.x.x, am I wrong?
                                      Or you are telling me that for the uplink is not necessary to be outside of that range? Basically 192.168.0.5 would be just fine for you?

                                      Just a note, the rest of the PfSense interfaces can't be on that range, so can I set them to 10.x.x.x like the switch?

                                      johnpozJ S 2 Replies Last reply Reply Quote 0
                                      • johnpozJ
                                        johnpoz LAYER 8 Global Moderator @JT40
                                        last edited by

                                        @jt40 said in How to set the same VLANs between the switch and PfSense:

                                        No, it fails when I simply try to reserve the address

                                        Show us..

                                        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

                                        J 1 Reply Last reply Reply Quote 0
                                        • S
                                          SteveITS Galactic Empire @JT40
                                          last edited by

                                          @jt40 I am still a bit confused but it sounds like you're unclear on how subnet masks work. In the simplest explanation, "255" means "this part of the address must match." So 192.168.0.0 with 255.255.0.0 (a /16) means "any address that starts with '192.168' is on this interface."

                                          You can use 192.168.0.0/16 on one interface but then can't use any 192.168.x.x addresses on any other interfaces. Or, you can use 192.168.1.x with a 255.255.255.0 (/24) mask on one, 192.168.2.x on another, etc.

                                          If you expect less than 254 devices on a network then it's fine to use 255.255.255.0 on that interface/network. You can use a larger subnet, but it's not necessary.

                                          Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                                          When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                                          Upvote 👍 helpful posts!

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

                                            @steveits Im also a bit confused on "where" he is trying to set what.. Is he trying to set it on the isp device?

                                            If he trying to set it on wan, then yeah 192.168.140/16 is going to overlap if he has any 192.168 on pfsense other interfaces.

                                            And it could even overlap with 192.168.140/24 on wan if he has some /16 on other pfsense interface. He has some management interface he set to something in 192.168

                                            edit: But pfsense shouldn't say out of range - it would say overlap and should show you what is overlapping. Here I just tried to change one of my test interfaces to a /16 mask

                                            outofrange.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

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