DHCP: next-server per static IP
-
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
-
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.Skip the above , there's a full section dedicated to network booting
/Bingo
-
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 ServerAnd 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
-
@robert-berger
I doubt pfSense can do that in the default setup.
MAC matching & conditionals would prob. need "raw isc-dhcp syntax"/Bingo
-
@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?
-
@robert-berger
I am using pfSense as DHCP Relay.
It relays to my Linux ISC-DHCP server(s)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
-
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!