• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.3k 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.
  • D
    deboerdn2000
    last edited by deboerdn2000 Jun 25, 2020, 10:55 PM May 27, 2020, 7:47 PM

    hey everyone, I am having issues with pfsense and an hp1910-16g. I am leaving vlan 1 untagged and then 10,99,100 tagged on my network card but its not passing vlan tagged traffic even using the switch itself. I need to keep vlan 1 untagged for my desktop to be able to manage it without needing to change network settings all the time. I can get it working if I use 2 interfaces on my network card but I would love to change it to just one trunk. https://pastebin.com/mjUzJWHh here is my switch configuration and https://pastebin.com/vSzUd3dp is my pfsense configuration. any ideas on how to make this work or do I just bit the bullet and install a second network card in my pc just for managing the switch and dealing with remote logging after?

    Solution: suricata on inline mode was causing the vlans to mess up. After disabling it and adding ifconfig em0 -vlanhwtag then renabling it, it seems to have fixed the problem

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz May 27, 2020, 8:16 PM May 27, 2020, 8:13 PM

      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 May 27, 2020, 8:18 PM

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

        1 Reply Last reply Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator
          last edited by May 27, 2020, 8:19 PM

          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 May 27, 2020, 8:21 PM Reply Quote 0
          • D
            deboerdn2000 @johnpoz
            last edited by May 27, 2020, 8:21 PM

            @johnpoz on your switch side?

            1 Reply Last reply Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator
              last edited by johnpoz May 27, 2020, 8:23 PM May 27, 2020, 8:22 PM

              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 May 27, 2020, 8:23 PM

                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
                • J
                  johnpoz LAYER 8 Global Moderator
                  last edited by johnpoz May 27, 2020, 8:24 PM May 27, 2020, 8:24 PM

                  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 May 27, 2020, 8:25 PM

                    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
                    • J
                      johnpoz LAYER 8 Global Moderator
                      last edited by johnpoz May 27, 2020, 8:30 PM May 27, 2020, 8:29 PM

                      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 May 27, 2020, 8:35 PM

                        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
                        • J
                          johnpoz LAYER 8 Global Moderator
                          last edited by May 27, 2020, 8:38 PM

                          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 May 27, 2020, 8:55 PM May 27, 2020, 8:51 PM

                            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
                            • J
                              johnpoz LAYER 8 Global Moderator
                              last edited by May 27, 2020, 10:11 PM

                              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 May 27, 2020, 10:25 PM May 27, 2020, 10:24 PM

                                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
                                • J
                                  johnpoz LAYER 8 Global Moderator
                                  last edited by johnpoz May 27, 2020, 10:32 PM May 27, 2020, 10:30 PM

                                  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 May 27, 2020, 10:39 PM May 27, 2020, 10:35 PM

                                    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
                                    17 out of 17
                                    • First post
                                      17/17
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                      This community forum collects and processes your personal information.
                                      consent.not_received