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

    DHCP Server Setup with a Layer 3 Switch

    Scheduled Pinned Locked Moved DHCP and DNS
    28 Posts 6 Posters 6.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

      You would always use a transit network if your going to have a downstream router.

      Solving what problem exactly?  There is no problem with using downstream routers.. The problem is pfsense doesn't support dhcp when it doesn't have an interface in that 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.7.2, 24.11

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        I know OP doesn't have any hairpinning.  I'm discouraging the suggestion of hairpinning.

        I know pfSense's DHCP doesn't support the config, which is why I suggested another DHCP server.

        Everyone seems so hell-bent on getting pfSense to do it (including OP with his outside-GUI config of ISC dhcpd) when it's clearly not the right tool for this job (And that's OK. Really.).

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • jahonixJ
          jahonix
          last edited by

          OK, looked it up. It works the way I described it above. I have this running at one site (without pfSense but that's another story).

          You could, of course, setup the network with two segments and a trunk port (or two physical connections if enough interfaces available) to pfSense as done regularly and add a route to the other segment in the host's routing table pointing to this L3 switches gateway. Intra-VLAN routing will be done by the switch, the rest is handled by pfSense in a common way.
          Or did I miss anything?

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

            And why put host routes on all your boxes??  When all you have to do is use a transit network to connect your downstream router to your edge router and your done..

            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

            1 Reply Last reply Reply Quote 0
            • jahonixJ
              jahonix
              last edited by

              Intention was to have pfSense handle DHCP etc to VLAN1 and VLAN2 as well. Cannot be done with one transit network, right?

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

                No it can not be dhcp unless it has an IP in the interface.. So run a different dhcp server ;)

                host routing on every host he has, so he can run dhcp on pfsense seem like a really bad trade off to me.. Especially since I have never seen a L3 switch that didn't have dhcp as a feature..  So just run it at the switch..

                If he is a AD shop he should be running dhcp on his AD anyway, etc..  What advantage is there to running it on pfsense in a scenario that is not supported, so you going to have to put host routes on every box or your hairpinning.

                There are always multiple ways to skin the cat, doesn't mean some of them are good ideas ;)

                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

                1 Reply Last reply Reply Quote 0
                • jahonixJ
                  jahonix
                  last edited by

                  This setup is so basic that we seem to lose the big picture.
                  One APU, one L3 switch with 2 segments. DHCP (and probably DNS etc as well) for both segments.
                  This probably is the most basic +1 setup all of us can imagine.

                  Now add inter-VLAN routing at the L3 switch to it and we cannot come up with a solution that does not need additional hardware? Come on!

                  1 Reply Last reply Reply Quote 1
                  • D
                    doktornotor Banned
                    last edited by

                    @jahonix:

                    Now add inter-VLAN routing at the L3 switch to it and we cannot come up with a solution that does not need additional hardware? Come on!

                    People have already come with a solution. That solution has turned into bitrot for absolutely inexplicable reason.

                    Patch has conflicts and cannot be merged. Can you please re-submit and I'll take care of testing and get it merged. Sorry for the long delay

                    No shit, Sherlock. After 1,5 year it can no longer be automatically merged? Shocking. No, seriously. It was already resubmitted once and once again ignored for another 6 months. You suppose people will keep resubmitting every half year, they don't have better things to do with their time for sure.

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

                      What extra hardware?  The L3 switch I am quite sure can hand out some dhcp addresses ;)

                      As to why this is not a current feature of pfsense I would guess its not a really needed feature by the majority of the user base..  Normally you would have pfsense do your intervlan routing - this also added feature of full firewall features that many L3 switches would lack.

                      Would it be nice feature - sure it would come in handy for this sort of scenario.

                      If your so large that that your wanting to handle intervlan at a L3 switch, then your prob so large that your already running a dhcp server be it AD or not, etc.  Which again reduces the actual need of pfsense being able to handle this specific sort of scenario.

                      Kind of a special case if you ask me, large enough network that you need multiple vlans but no firewall between them and so much traffic between them that your pfsense box does not handle it well, etc.  So you want to do it at L3 switch - but you still want to run dhcp on your edge router/firewall?

                      I would think the best solution for this OP is just use 1 segment so just doing L2 and pfsense can be his dhcp server, etc.  But he has not given details to why he need 2 segments or even if doing any ACLs at the switch between them, etc.  Would really need a lot of devices to have vlans to shrink your broadcast domains, etc.d

                      I don't think the devs or even the users expect pfsense to be all things for all scenarios.. In a scenario where your running down stream L3 switches and pfsense is your edge I don't really think pfsense being your dhcp server is a huge userbase..

                      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

                      1 Reply Last reply Reply Quote 0
                      • DerelictD
                        Derelict LAYER 8 Netgate
                        last edited by

                        pfSense, as it is now, does not do this.  To come up with cockamamie schemes involving putting static routes on hosts just to use the pfSense DHCP server is just ludicrous.

                        As has been mentioned, the switch probably does DHCP on its L3 VIFs.

                        Chattanooga, Tennessee, USA
                        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                        Do Not Chat For Help! NO_WAN_EGRESS(TM)

                        1 Reply Last reply Reply Quote 0
                        • kalessinK
                          kalessin
                          last edited by

                          @johnpoz:

                          What extra hardware?  The L3 switch I am quite sure can hand out some dhcp addresses ;)

                          As to why this is not a current feature of pfsense I would guess its not a really needed feature by the majority of the user base..  Normally you would have pfsense do your intervlan routing - this also added feature of full firewall features that many L3 switches would lack.

                          Would it be nice feature - sure it would come in handy for this sort of scenario.

                          If your so large that that your wanting to handle intervlan at a L3 switch, then your prob so large that your already running a dhcp server be it AD or not, etc.  Which again reduces the actual need of pfsense being able to handle this specific sort of scenario.

                          Kind of a special case if you ask me, large enough network that you need multiple vlans but no firewall between them and so much traffic between them that your pfsense box does not handle it well, etc.  So you want to do it at L3 switch - but you still want to run dhcp on your edge router/firewall?

                          I would think the best solution for this OP is just use 1 segment so just doing L2 and pfsense can be his dhcp server, etc.  But he has not given details to why he need 2 segments or even if doing any ACLs at the switch between them, etc.  Would really need a lot of devices to have vlans to shrink your broadcast domains, etc.d

                          I don't think the devs or even the users expect pfsense to be all things for all scenarios.. In a scenario where your running down stream L3 switches and pfsense is your edge I don't really think pfsense being your dhcp server is a huge userbase..

                          I was looking for hte same working with some l3 switches. it will be an option at pfsense at some point.
                          =)

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