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

    DHCP: next-server per static IP

    Scheduled Pinned Locked Moved DHCP and DNS
    7 Posts 2 Posters 331 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.
    • robert-bergerR
      robert-berger
      last edited by

      Hi,

      I work with embedded systems and it looks like u-boot picks up the "global" next-server as a u-boot "serverip" variable (where u-boot finds e.g. tftp and nfs servers). I would like a different next-server per static IP coming from my DHCP server (and not to hack it manually).

      Ideally something like that, but let's start with the server IP:

      host eval {
              filename                       "uImage";
              fixed-address                   192.168.42.7;
              hardware ethernet               00:11:22:33:44:55;
              next-server                     192.168.42.107;
              option host-name                "imx8-7";
              option root-path                "192.168.42.107:/opt/poky/mira_rootfs,wsize=1024,rsize=1024,v3";
      }
      

      Is this somehow possible?

      Thanks,

      Robert

      bingo600B 1 Reply Last reply Reply Quote 0
      • bingo600B
        bingo600 @robert-berger
        last edited by bingo600

        @robert-berger

        Do you use isc-dhcpd , as the example indicates ?
        Or would you like to use the pfSense dhcp server to replicate the example shown ?

        It seems a bit unclear , but i have a "gut feeling" that DHCP option 66 and 67 are the ones you want to play with in pfSense.

        321ce6c7-e0d6-4292-af8c-ef9499a89167-image.png

        Skip the above , there's a full section dedicated to network booting

        a92bc62e-c0ea-44c9-b1f7-ac428dbe7226-image.png

        /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
        • robert-bergerR
          robert-berger
          last edited by

          Hi,

          Ideally I would like to use only pfsense, but if it's not possible I will need to use an additional DHCP server as well.

          What you are referring to seems to be the "global" settings.
          Services -> DHCP Server

          And this seems to work, but only gives me to option to define "one" next-server, or a series of next-servers globally.

          I would like like so say something like "if the DHCP request comes from MAC xxxx than the next-server is yyyy"

          Services -> DHCP Server -> specific static mapping -> magic

          Correct me if I'm wrong, but with what you suggest I can configure network booting, but I can not dish out "per MAC" next-servers.

          Thanks,

          Robert

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

            @robert-berger
            I doubt pfSense can do that in the default setup.
            MAC matching & conditionals would prob. need "raw isc-dhcp syntax"

            /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

            robert-bergerR 1 Reply Last reply Reply Quote 0
            • robert-bergerR
              robert-berger @bingo600
              last edited by

              @bingo600 So how would you do that? A second dhcp server which somehow also talks to pfsense to have some kind of central control or hack pfsense?

              bingo600B 1 Reply Last reply Reply Quote 0
              • bingo600B
                bingo600 @robert-berger
                last edited by

                @robert-berger
                I am using pfSense as DHCP Relay.
                It relays to my Linux ISC-DHCP server(s)

                ee66a4f8-f0e9-4df6-89ec-00adbfcc4fcc-image.png

                That way i can use ISC-DHCP syntax on the Linux'es.

                Afaik you can't mix pfSense DHCP Server and DHCP Relay , it's one or the other.

                /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
                • robert-bergerR
                  robert-berger
                  last edited by

                  Hmm, this sounds interesting. So I could do all the DHCP stuff from another machine and let pfsense handle the rest.

                  I guess I could even copy the current DHCP config from pfsense since I think it runs ISC-DHCP as well.

                  Not sure what functionality I will lose like that but I guess I could give it a try.

                  Thanks!

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