How do you stop clients with blank computer names receiving DHCP leases?

corne99

Reputable
Jul 24, 2015
1
0
4,510
Hi.

How can I stop my DHCP server form issuing IP's to clients who's host names = blank.

I don't want to administrate a MAC address white list .
 
Problem is host names is a concept unique to a particular OS. DHCP runs for many types of devices...even your router likely uses DHCP to get a ip from the ISP. Its not like your router has a hostname or if it does it means something different than say a ipphone or a roku box or a game console

All that the DHCP server sees is a request that says here is my mac address I want a IP. There is no field even in the packet to put in any form of host name.

Not sure what your goal is. DHCP can not be used as a security method to keep people off the network. Someone can always just not use DHCP and manually key in a ip.
 

That is incorrect. A hostname means exactly the same thing on all IP devices (the name of the host!). And, yes, routers do have hostnames (or can have them).

A DHCP request packet can contain far more information than the MAC of the requesting device. (For starters it will often contain a request for a specific IP address.) in particular it can contain a hostname. This is the DHCP option with a code value of 12.
 

Ok I build my own ROUTER device that does not have a host name. So ALL ip devices do not have name of the host. You should not nit pick stuff. I can nit pick crap too. Getting in crap like this just confuses the level of people who post here. I know very well all about optional features in dhcp

It doesn't matter what OPTIONAL codes are available. They are OPTIONAL for a reason. A device that only send the mandatory fields will not send host names.
 
Not sure it is part of the protocol.

The client sends out a discovery, server sends out a offer, client send a request. the server at that point sends a acknowledgement. All I can think of is it would not send the final acknowledgement but that really not a standard thing to do. There is not a NAK or something similar in the protocol it pretty much has given out the ip at the offer. Obviously you would have to hack something in non standard.
 

That is my understanding of what the OP wants. It would be easy to implement if writing your own server (just don't respond to requests that don't contain the hostname option, or have a blank value for it) but I'm not aware of any DHCP server that can be configured that way.

Windows clients will always send the hostname as part of the DHCP request - that's how the DNS server can automatically create a record for the client.

Also note that "optional" and "option" are not synonyms. 😉
 

You'll no doubt think it's nitpicking, but I do hate to see incorrect statements.

There is a DHCPNAK message for exactly this use. It would be too restrictive if a server couldn't withdraw an offer before the transaction has been confirmed.
 
Oh boy write your own server that is a really good option for a forum that has mostly end users on.

Nit picking of stuff that does that the original posters does not care derails these threads. What do I copy and paste RFC just so people like you don't come in and find exceptions. What you going to do next check spelling.
 

Well I think it's better if this site provides accurate information rather than incorrect information. I'm funny that way.

I'm sorry if that upsets you, but I think it's best to avoid making false statements. I've refrained from personal comment, just stated the facts. Again, I think that's the best way to make this site a useful resource.
 

TRENDING THREADS