Unifi and pfsense issues

I just bought a 48 port unifi switch with 500w poe at a steal, got a offer which was to good to pass up.

But now im having issues with setting it up and i could use some help.

I have a pfsense which has vlans 10, 20, 30 and 40 ech with dhcp enabled. Every vlan is trunked to a cisco switch useing LACP and every vlan works on said switch.
The unifi switch is then connected to the with a aggregated uplink to the cisco switch and it allows every profile.
On one of the unfi ports there is a trunk for a Cisco access point which then split vlans 10, 20 and 30 depending on which SSID you connect to.
So far everything works

But, when I try to connect a PC to a unifi port it wont work. I specify that the port profile should be the vlan i want the PC to be on, but the PC wont get any IP from pfsense.
However, it worked perfectly for vlan 20, but not vlan 10, 30 or 40.

I dont know what the issues is, every tip is appreciated

If I understand your problem correctly, the vlans are working correctly on some of the Unifi switch ports, but not others. I would double check the Switch Port Profile for the port you are plugging your PC into. Choose only the vlan you need to pass to the PC.

It works just fine with the access point which is a trunk port.
But if I specify a port with a profile of one of the vlans, meaning turning it into a access port, thats when the PC cant get a dhcp IP adress.
But the even weirder thing is, for vlan 10, 20, 40 and 50 it doesnt work, but magically, vlan 30 does.

Here is the setup:

Look in Settings > Networks in the Unifi controller and see if there is any difference in the way they are configured.

Got 5 vlan-only networks vid id 10, 20, 30, 40 and 50, not much to play around with there.

It sounds like there is a config issue somewhere, but where is the question. You could try going directly from pfsense to the Unifi switch. If that works, then you would know that the config in the Cisco switch has an error/bug. The only other thing I can think of is to trying a different port, especially one you know has passed the vlan, to see if it is a hardware issue. Hopefully someone else will have answer for you. I’m out of ideas at the moment.

Yeah this is a issue ive never seen before.

So far all the port experience the same thing, access ports doesnt work except for vlan 30, but all the trunk ports works as intended.
Since all the vlans goes to the access point and there is no issues there menas thaht unifi get all the vlans, but why day cant go out to a port is wierd.

In addition to the above recommendation, I would double check your pfsense firewall rules, subnet assignments and DHCP settings.

So I finally got home and started playing around a bit more.

As it turns out, bypassing the cisco switch and connecting the unifi switch directly to pfsense solved the problem. I can now plug my PC into any port and it will receive an dhcp ip address according to the vlan for said port.

So the problem is with the connection between the Cisco and the Unifi switch.
Ive tried with both link aggregated ports and a single trunk but the issue is still there.
Does anyone know of a confirmed working cisco config for trunks?

This is what I use for trunking on a Cisco

conf t
int range <port range> 
no switch port-se
switchport trunk encap dot
switchport mode truck
show run

Okey so i have now tried your Cisco config and it still doesnt work correctly.

Somehow the vlans wont go correctly between the switches.
But they work fine on thea cisco or the unifi if they are connected to the pfsense, but the swtich connected to the other switch wont get the vlans to work correctly.

This is so annoying. ANy more tips?

Can you post the output of sh run on the Cisco?

Are you still using the Unifi switch? If so, can you post a screen capture of your VLAN config and then the port map? Same for your pfSense VLAN settings. I’ve attached examples of mine that work.

I can only add one photo. SMH Lets try to reply and add 2nd photo

Have you tried just connecting the cisco to the unifi port to port and simply trunking on both ends? No aggregation / uplink settings - single port?

I got the problem sorted out, but exactly what and why it works now I do not know.
But what I never announced a untagged vlan from my pfsense to my first switch.
So i created a new untaged vlan on the same interface and somehow that solved everything.

Thanks for all the help :smiley: