07-07-2006
04:55 AM
- last edited on
03-25-2019
03:04 PM
by
ciscomoderator
Hi,
A custyomer wants to implement hostnames up to 26 or 30 characters long on CAT6500 running IOS.
Is this possible?
What is the max length of hostnames? Is it platform and/or software dependant?
Many thanks,
Kurt
Solved! Go to Solution.
07-07-2006 05:16 AM
I don't think it's a bug.
The quotes are from IOS 12.4 command reference, I have no hardware to test this, but Cisco recommends no longer than 10 characters. It truncates the prompt but I think it will show up in your configuration.
Issue "show running-config | include hostname"
HTH
--Leon
* Please rate posts.
07-07-2006 05:02 AM
From what I have read hostnames up to 30 characters are acceptable and anything longer will get truncated in the display.
07-07-2006 05:10 AM
Hello Kurt,
However the documentation doest not explicitly tells you the restrictions of the hostname command it dictates that a command should be no more than 30 characters in length
"The name must also follow the rules for ARPANET host names. They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphens. Names must be 63 characters or fewer."
***"A host name of less than 10 characters is recommended. For more information, refer to RFC 1035, Domain Names Implementation and Specification."***
In case you do use a long hostname, use the prompt command to shorthen the name displayed.
For instance
Switch(config)#hostname a-very-long-hostname-for-a-switch-1
a-very-long-hostname-for-a-switch-1(config)#prompt switch-1
switch-1(config)#end
HTH
--Leon
* Please rate posts.
07-07-2006 05:12 AM
For some reason, hostnames are trunked to 12 characters in CAT6500 running IOS V12.1(20)E2.
Is this a bug?
Kurt
07-07-2006 05:16 AM
I don't think it's a bug.
The quotes are from IOS 12.4 command reference, I have no hardware to test this, but Cisco recommends no longer than 10 characters. It truncates the prompt but I think it will show up in your configuration.
Issue "show running-config | include hostname"
HTH
--Leon
* Please rate posts.
08-10-2010 06:58 AM
I realize this is an old post but just to keep things authoritative here in http://www.ietf.org/rfc/rfc1035.txt RFC 1035 I could find no mention of a 10 octet (character) limit or recommendation for hostname length management. So the old single hostname rule of 63 octets and total FQDN not to exceed 255 positions applies.
If you see different please cite it, it's early here
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide