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

    DHCP on multiple interfaces

    Scheduled Pinned Locked Moved DHCP and DNS
    26 Posts 4 Posters 11.1k 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.
    • JeGrJ
      JeGr LAYER 8 Moderator
      last edited by

      @ddanielpala said in DHCP on multiple interfaces:

      Then ISP won't know who is this new DHCP server as it only knows DHCP server is LAN, am I right?

      The ISP doesn't know anything about your internal networks as you're NATting them outbound to your WAN IP anyway. So if you're coming from .5.x or .0.x you'll get mapped by pfSense to your WAN IP either way.

      Don't forget to upvote 👍 those who kindly offered their time and brainpower to help you!

      If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

      D 1 Reply Last reply Reply Quote 0
      • D
        danldn31 @JeGr
        last edited by

        @JeGr So in that case, having a static IP on OPT1 and make that Ip as the default GW for DHCP under OPT1 should solve the issue, correct?

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

          You can create as many networks as you want.. If you want to put some of the devices that are currently on your lan network, on some other opt1 network sure that works..

          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

          D 1 Reply Last reply Reply Quote 0
          • D
            danldn31 @johnpoz
            last edited by

            @johnpoz Thanks. So pfsense will use both dhcp services(running on LAN and OPT1) allocate IP addresses accordingly?

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

              Yeah lan devices will get IPs from the lan dhcp pool, and devices in the opt1 network will be getting ips from that pool.

              Are none of your other networks using dhcp?

              Not understanding what the concern is here.. You clearly are running multiple networks, how is it you think you can only run 1 dhcpd pool?

              Your not wanting to run 2 different networks on the same L2 are you??

              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

              D 1 Reply Last reply Reply Quote 0
              • D
                danldn31 @johnpoz
                last edited by

                @johnpoz Other networks are wired. Not in DHCP

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

                  @ddanielpala said in DHCP on multiple interfaces:

                  Other networks are wired. Not in DHCP

                  Huh?? What does wired or not have to do with dhcp? Your saying those other networks are all assigned static on the devices? Why? How many devices?

                  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
                  • D
                    danldn31
                    last edited by

                    Forget about other networks. What I am trying to achieve is to have two DHCP server on two different networks for clients to connect. Thanks.

                    JKnottJ 1 Reply Last reply Reply Quote 0
                    • JKnottJ
                      JKnott @danldn31
                      last edited by

                      @ddanielpala said in DHCP on multiple interfaces:

                      What I am trying to achieve is to have two DHCP server on two different networks for clients to connect.

                      You can configure a DHCP server on every interface.

                      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
                      • johnpozJ
                        johnpoz LAYER 8 Global Moderator
                        last edited by johnpoz

                        Yeah you could have 100's, shoot prob 1000s - depending on the umph of your hardware of networks and dhcp running on all of them.. I'm just a bit confused to how that is even a question.. Pfsense would be pretty freaking crappy if you could only run dhcpd on 1 network at a time ;) hehehe

                        So yeah, you can run multiple networks with dhcpd on any or all of them if you want.. Just click the little enable dhcp check box on the interface in the dhcp server section.

                        What you can not do, and people complain about it is run dhcpd and a dhcp relay.. You can either relay or be dhcp server.. You can not do both things at the same time, even on different networks.

                        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

                        D 1 Reply Last reply Reply Quote 0
                        • D
                          danldn31 @johnpoz
                          last edited by

                          @johnpoz Yes, so just thinking, if i have two such dhcp services running, will a personal device that connects to the wifi network get IP from second dhcp service that running on second interface. What changes need to be done to make that work.

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

                            Huh... You said these would be different networks..

                            Please do not trying and run multiple layer 3 networks on the same Layer 2 network... That is just borked and cause you all kinds of issues.. Especially if any of these devices need to talk to each other..

                            If this is a single layer 2 network.. Then you NEED to change its ip range so you can increase network size to be appropriate for number of devices.. /23 or /22 - I really wouldn't put more than say a /22 on the same network.. Especially if they are chatty little window boxes that love to send out craptons of broadcasts and multicast..

                            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

                            D 1 Reply Last reply Reply Quote 0
                            • D
                              danldn31 @johnpoz
                              last edited by

                              @johnpoz I understand.
                              By network I meant two different subnets

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

                                That is implied its 2 different L2 networks.. You do not run multiple L3 networks on the same L2 - its BORKED!! especially with 2 different dhcp servers..

                                Do what I suggested and move the IP range to something new so you can use a /22 or /23 network if you need more IPs on the same network.

                                edit: Don't tell me the other networks you mention are all on the same L2??? That is why your not running dhcp on them???

                                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

                                D 1 Reply Last reply Reply Quote 0
                                • D
                                  danldn31 @johnpoz
                                  last edited by danldn31

                                  @johnpoz Yes, I think that's the right approach. Thank you.
                                  Like I said, we have an unused interface OPT1, so I can just disable DHCP on LAN and enable DHCP on OPT1. We do have around 10-15 static mappings which then need to add it to the new DHCP interface.
                                  After that, we will work on organizing our entire networks in a more proper way as @JeGr suggested.
                                  Thank you

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

                                    So this is just one big flat network with multiple layer 3 networks on it.. OMG.. what a cluster..

                                    Do you have switches that support vlans? Do you have multiple switches?

                                    If all you want is 1 big network, then do that - there is no reason to run multiple layer 3 networks if all you have is one L2.. You are not actually isolating anything from talking to each other if al your doing is using different IP schemes for different clients. So you might as well just put them on 1 network.

                                    To properly segment clients, you need to do it at layer 2 first..

                                    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
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.