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

    Solved!! pfsense vlan untagged interfaces with vlans on same trunk

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    17 Posts 2 Posters 4.6k 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.
    • johnpozJ
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz

      You can for sure run 1 network untagged, or native and then tags on top of that..

      I run one of my interfaces like this.

      Not sure on actual setups on hp.. But here is my config on sg300 for the port connected to pfsense that has native network setup and then vlans on top of that

      interface gigabitethernet5
       description "sg4860 WLan and vlans"
       switchport trunk allowed vlan add 3-4,6-7,19
       switchport trunk native vlan 2
      

      vlan 2 on the switch is this untagged vlan

      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
      • D
        deboerdn2000
        last edited by

        did you have to add any routes to make it work?

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

          No any directly attached network doesn't need routes on 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

          D 1 Reply Last reply Reply Quote 0
          • D
            deboerdn2000 @johnpoz
            last edited by

            @johnpoz on your switch side?

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

              NO! Why do you have routes on your switch? Are you wanting to do routing on your switch? If so pfsense wouldn't have any vlan info on it.. Nor know about any vlan IDs

              If your going to do routes on your L3 switch, then it just becomes a downstream router and only thing connection between pfsense and it is a transit network.

              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
              • D
                deboerdn2000
                last edited by

                I had to add a static route to be able to access my switch management from my wifi side. is the routes on my switch causing the issue then maybe?

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

                  Well your doing it wrong from the get go then.

                  Are you wanting to do routing on your switch, or just layer 2 - or a combination?

                  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
                  • D
                    deboerdn2000
                    last edited by

                    pfsense is going to do all the routing. I just need to have one static route because otherwise my phone (192.168.1.20) cant access my switch management at (10.0.0.2)

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

                      Only route you would need on your switch is the default route, pointing to pfsense Ip in whatever vlan you put your management IP in.. Then you can get to it from any other network routed by pfsense.

                      As you can see on mine.

                      ip default-gateway 192.168.9.253
                      

                      That is the setup on my switch. Its management IP is 192.168.9.99

                      !
                      interface vlan 9
                       name lan
                       ip address 192.168.9.99 255.255.255.0
                      

                      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
                      • D
                        deboerdn2000
                        last edited by

                        ok so i setup the route and the interface as it should be and but the ip address for the vlan interface which im using dhcp for is getting its address unless I put my pfsense vlan tags on another interface. Im using 2.4.5 and is that maybe the problem?

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

                          Using 2.4.5 not sure why you think that would be a problem..

                          You can use dhcp if you want, not sure why anyone would do that on a switch management IP - but sure you can do that.

                          If using dhcp it should prob get its gateway from dhcp I would think..

                          from your config for your trunk port I don't see anywhere you set which vlan is untagged.. Not sure how you would do that on a hp switch.. But in cisco setting it to native as you saw in my config tells the switch what vlan to put untagged traffic in, and what vlan to send egress from the port untagged. It sets the pvid on the port so any untagged traffic ingress is in that vlan.

                          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
                          • D
                            deboerdn2000
                            last edited by deboerdn2000

                            so it tells me 1(default) 10, 99-100 as interfaces with a pvid of 1 and passing all vlans correctly.

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

                              Well yeah vlan 1 is default untagged vlan.. So that would work..

                              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
                              • D
                                deboerdn2000
                                last edited by deboerdn2000

                                it doesnt work with another switch I have and its the exact same configuration. untagged on one and then tagged on 10,99,100. what version of pfsense are you using?

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

                                  Its not rocket science traffic is either tagged or not tagged.. If just naked on the interface directly its untagged. If it's setup as a vlan then it will have whatever vlan ID tag you put on it..

                                  So here is my interface where I put my vlans and native untagged traffic. so igb2 network is 192.168.2/24, vlan 4 and 6 are 192.168.4/24 and 192.168.6/24

                                  traffic.jpg

                                  On the switch this untagged is vlan 2.. Makes it easy to know what vlan is what when the ID is just the 3rd octet of the network address space.

                                  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
                                  • D
                                    deboerdn2000
                                    last edited by deboerdn2000

                                    i checked that and made sure mine matched. what I did find out though is that my lan port (em0) if I change it to my 2nd interface (em2) that it works exactly how I expect it to. I wonder if its a bug and its already assigned that it causes that issue. it is the lowest mac address too so maybe that was my problem

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