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

Setting up a Vlan for security,

L2/Switching/VLANs
4
10
1.2k
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.
  • N
    nambi
    last edited by Dec 24, 2018, 5:59 PM

    I have a Pfsense box I made with 2 NICS, isp in, out to swithch.

    ON my lan I have a CCTV system, which I would lik to take off my main lan, for security reason.

    I was thinking about setting it up an a vlan because I'm concerned how secure the software is.

    Is it possible with PF sense to create a VLAN using the SAME NIC? Does this make sense?

    right now we are on a 192.168.1.* network I'm thinking about putting my CCTV on 192.168.3.* But I'm not sure if I would require more NICS in pfbox, I think I may be limited with this supermicro 1U setup.

    Thanks

    1 Reply Last reply Reply Quote 0
    • V
      veldthui
      last edited by Dec 24, 2018, 6:35 PM

      That is a perfect use for a VLAN. Just be aware that un-managed switches can strip out the VLAN part so will get lost. If you have managed switches then no issue.

      1 Reply Last reply Reply Quote 0
      • J
        JKnott
        last edited by Dec 24, 2018, 6:56 PM

        Yep, that's a common use of VLAN and pfSense can do that.

        BTW, the claim that an unmanaged switch will strip off VLAN tags is nonsense. An Ethernet switch is supposed to pass ALL valid Ethernet frames. The only difference between a VLAN frame and any other is the contents of the Ethertype/length field plus 4 bytes for the VLAN tag. Any switch that strips off that tag is defective by design.

        Ethernet frame

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        N V 2 Replies Last reply Dec 24, 2018, 7:18 PM Reply Quote 0
        • N
          nambi @JKnott
          last edited by Dec 24, 2018, 7:18 PM

          @jknott said in Setting up a Vlan for security,:

          plus

          Thanks for the reply, will I need another nic in the device or can they share the same nic? I only have 2 nics in the PFSense box adding a 3rd might be difficult with this hardware.

          J 1 Reply Last reply Dec 24, 2018, 8:10 PM Reply Quote 0
          • V
            veldthui @JKnott
            last edited by Dec 24, 2018, 7:53 PM

            @jknott said in Setting up a Vlan for security,:

            Yep, that's a common use of VLAN and pfSense can do that.

            BTW, the claim that an unmanaged switch will strip off VLAN tags is nonsense. An Ethernet switch is supposed to pass ALL valid Ethernet frames. The only difference between a VLAN frame and any other is the contents of the Ethertype/length field plus 4 bytes for the VLAN tag. Any switch that strips off that tag is defective by design.

            Ethernet frame

            It is not nonesense. It happens. Maybe not in newer switches but older ones that don't know about VLAN's certainly do. I have 4 switches that if are used with VLAN's then the info does not survive and they don't work as they should. Yes they are older. They are not defective, just made before VLAN was thought of.

            Noyou don't need another NIC. Just attached the interface to the existing LAN. If you great the VLAN it should be available as an option when creating a new interface.

            1 Reply Last reply Reply Quote 2
            • J
              JKnott @nambi
              last edited by Dec 24, 2018, 8:10 PM

              @nambi said in Setting up a Vlan for security,:

              Thanks for the reply, will I need another nic in the device or can they share the same nic?

              You normally create a VLAN on an existing interface. You will then see both the native LAN and VLAN(s) on the same wire comming from the NIC.

              PfSense running on Qotom mini PC
              i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
              UniFi AC-Lite access point

              I haven't lost my mind. It's around here...somewhere...

              1 Reply Last reply Reply Quote 0
              • J
                JKnott
                last edited by Dec 24, 2018, 8:25 PM

                @veldthui said in Setting up a Vlan for security,:

                It is not nonesense.

                It is nonsense. As I mentioned, switches are supposed to pass all valid Ethernet frames. Here is a list of Ethernet frame types. Any switch that can't pass every one of those frame types is defective. A valid Ethernet frame consists of destination and source MACs, Ethertype/length, payload and CRC. The only thing that might cause a problem on ancient gear is an inability to handle more than 1500 byte payload. If you run into that, just reduce the MTU by 4 bytes to avoid the problem.

                BTW, frame type, other than special stuff such as spanning tree, is ignored by the switch. A switch only needs valid destination, source, payload and CRC for it to pass a frame. A switch most definitely should not tamper with a frame by stripping out anything, including VLAN tags.

                PfSense running on Qotom mini PC
                i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                UniFi AC-Lite access point

                I haven't lost my mind. It's around here...somewhere...

                V 1 Reply Last reply Dec 24, 2018, 8:38 PM Reply Quote 0
                • V
                  veldthui @JKnott
                  last edited by Dec 24, 2018, 8:38 PM

                  Whatever. I know some switches loose the VLAN data. I have actual experience with it losing it. I was just warning others. What they are supposed to do and what they do is two different things. I am glad your un-managed switches don't chop out the VLAN info for you.

                  1 Reply Last reply Reply Quote 2
                  • J
                    johnpoz LAYER 8 Global Moderator
                    last edited by Dec 24, 2018, 9:07 PM

                    If your trying to run vlans over a dumb switch your and idiot plan and simple..

                    Be it the switch passes the vlan traffic or doesn't pass it means nothing.. It dosn't understand them so you have no isolation... Might as well just run all the layer 3 networks you want over that single layer 2 your dumb switch is..

                    I personally do not think any modern switch will strip tags, but still something you shouldn't be doing.. You could prob do it in a pinch while your vlan capable switch is on order or something. But no you shouldn't be thinking running vlans over a dumb switch is a good idea or that its fine to do such a thing.

                    Me and jknott bang heads about this all the time.. While I agree with him that it is highly unlikely that a dumb switch would actually strip the tags or not pass the traffic.. You should never be suggesting to someone that they can get by with using a dumb switch if they want to start using vlans.

                    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.7.2, 24.11

                    J 1 Reply Last reply Dec 24, 2018, 9:25 PM Reply Quote 0
                    • J
                      JKnott @johnpoz
                      last edited by JKnott Dec 24, 2018, 9:26 PM Dec 24, 2018, 9:25 PM

                      @johnpoz said in Setting up a Vlan for security,:

                      You should never be suggesting to someone that they can get by with using a dumb switch if they want to start using vlans.

                      What about my original intention for using a VLAN. I have an access point that supports multiple SSIDs and I was planning on setting up a guest SSID & VLAN. It was the only device on my network, other than pfSense, that would use a VLAN. Was I supposed to toss a perfectly good Cisco unmanaged switch, just because I was running a VLAN to one device?

                      However, I definitely recommend VLANs for security cameras, VoIP phones, etc.. In some cases, it makes sense to use a managed switch to keep LAN and VLAN separate. In others, maybe not. An example would be a network where most devices are VoIP phones, with computers plugged into the phones. (I've seen networks where there's nothing else other than VoIP phones & computers and the Internet connection) In that situation, what advantage would a managed switch provide? Due to the way switches filter traffic, there would be very few VLAN frame appearing at devices not configured for a VLAN. As always, look at the requirements and be guided accordingly. That said, there's not much reason to not buy a managed switch these days.

                      BTW, my plan failed because our favorite manufacturer, TP-Link, didn't know how to handle VLANs properly.

                      Me and jknott bang heads about this all the time.

                      And you have horns on yours! 😉

                      PfSense running on Qotom mini PC
                      i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
                      UniFi AC-Lite access point

                      I haven't lost my mind. It's around here...somewhere...

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