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

    Connect 4 physical ports to the same switch

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    9 Posts 6 Posters 1.2k 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.
    • N
      njanja
      last edited by

      Hi everyone

      I have a dilemma. I have a network card with 4 ports and a smart switch (Unifi 24 ports)
      I want all 4 ports to have their own ip addresses and all 4 must be connected in the same switch.
      For example:
      I want that port with IP ( 192.168.1.1) 1 on the network card is connected to port 1 on the switch and that ports 2, 3, 4 and 5 have the same sub-net as port 1. (192.168.1.2, 192.168.1.3, 192.168.1.)
      Port 2 with IP ( 192.168.2.1) on the network card connected to port 6 . and port 7, 8, 9, 10 have the same sub-net as port 6. and so on. (192.168.2.2, 192.168.2.3, 192.168.2.4)
      If it goes, I should be very grateful if I can get some pictures of which settings to change

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

        What is the point of setting them to the same subnet?

        If you manage to get it configured, I would think pfSense is going to have no idea which interface to use to send out packets for the subnet.

        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
        • A
          akuma1x
          last edited by

          It sounds to me like you should VLAN all this stuff, so none of these switch ports, and then it turn, none of the network cards, can talk to each other. If you want cross-subnet/VLAN traffic to pass, you simply set up the appropriate firewall rules.

          So, here's how you do it:

          1. Make 4 VLANs in pfsense (see below)
          2. Enable the IP addresses, ranges, and DHCP server settings for each VLAN
          3. Make those same 4 VLANs on your switch and assign them to the appropriate switch ports
          4. Wire it all up and make sure it all works

          Here's how to make VLANs in pfsense:
          https://docs.netgate.com/pfsense/en/latest/book/vlan/pfsense-vlan-configuration.html

          You'll have to read up on your switch instructions to see how to do it there.

          Jeff

          1 Reply Last reply Reply Quote 0
          • NogBadTheBadN
            NogBadTheBad
            last edited by

            LAG the 4 ports and create 4 vlans on the LAG.

            Andy

            1 x Netgate SG-4860 - 3 x Linksys LGS308P - 1 x Aruba InstantOn AP22

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

              What does this have to do with multiwan and routing? Moving this to vlan section.

              You can either do a lagg with your vlans on the lagg like suggestion, or you could do 4 individual uplinks from the switch for your vlans. Or you could just use 1 uplink from the switch with your vlans.

              Or you could do 2 uplinks for 2 vlans each, or 1 and 3, etc..

              All comes down to how much intervlan traffic you will have and what your most comfortable with doing.

              Sounds more like to me you need help with how to setup the vlans in the switch and then on pfsense... What specific switch do you have? Make and Model number.

              You don't even need to setup the vlans in pfsense if you do 4 uplinks for your 4 different layer 2 vlans you setup on your switch.

              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
              • N
                njanja
                last edited by

                Hi

                First I know how to set up VLANS in the pfsensen. But I'm not interested in VLANS.
                That's why I bought a network card with 4 ports. As for the switch I have a US-24-250W. If you have read my thread there I wrote that I have Unifi 24 port.
                I don't want to be nasty to you. But this is how: If you can't answer my question, don't answer.

                If I asked you I can connect 4 ports to the same switch. Then you should answer like this: "Yep it goes or No it can't.
                If it goes then send a link to me so that I can fix or you help me in another way. If we do not, we close the thread and I find another alternative.

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

                  @njanja said in Connect 4 physical ports to the same switch:

                  I want all 4 ports to have their own ip addresses and all 4 must be connected in the same switch.

                  Dude that would be VLANS!!! Period.. Be they are tagged or not.. So not wanting to be NASTY or anything... But maybe you need to go back and do some basic research on networking and tcp.

                  Be it those are tagged or Not tagged they are still vlans!!

                  You DONT run multiple layer 3 over the same layer 2.. So your calling for different subnets means you setup vlans!!

                  So your questions has been more than answered!

                  Also which unifi switch was my point.
                  ES‑24‑LITE
                  US‑24
                  They have the edgeswitch line as well from unifi. They are different in how they do things and their feature set. While the ES can do layer 3 routing, the lower end switch you listed can not do any layer 3 routing. So your "vlans" would have to be routed at pfsense!

                  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
                  • A
                    akuma1x
                    last edited by akuma1x

                    Ok, nobody has asked this yet... but, what are you trying to do by using all 4 ports on the network card inside of the pfsense box, and then in turn, using 5 ports on the switch in the same subnet as the pfsense NIC? Are you trying to get the 4 open ports on the switch to only talk with that one nic port on pfsense (that's the default behavior with separate subnets), then repeat that same process 4 different times? That's what it sounds like to me.

                    Are you going to plug 4 devices into those 4 open ports, then do some network-y kinds of things with them? File servers, wireless access points, workstations, NAS boxes, more switches, etc.?

                    I'm being serious now, this might help us answer you better.

                    Jeff

                    1 Reply Last reply Reply Quote 0
                    • DerelictD
                      Derelict LAYER 8 Netgate
                      last edited by Derelict

                      If you want all 4 ports to go to the same switch on 4 different broadcast domains then just connect all 4 ports to 4 untagged switch ports on 4 separate switch VLANS.

                      Pretty much nobody would do that because VLANs are much more flexible but if that's what you want, knock yourself out.

                      Chattanooga, Tennessee, USA
                      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                      Do Not Chat For Help! NO_WAN_EGRESS(TM)

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