How many NICs I need?



  • Hi, I'm a beginner in networks and security, and now I want to build my own router/firewall using pfsense.
    My first question is about the number of NICs. What is the minimum of interfaces I need?. I guess two NICs: WAN and LAN. But, is it possible to use a single NIC with several ports, and configure each port as port1-WAN, port2-VLAN1(LAN), port3-vlan2(DMZ)? Or is it better to use a NIC for WAN, another for LAN, DMZ, …

    Graphically:

    Option A:

    • NIC1: WAN

    • NIC2: LAN

    • NIC3: DMZ

    • NIC 4: WIFI

    Option B:

    • NIC1:

    • Port 1: WAN

    • Port 2: LAN

    • Port 3: DMZ

    • NIC2: Wifi

    If both options are possible, what are the advantages and disadvantages of each one?

    Thanks.


  • LAYER 8 Global Moderator

    You should have at min 2 nics, wan and lan - if you want to do some vlans on your lan great, wifi for example - do you have a switch that supports vlans?

    While yes everything could be done with 1 nic and vlans.  Why???  You can pick up a 4 port nic for really cheap..

    Never seen a nic with 3 ports so your option 2 is a bit odd ;)



  • Youtube Video

    you generally run a trunk towards your pfsense ; in most cases its pointless to run multiple physical interfaces with each 1 seperate vlan …



  • If you are in the situation to build a new pfSense appliance and oyu can really choose how many NICs or Ports
    you will be able to set up or plain insert it would be the best to have 4 LAN Ports in your case.
    1 GB LAN Port - WAN
    1 GB LAN Port - LAN
    1 GB LAN Port - DMZ
    1 GB LAN Port - WiFi

    or

    1 GB LAN Port - WAN
    1 GB LAN Port - LAN & Netgear GS105Ev2, GS108GSv2, GS108Tv2 Switch & WiFI APs
    1 GB LAN Port - DMZ if needed or free

    For a home setup it would be sufficient to go with Intel consumer grade NICs
    beware of Realtek or Broadcom NICs. If money is there you can also go with a
    Quad Port or 2 Dual Port used Intel NICs from the eBay or Amazon.com



  • OK, so It is possible ;). I saw this example with 3 ports: http://www.get-virtual.net/2014/09/16/build-firewall-appliance/

    I don't want to use a switch because my net is very small. My idea is:

    • Router -> pfsense

    • pfsense:

    • WiFi: laptops, mobiles, tv. This would be a mini-PCIe wi-fi Adapter

    • LAN: Right now I use WiFi, but I would like to have a port for connect a device (or maybe a switch in the future)

    • DMZ: With a port is ok, the same than lan: for a device (like a honeypot) or a switch in the future to web servers

    So, I was thinking my option B should work if I use each port for a purpose: wan, lan and dmz. Just for keep it simple. Mi goal is to learn, I don't want anything too much complex.

    On the other hand I can buy a mini-itx with:

    • Integrated Nic for wan

    • PCI wifi adapter for wifi

    • And two NICs: dmz and lan

    I'm still confused: In mi situation, is it better to use NICs or Ports in terms of efficiency, complexity and security?.

    Thanks!


  • LAYER 8 Global Moderator

    A multiple port nic is fine…

    Don't put wifi in your pfsense box.. Its just not really the optimal solution.. There is no such thing as AC support, its going to have limited range.. Its much better to place a AP where you need it, etc.



  • OK. Anyway, I can research about Mini-ITX with more NICs. But, is there any issue with sharing a NIC for LAN and DMZ (I mean in real world)?.

    Why a PCIe wi-fi Adapter can't provide a good performance?.

    Thanks a lot!  ;)


  • LAYER 8 Global Moderator

    Sorry but a card in your router is not best place for a AP be it the card works or not.. How many antennas does it have?  3x3 streams?  Cards in routers don't make good AP period.. END OF STORY!!

    If you want some crappy wifi connection that you could get by buying a 20$ soho router off the street have fun..



  • OK. Anyway, I can research about Mini-ITX with more NICs. But, is there any issue with sharing a NIC for LAN and DMZ (I mean in real world)?.

    No there would be no plroblems to share the on board GB LAN Ports for using anything in your direction
    or plain for what you want it to use. Supermicro is offering a huge amount of Intel Atom C2758 boards
    that would fit your needs. From my point of view the best option you have at the moment to get a really
    flavor running and electric saving box for your home. For sure the SG units from the pfSense Store are
    also really wicked based on the circumstance that they will be owing 3 miniPCIe slots.

    Why a PCIe wi-fi Adapter can't provide a good performance?.

    WiFi is not really good supported under FeeBSD or plain all BSD systems and pfSense is
    based on FreeBSD 10.1! So better to get a WLAN AP to get better results.



  • OK. So, finally I'm going to do this:

    • Mini-ITX with 2 NICS

    • NIC1: WAN

    • NIC2: Switch

    • Switch Port1: WLAN AP

    • Switch Port2-PortX: LAN

    • Switch PortN: DMZ (I'm going to connect just a raspberrypi)

    to do this, I need to pay attention to any special features of the switch or the wlan ap?

    Thanks!


  • LAYER 8 Netgate

    The switch will need to be at least "web smart" meaning it will need to support 802.1q VLANs.

    The AP can be pretty much anything, but if you want to support multiple SSIDs on multiple VLANs it will need to support that feature. Any Ubiquiti UAP will do.  Your decision on what frequency bands/modulations you want to support.



  • to do this, I need to pay attention to any special features of the switch or the wlan ap?

    Both should be supporting VLANs as you where told before, I see it right also.
    A tiny Netgear GS105Ev2 for around $30 will do the job right for you, if more ports are needed
    and you know it until today a GS108Ev3 with 8 GB LAN Ports will do the job also for $40.

    Connect like you where drawing and all is running, why a DMZ connect the NAS an its ok.
    Usually a DMZ would be owning another different IP subnet as the LAN owns.




Log in to reply