cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15026
Views
1
Helpful
5
Replies

Maximum length Hostname

kvermeylen
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

5 Replies 5

glen.grant
VIP Alumni
VIP Alumni

From what I have read hostnames up to 30 characters are acceptable and anything longer will get truncated in the display.

leonvd79
Level 4
Level 4

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.

For some reason, hostnames are trunked to 12 characters in CAT6500 running IOS V12.1(20)E2.

Is this a bug?

Kurt

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.

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