Connect 4 physical ports to the same switch
-
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 -
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.
-
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:
- Make 4 VLANs in pfsense (see below)
- Enable the IP addresses, ranges, and DHCP server settings for each VLAN
- Make those same 4 VLANs on your switch and assign them to the appropriate switch ports
- 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.htmlYou'll have to read up on your switch instructions to see how to do it there.
Jeff
-
LAG the 4 ports and create 4 vlans on the LAG.
-
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.
-
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. -
@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! -
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
-
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.