IP address of DHCP Server

Well the problem is your workstations have their own root, and then you remote mount the server root to /net.
When the same workstation does PXE boot, it doesn't have root, and it will mount that export to its root.

Therefore you have server root fs mounted on multiple live network devices. Bad practices aren't "all others that aren't declared good(TM)" but ones that introduce problems, technical debt. Seemingly OK at the get go, but will become problematic soon, as you can see here...

NFS does ensure locking but FreeBSD cannot operate with multiple instances using the same configuration files.

Your solution is to not export the server's root filesystem. Just like with jails, you can install another instance of FreeBSD base to any directory, so export that. As that will have its own rc.conf, you can setup the network however you want it.
 
The problem is that I have just discovered that if I boot a computer diskelessly it uses the same rc.conf and uses the same IP address because it's set staticaly and this causes all sorts of problems and makes my LAN unusable. If the IP address was set dynamically a different IP address would be used.
yeah, that's not a usable configuration. don't do that.

there's a reason diskless setups use a separate tree for their root, and so on. the infrastructure necessary to boot them is configured differently than the diskless nodes.

man diskless has information on setting this up correctly.
 
I was hoping that I could configure a specific rc.conf for a specific host but don't see how to do that.

First of all, remove the / entry from /etc/exports. Exporting root is not a smart or productive thing to do. You will get (you are) nowhere.

Then

Code:
fetch https://download.freebsd.org/ftp/releases/amd64/amd64/15.0-RELEASE/base.txz -o base.txz
mkdir -p /workstation_1_root
tar -xf base.txz -C /workstation_1_root --unlink

Edit /workstation_1_root/etc/rc.conf and set the ifconfig to DHCP.

Then export /workstation_1_root thru /etc/exports.

Really, read on diskless man page and handbook page. Everything is there, you're just using it wrong. In every operating system, when using PXE or any kind of diskless boot, the clients do not receive the root filesystem the host operating system is using
 
Not read all as things seems to be too confused within OP and others.

Making things simple again.
  • DHCP server mutually don't need IP address if it's 100% dedicated to be one and only DHCP server in the local network that ethernet frames can reach, without accepting any (even single) configuration via network.
  • If the DHCP server does any other IP related services (including web and/or text [ssh and/or telnet, but not serial like RS232C or USB] based configuration features), it needs to be configured to have fixed IP address unless there are some (including single) other DHCP server(s) that it can obtain its IP address and configurations.
  • For (non-DHCP) servers, obtaining IP address via DHCP is strongly discouraged. But if you really want, the DHCP server should NOT on the same hardware and configured to supply fixed IP addresses for servers. This is because changes in IP address of servers as of expired lease could cause interruptions of transactions, resulting in possible undefined and hard to resolve issues.
No actual configuration experiences for the last item, but I saw my corporate computer assigned to me obtained the same IP address via DHCP on every boot. So it should be somehow possible (maybe tied to MAC address?).
 
That is an essential part of my 'homelab'. I'm not going to change that.

What do you expect then, a "smart file" that shapeshifts depending on what host it is used on?

You'll have to modify the rc subsystem's scripts for networking. You would have a mapping between MAC addresses and ifconfig commands. Your rc scripts would then know what computer is booted via the MAC, and you would setup the network however you want for that host.

There needs to be some dynamism, you can't boot a same-config OS around the network. If you don't want to have cloned roots with those changes that make up the dynamics of the network isolated where they should be, then you need to modify another aspect of the OS. Which is the service layer because you need to boot the correct network at right point of time in the right way.

Is that really what you want to do? Modify the service layer and carry these modifications through upgrades, etc?
 
it is an extremely ill-advised configuration

He is not getting any support from any forum of any OS with that setup.
It is plain wrong. I understand he has benefits from managing one host OS and then having those stuff reflected on the workstations. But it is not simple as that. If it were we'd be all using it.
 
Is that really what you want to do? Modify the service layer and carry these modifications through upgrades, etc?

At the moment I'm trying to explore diskless booting without doing tons of configuration.

i have stumbled upon a simple configuration which actually gets a system booting disklessly. Before continuing any further research the one thing I need to do to make any progress is to make the diskless host startup with ifconfig_em="DHCP" instead of the setting of the server. I'm still investigating ways of doing this.
 
Back
Top