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

Same Networks in different VLANs

Scheduled Pinned Locked Moved L2/Switching/VLANs
21 Posts 7 Posters 2.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.
  • J
    JKnott @dotdash
    last edited by Apr 11, 2022, 5:29 PM

    @dotdash

    Multiple routing tables on the same device? Never heard of it.

    Assume you have a packet coming in on interface A for 10.0.0.15 and you have two interfaces both with the 10.0.0.0 /whatever subnet. How does the router know which interface to choose? Imagine you're looking for an apartment and you're standing in front of two buildings with the same street address. Which building do you go into, to find that apartment? There's also the possibility that the apartment number you're looking for is in both buildings. Which way do you go?

    PfSense running on Qotom mini PC
    i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
    UniFi AC-Lite access point

    I haven't lost my mind. It's around here...somewhere...

    L 1 Reply Last reply Apr 11, 2022, 5:32 PM Reply Quote 0
    • J
      JKnott @lucderheld
      last edited by Apr 11, 2022, 5:30 PM

      @lucderheld

      Yes. You give them different subnets and perhaps use VLANs.

      PfSense running on Qotom mini PC
      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
      UniFi AC-Lite access point

      I haven't lost my mind. It's around here...somewhere...

      L 1 Reply Last reply Apr 11, 2022, 5:35 PM Reply Quote 0
      • L
        lucderheld @JKnott
        last edited by Apr 11, 2022, 5:32 PM

        @jknott said in Same Networks in different VLANs:

        @dotdash

        Multiple routing tables on the same device? Never heard of it.

        Assume you have a packet coming in on interface A for 10.0.0.15 and you have two interfaces both with the 10.0.0.0 /whatever subnet. How does the router know which interface to choose? Imagine you're looking for an apartment and you're standing in front of two buildings with the same street address. Which building do you go into, to find that apartment? There's also the possibility that the apartment number you're looking for is in both buildings. Which way do you go?

        Oh that’s easy: the subnets have different vlan tags.

        J 1 Reply Last reply Apr 11, 2022, 6:18 PM Reply Quote 0
        • L
          lucderheld @JKnott
          last edited by Apr 11, 2022, 5:35 PM

          @jknott

          Ok but it is not possible to have for example a vlan 10 for customer 1 and a vlan 20 for customer 2, then route wan requests from vlan 10 and vlan 20 to wan and let the customer use whatever networks they wanna use?

          In my understanding this is one of the benefits of vlan to reuse ip ranges.

          J 1 Reply Last reply Apr 11, 2022, 6:19 PM Reply Quote 0
          • V
            viragomann @lucderheld
            last edited by Apr 11, 2022, 5:44 PM

            @lucderheld
            Bridging interfaces is basically only recommended if there is no other option, i.e. if your really need both sides to be in the same L2 network. From your upper post, I was thinking you're looking for this.

            @lucderheld said in Same Networks in different VLANs:

            @viragomann
            Hmm, I want to keep the networks separated from each other. Is this possible too?

            Yes, you can still filter on member interfaces after they are added to a bridged.

            In System > Advanced > System Tunables there are two tunes which control the filtering typ:

            • net.link.bridge.pfil_member
            • link.bridge.pfil_bridge

            By default filtering on interface member is enabled.

            L 1 Reply Last reply Apr 11, 2022, 6:37 PM Reply Quote 0
            • J
              JKnott @lucderheld
              last edited by Apr 11, 2022, 6:18 PM

              @lucderheld said in Same Networks in different VLANs:

              Oh that’s easy: the subnets have different vlan tags.

              Routers filter on address, not VLAN tag. A VLAN is no different than another interface in this respect. You're still back at the point of deciding which way to go when standing in front of the two apartment buildings.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

              L 1 Reply Last reply Apr 11, 2022, 6:34 PM Reply Quote 0
              • J
                JKnott @lucderheld
                last edited by Apr 11, 2022, 6:19 PM

                @lucderheld

                You can have as many VLANs as you want. You can't have the same subnet on them, if you expect routing to work.

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                1 Reply Last reply Reply Quote 0
                • L
                  lucderheld @JKnott
                  last edited by Apr 11, 2022, 6:34 PM

                  @jknott said in Same Networks in different VLANs:

                  @lucderheld said in Same Networks in different VLANs:

                  Oh that’s easy: the subnets have different vlan tags.

                  Routers filter on address, not VLAN tag. A VLAN is no different than another interface in this respect. You're still back at the point of deciding which way to go when standing in front of the two apartment buildings.

                  Hmm. Two different Interfaces and two different vlans. This should be somehow doable.

                  In your apartment example you would have two apartments with the same number in two different buildings.

                  If this is not possible at the moment hopefully someone will build it. Like QinQ is doing it with vlans.

                  J 1 Reply Last reply Apr 11, 2022, 6:43 PM Reply Quote 0
                  • L
                    lucderheld @viragomann
                    last edited by Apr 11, 2022, 6:37 PM

                    @viragomann

                    Sounds interesting! I will give it a try, but for now start with different subnets. Thanks for your input.

                    1 Reply Last reply Reply Quote 0
                    • J
                      JKnott @lucderheld
                      last edited by Apr 11, 2022, 6:43 PM

                      @lucderheld said in Same Networks in different VLANs:

                      Hmm. Two different Interfaces and two different vlans. This should be somehow doable.

                      There is no way pfSense or any other router can have the same subnet on more than one interface/VLAN. It just won't work!

                      PfSense running on Qotom mini PC
                      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                      UniFi AC-Lite access point

                      I haven't lost my mind. It's around here...somewhere...

                      D 1 Reply Last reply Apr 11, 2022, 7:33 PM Reply Quote 0
                      • D
                        dotdash @JKnott
                        last edited by Apr 11, 2022, 7:33 PM

                        @jknott
                        Not pfSense, correct, but any enterprise router has support for multiple routing tables. With Cisco, you can group interfaces by VRF- each VRF has a separate routing table. As I mentioned before FreeBSD supports this, and a feature request to put support in pfSense was submitted and ignored years ago. For more information, see the man page https://www.freebsd.org/cgi/man.cgi?query=setfib&apropos=0&sektion=0&manpath=FreeBSD+12.3-stable&arch=default&format=html

                        J 1 Reply Last reply Apr 11, 2022, 8:56 PM Reply Quote 0
                        • J
                          johnpoz LAYER 8 Global Moderator @dotdash
                          last edited by johnpoz Apr 11, 2022, 9:01 PM Apr 11, 2022, 8:56 PM

                          @dotdash said in Same Networks in different VLANs:

                          but any enterprise router has support for multiple routing tables

                          Not sure I would say any ;) But sure most enterprise layer 3 switches or actual routers most likely do have support for VRF.. Those normally come with a pretty hefty price tag as well..

                          You could do it in TNSR I do believe

                          https://docs.netgate.com/tnsr/en/latest/routing/route-tables.html#virtual-routing-and-forwarding

                          Which is more their actual "enterprise" level product... While sure there are many enterprises using pfsense.. if your to the point where your needing to use VRFs.. Are you going to be running pfsense on some DIY box?

                          You could for sure have multiple networks with the same IP ranges in your network, you just can not currently route them on the same "router" VRF is a virtual router.. So its like running more than 1 router on the same hardware, etc.

                          You might be able accomplish what your after on the same hardware, by running different pfsenses as VMs on the hardware your wanting to use.

                          Where we use VRFs is for customer isolation, where we share hardware between customers in the DC, etc. Normally this hardware is pushing a lot of packets.. If was looking to replace one of those boxes it would most likely need to run TNSR just to be able to push the packets.

                          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

                          D 1 Reply Last reply Apr 11, 2022, 10:04 PM Reply Quote 0
                          • D
                            dotdash @johnpoz
                            last edited by Apr 11, 2022, 10:04 PM

                            @johnpoz
                            I don't have any need for multiple fibs in pfSense, and think the OP should just use different networks for the vlans. I was just replying the original statement that you can't have duplicate or overlapping networks on ANY router. I've dealt with VRFs mostly with Cisco gear, but I remember Extreme switches supported it and well as Juniper, etc. I'd make the argument that a router with multiple routing tables is just that and not actually several routers, so I stand by my original statement.

                            J 1 Reply Last reply Apr 11, 2022, 10:09 PM Reply Quote 0
                            • J
                              johnpoz LAYER 8 Global Moderator @dotdash
                              last edited by Apr 11, 2022, 10:09 PM

                              @dotdash said in Same Networks in different VLANs:

                              multiple routing tables is just that and not actually several routers

                              We could debate semantics I guess ;)

                              To "me" VRF is actual another router.. Since it is a whole set of new routing tables, and sure other interfaces.. Even if they are "virtual"

                              "Virtual routing and forwarding (VRF) is an IP-based computer network technology that enables the simultaneous co-existence of multiple virtual routers (VRs) as instances or virtual router instances (VRIs) within the same router."

                              think the OP should just use different networks for the vlans

                              We agree here ;)

                              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
                              17 out of 21
                              • First post
                                17/21
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                This community forum collects and processes your personal information.
                                consent.not_received