What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

DHCP please allow "_" underscore in host-name

Grisu

Part of the Furniture
Hello Merlin!

Could you please allow underscore to be used in DHCP hostnames.
I can copy paste it, but not directly write "_".

In Asus device(host)-names I can use alphanum, dash and underscore (nothing else).
In your extension DHCP-names NO underscore but instead dash, point, space.
It is some kind of "incompatible".
I'm used to use dash as common separator for WLAN-devices and underscore for all LAN-devices, so I will see which connection is used, even if it is attached to an extended AP-WLAN (where it always shows LAN-symbol).

Maybe you could fix it - thanks.

Grisu
 
Hello Merlin!

Could you please allow underscore to be used in DHCP hostnames.
I can copy paste it, but not directly write "_".

In Asus device(host)-names I can use alphanum, dash and underscore (nothing else).
In your extension DHCP-names NO underscore but instead dash, point, space.
It is some kind of "incompatible".
I'm used to use dash as common separator for WLAN-devices and underscore for all LAN-devices, so I will see which connection is used, even if it is attached to an extended AP-WLAN (where it always shows LAN-symbol).

Maybe you could fix it - thanks.

Grisu

The underscore is an invalid character in a hostname, as it is reserved for special uses.
 
Thanks for anwering Merlin!

Understood, but than why do you allow the use of " "-Space in the host-name? As far as I found information there are only allowed Alphanumerical, "-" and "." and those not at beginning or end.

And is it correct that computer-names may use up to 24 characters?
This would make live easier again ;-)
 
Thanks for anwering Merlin!

Understood, but than why do you allow the use of " "-Space in the host-name? As far as I found information there are only allowed Alphanumerical, "-" and "." and those not at beginning or end.

And is it correct that computer-names may use up to 24 characters?
This would make live easier again ;-)

Historical reasons, and likely to change in the future.

Originally, the field was meant to allow adding a description. Later on, this became dedicated to specifying a hostname. I have tightened the requirement at some point, but it's possible they aren't 100% enforced yet (there was some confusion in the code as Asus used the same code to validate hostnames and volume names - both of which should have different limitations).

I couldn't find an official definition as to the maximum length of a hostname.
 
I couldn't find an official definition as to the maximum length of a hostname.

RFC 1123 (https://www.ietf.org/rfc/rfc1123.txt) says:
Host software MUST handle host names of up to 63 characters and SHOULD handle host names of up to 255 characters.
Yeah, right ;)

UPDATE: Just thought I'd add that RFC 1123 applies to internet host names. Internal (LAN) DNS systems are free to use any characters they like in their host names. (Although I don't know if there's a length restriction)
 
Last edited:
UPDATE: Just thought I'd add that RFC 1123 applies to internet host names. Internal (LAN) DNS systems are free to use any characters they like in their host names. (Although I don't know if there's a length restriction)

But since hostname resolution is handled by dnsmasq, I doubt it's being handled differently than an actual Internet hostname, so I'd rather keep the hostname limited to fully legit characters, to prevent any unforeseen issue. There will always be someone who will decide that naming his computer "texa$" is a good idea, until all hell breaks lose...
 
These RFCs may be more applicable:

DHCP Options

and

Domain Names

I seem to remember from way back that M$ limited system names to 24 characters back in WfW 3.11 (possibly a tad shorter). Those weren't domain names, but became as such later in W95, etc. as I recall. So many vendors started limiting DHCP/WINS names to 24 characters as well. I think originally back in WfW 3.11 and W95 that underscores were allowed as part of the system name.

Unfortunately, as I recall, much of this came about out of the early M$ days and their forays into LANs and internet, some of it going back as far as WfW 3.11. Some got updated/changed, some didn't due to interoperability issues in M$ environments with a mix of OS's in the office. This may have changed during the XP era, but old habits die hard.....

Like it or not - M$ bastardizations of RFCs and standards, and their own "we have a better solution" became de-facto standards for much of the world, or had to be handled by the world (it's still a M$-centric world in the desktop arena) and is only changing slowly the last few years.

Not a real answer, but some of why we have these messes.....
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top