Can I force any device plugged into a particular Ethernet port on a router or managed switch to receive a fixed IP address, without knowing its MAC or anything else? I'm thinking there's a way to do this in dd-wrt, but it doesn't need to be that platform. Would need to be able to run it on a managed switch, or at least something with more than four ports. I'd also need to be able to swap them out quickly, so not wait for lease expiry. Don't need a step-by-step solution, just a bearing would help.
Asked
Active
Viewed 270 times
-3
-
"_Static dhcp lease_" is actually an oxymoron. You have statically configured devices, or devices that get addressing from DHCP. I think you mean DHCP reservations. – Ron Maupin Sep 25 '17 at 07:31
-
I've seen it labeled many things, including address reservation, fixed lease, static assignment, etc. Dd-wrt, the platform with which I'm most recently familiar, calls them "static leases", as do several other router types. Perhaps it is a misnomer, based on a very rigid understanding of how the technology actually works, but I haven't invented it. I think it's clear what I'm talking about, and I don't think the choice of terminology is particularly relevant to the asking or answering of the question. – UStralian Sep 25 '17 at 17:03
-
You can tell that I didn't intend to answer your question because I didn't post an answer. I simply made use of the comment feature to try to clarify your question. The terminology used in asking a question is important. You probably want to be clearly understood, and using opposite terms for the same thing is contrary to a clear understanding. The DHCP RFC calls statically configured hosts non-participating, so a statically configured participating host is an oxymoron. – Ron Maupin Sep 25 '17 at 17:20
1 Answers
2
Short answer: no.
Longer answer: Trying to get a certain (reserved) IP address leased to a device on a specific switch port would need to overcome several problems:
- The DHCP server doesn't know the switch port of the DHCP client asking for an offer.
- The DHCP server doesn't know when a device has disconnected and its lease is potentially free again.
The closest I can imagine is a separate VLAN per switch port with a single IP address in the VLAN scope and a very short lease time. The DHCP server would also need to be directly connected with each VLAN, alternatively you could use a DHCP agent or relaying on the switch.

Zac67
- 2,761
- 1
- 10
- 21