HP switch and vlan

  • Trying to setup vlan in HP switch connected to pfsense and Unifi AP.

    1. Wireless network is assigned vlan 20.
    2. Vlan 20 is created and DHCP enabled for subnet is .20.1
    3. HP switch is connected to a Unifi switch on port 23 and 24 (LACP).
    4. On vlan port config, checked tagged only and assign PVID = 20.
      But device connected cannot pull an IP and AP lost connection to controller. If check ALL, AP connects to controller again.
    5. I know VLAN 1 should not be use for HP switch.

    Can't seem to find a writeup on how to setup vlan on HP switch.

  • @moosport

    I am not familiar with the new HP series, I used to deal with them.

    I mean, I have an idea since we've been deal with Cisco for a long time.
    For Cisco, if you are using LACP, the VLAN must be configured separately under LACP and also separately on the ports too (in your case 23 and 24)

    (Yes, VLAN1 is usually always native (on switches / for mng.))

    It may help if the philosophy at HP is similar.☺

    Somehow, so in the case of Cisco:

    for ports:


    for VLANs


    Until, that doesn't happen, the VLAN will not pass through the ports associated with the LACP.
    At least that's the case with Cisco

  • the switch is question is 1800-24G. I suppose all traffic needs to be tagged in order for vlan to work properly.

  • I don't know the GUI, just the HP CLI:

    conf t
    vlan x tagged trk1
    vlan x untagged trk1

    vlan 1 untagged is needed for STP, MSTP.

    You have to deal vlan based and set the ports tagged oder untagged.

    HP LAG:
    trunk ethernet 23 trk1 lacp

    My pfsense uplink at HP 2520G-24 looks like:
    untagged vlan 1
    tagged vlan 11-20

    Switch Management works with a vlan ip set and a default GW what goes with it.

    Unifi AP:
    vlan 1 untagged 5
    vlan 18 tagged 5

  • @moosport

    I will try to find a description of this switch, but in the meantime...

    the following:

    HP switch to Unifi switch, a trunk must be created
    (between two switches are usually required to pass through any VLAN later)

    • the trunk also (cleverly) gets a LACP (LAG)
      (because the VLANs consumes bandwidth)

    everything on the trunk except VLAN1 is tagged, VLAN1 is untagged, because it is native

    as I wrote, to Cisco it is not enough to have only ports associated with a VLAN
    but it is also necessary to assign the LAG (with LACP) on the trunk itself to a VLAN (of course, to which the ports are also assigned)

  • @NOCling said in HP switch and vlan:

    trunk ethernet 23 trk1 lacp
    My pfsense uplink at HP 2520G-24 lo

    This is interesting.. on the Unifi AP, what gets assign to vlan 1? The IP for the AP? The APs are all connected to the Unifi switch

  • Vlan 1 is use for Switch Management, my internal Clients, SSID 1 and Switch, AP Management.

    But you can set SSIDs to Tagged Vlan only, it is your decision.

  • @NOCling
    SSIDs are tagged appropriately with vlan ids.
    Plan is to config the mgmt vlan last.
    My main issue is trying to get HP switch VLANs setup properly

  • AP Management VLAN always untagged.

    Management VLAN can be tagged to pfsense if there is the GW or to the Unify Switch and there is the pfsense with the GW.
    The default GW is idependet from tagging.

    Set operator pw first, then manager.

  • This is the vlan port config. (Pic1 & 2). if I set the LACP 24 to PVID 20 and Tagged only. Unifi switch and APs loses connection to pfsense. Which make sense because it is only allow vlan 20 tags to go through.. vlan 1 is blocked.

    Making LACP 24 a member of vlan 20 should allow vlan 20 tags to pass through. (Pic 3 & 4).However, devices cant access internet.
    pfsense rules allow vlan20 net to dest any.. what is blocking internet access? Disabling vlan20 on Unifi. fixes internet issue.

    alt text

  • Switch to Switch Uplinks use normaly untagged vlan 1, this is important if you use STP Mode MST.

    The Vlan 20 tagging look good.

  • @NOCling
    I think i know why vlan20 traffic is not getting to pfsense vm. The port which ESXi is connected to HP switch needs to be a member of vlan 20. vswitch is already set to 4095. All traffic is just passthrough.

Log in to reply