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

    VLAN using Microsoft DHCP server

    Scheduled Pinned Locked Moved L2/Switching/VLANs
    9 Posts 5 Posters 2.3k 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.
    • mikemalterM
      mikemalter
      last edited by

      I am new to VLANS, so please excuse the newbie question. I want to create several VLANs using Microsoft DHCP server to hand out IP's. I have created the VLANs and the additional scopes in the Microsoft DHCP server. The issue for me is the last configuration bit where the device hits the desired scope on the DHCP server.

      Where do I do that? Do I have to match VLANS on our switches and map to specific ports?

      Thank you.

      cmcdonaldC bingo600B 2 Replies Last reply Reply Quote 0
      • cmcdonaldC
        cmcdonald Netgate Developer @mikemalter
        last edited by cmcdonald

        @mikemalter unless the MS DHCP server has an interface on each VLAN, you will need to run a DHCP relay on something that does...that something is usually whatever is doing your routing (i.e. pfSense).

        https://docs.netgate.com/pfsense/en/latest/services/dhcp/relay.html

        Need help fast? https://www.netgate.com/support

        1 Reply Last reply Reply Quote 0
        • bingo600B
          bingo600 @mikemalter
          last edited by bingo600

          @mikemalter

          That depends ....

          Are all your "desired" VLAN's using pfSense for routing the traffic ??

          If yes ... I use a similar setup, with the Linux ISC-DHCP server.

          In order for the DHCP requests to reach the M$ DHCP server you have to "Relay the packets" on the "Interesting pfSense interfaces"
          7a42cf4d-8fb5-4fa3-bdb3-70592f9d3a5a-image.png

          This solution is an "All or Nothing" solution, as pfSense DHCP Relay and pfSense DHCP Server can't both be running , at the same time.

          So all DHCP scopes must be on the on the M$ server using DHCP Relay, and NONE using pfSense DHCP server.

          1:
          Goto - Services -> DHCP Relay

          2:
          Enable the service

          3: Select the pfSense interfaces you want to Relay

          4: I like to add Agent ID

          5: Enter ip address of the server to relay to (M$ Box IP)

          Done

          Well you might want to open up for DHCP to the M$ Server in the firewall.
          It will work wo. the opening as pfSense is relaying , but your client would prob try to "renew at halftime" using the M$ IP , and that would fail of there are no opening.
          I have specifically deny'ed DHCP to my linux server (DHCP is only via the DHCP Relay function) , and have no "noticable issues".

          Edit:
          If using Cisco Switches , you could also use the ip-helper function , but then you'd have to enable Cisco L3 routing on each of the "interesting interfaces"
          That would IMHO "defeat the use of a firewall" on those VLANS.

          /Bingo

          If you find my answer useful - Please give the post a šŸ‘ - "thumbs up"

          pfSense+ 23.05.1 (ZFS)

          QOTOM-Q355G4 Quad Lan.
          CPUĀ  : Core i5 5250U, Ram : 8GB Kingston DDR3LV 1600
          LANĀ  : 4 x Intel 211, DiskĀ  : 240G SAMSUNG MZ7L3240HCHQ SSD

          1 Reply Last reply Reply Quote 0
          • mikemalterM
            mikemalter
            last edited by

            Bingo600,

            Thank you very much for your detailed answer. I am going to try this and might have another question or two.

            Thanks again.

            Mike

            1 Reply Last reply Reply Quote 0
            • mikemalterM
              mikemalter
              last edited by

              Bongo600,

              First, thanks again for your answer.

              My question is how does the IP request know which scope to go to if I have multiple scopes?

              Thanks,

              Mike

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

                @mikemalter said in VLAN using Microsoft DHCP server:

                My question is how does the IP request know which scope to go to if I have multiple scopes?

                The relay devices sends that info to the dhcp server.

                https://www.computernetworkingnotes.com/ccna-study-guide/how-dhcp-relay-agents-work-explained.html

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

                1 Reply Last reply Reply Quote 0
                • mikemalterM
                  mikemalter
                  last edited by

                  Johnpoz,

                  I have multiple LAN and VLAN interfaces and multiple DHCP scopes on my Microsoft DHCP server.

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

                    @mikemalter and?

                    Why would you have multiple vlans on your dhcp server? Multihoming (interfaces in multiple networks) servers is rarely a good idea.. And leads to asymmetric flow and normally a security issues because it bypasses the firewall that is done at the router, etc.

                    Without some details of what your actually wanting to accomplish its impossible to help you. But in answer to your question when a dhcp relay or helper as called in ciscoland sends dhcp traffic it sees it sends the source info to your dhcp server so it knows what scope to offer an IP from, etc.

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

                    1 Reply Last reply Reply Quote 0
                    • dotdashD
                      dotdash
                      last edited by

                      This shouldn't involve your firewall at all. Create the vlans on the switches, set the DHCP helper/relay on the switches to point to your DHCP server, and create the scopes on your dhcp server.

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