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

PFsense As DHCP Server on a Network with a Layer 3 Switch

Scheduled Pinned Locked Moved DHCP and DNS
5 Posts 5 Posters 2.9k 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.
  • V
    Viro1103
    last edited by Feb 2, 2015, 4:02 AM

    We are using a layer 3 switch for InterVlan routing and pfsense as our primary firewall. No issues with connectivity within the network as routing between VLANs is being handled by the Layer 3 switch. Outbound traffic seems to be working perfectly as well for all the VLANS. Now, we are thinking of using  pfsense as the DHCP server also  for all the VLANS in the network. We know this will work if pfsense is connected to a Layer 2 switch(router on a stick) but not really sure on how to do this with a layer 3 switch in between. Is this possible?

    Thanks!

    1 Reply Last reply Reply Quote 0
    • M
      muswellhillbilly
      last edited by Feb 2, 2015, 10:31 AM

      In my own experience, this is possible. I assign a VLAN ID (Interfaces/Assign + VLAN tab) to a virtual interface on the internal NIC (Interfaces/Assign + Interface Assignment tab) and then create a scope for each virtual interface (Services/DHCP server). I'm assuming your VLANs are all using entirely different IP address ranges, of course.

      1 Reply Last reply Reply Quote 0
      • ?
        A Former User
        last edited by Feb 2, 2015, 12:03 PM

        Just to get something straight:
        Layer 1 = "you solder wires onto the cable" switch
        Layer 2 = "MAC" switch ie. NOT a router on a stick, in the traditional sense
        Layer 3 = "router" switch.

        Why are you using two routers instead of one? Let the switch handle the VLANs based on the untagged ports, then set up the tagged ports connected to pfsense. Then let pfsense handle inter-VLAN traffic, DHCP, DNS, whatever. That means let the switch handle the layer 2 stuff, and an actual router handle the layer 3 stuff, instead of using an unpatched, unmaintained switch to act as a router.

        My advice, take it or leave it, it's up to you. Welcome to the forums  ;D

        1 Reply Last reply Reply Quote 0
        • K
          kejianshi
          last edited by Feb 2, 2015, 12:06 PM

          You know, this is my thoughts exactly.  Unless the switch was a better router than my actual router I would use a "simple" managed layer 2 switch with pfsense.

          I haven't ever needed a layer 3 switch, but I'm sure they make them for a reason.  Somewhere someone must need them.  Just not me.

          1 Reply Last reply Reply Quote 0
          • B
            bennyc
            last edited by Feb 2, 2015, 12:36 PM

            I differ. It is actually a good thing you offload pfsense for regular intervlan routing, and maybe the most important reason being that your L3 switch does that routing way more efficiently, no need to change that. (it's another story if you need/want security between those vlans but that was not your question)

            There's a "but" though here. Currently it is only possible to configure dhcp scopes for "own" subnets. Meaning, if the subnet is not assigned to any physical or vlan interface, you won't be able to have it hand out dhcp offers to anything (scopes) it does not know.

            It is (or better technically it can be) possible to have all dhcp to be handled by pfSense, possible but not standard yet. (see https://forum.pfsense.org/index.php?topic=65736.0)
            You will also need ip-helper on each SVI on the L3. (easy part)
            I have it running with good results…

            If you don't go with the mod by Marcello, the only way to accomplish that dhcp story is by presenting each vlan to pfSense, either physical, either by dot1q.

            4x XG-7100 (2xHA), 1x SG-4860, 1x SG-2100
            1x PC Engines APU2C4, 1x PC Engines APU1C4

            1 Reply Last reply Reply Quote 0
            2 out of 5
            • First post
              2/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received