I saw a strange comment bagging IT departments (i.e. sysadmins) on Slashdot the other day:
half the time they cant even do a simple thing like provide a jack with a set IP address for us
Reading the DHCP specs, nothing obvious jumps out as supporting this, but (some?) Cisco switches offer a feature called "DHCP Server Port-Based Address Allocation" which achieves this; so can it be done by:
- VLANs and a VLAN-aware DHCP server?
- some special combination of DHCP options (option 82, relay agent information)?
- only proprietary solutions like specific Cisco switches?
This is largely theoretical (I don't need to implement it), but I'm curious as to how "simple" it really is. Could I do it with my existing HP Procurve 2524 & dnsmasq, would I need a more sophisticated DHCP server, or would I need a new Cisco switch too?
DHCP option 82 is really what you are looking for, assuming you have a DHCP server that supports it. Once you have a DHCP request with the switch / port information in it, assigning an IP to it should be pretty trivial (just matching up the switch / port to what's in your database). Most production networks don't rely on DHCP though, because it's something else that can fail. This might be nice for the initial setup (have the machine pull an IP via DHCP, then configure itself to use that as a static IP), but I wouldn't suggest you try and run servers off of DHCP.