Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Question about hostname format on 3750G switch running IOS 12.2(40)SE

In previous versions of IOS, we were able to configure the hostname as an ip address, i.e "hostname 10.1.1.1". With IOS 12.2(40)SE the hostname command will not accept an IP address as the name. Does anyone know is this is intentional or a bug? Documentation seems to imply that an IP address for the hostname is valid.

4 REPLIES
Silver

Re: Question about hostname format on 3750G switch running IOS 1

We started putting warning when you try to use ip address as a hostname .

1.1.1.1(config)#hostname 10.10.10.10

% Hostname contains one or more illegal characters.

this o/ps is from 12.2(35)SE . From the above syslog , I would say its intentional what you are seeing in 12.2(40)SE.

Thanks

Salman.

Purple

Re: Question about hostname format on 3750G switch running IOS 1

I would think that would flunk almost any audit if you are using a ip address as your hostname , not a good practice.

Cisco Employee

Re: Question about hostname format on 3750G switch running IOS 1

Hi Cberns,

Which release allows you to configure the hostname as ip address? Can you please confirm the same? What you are observing in Rel.12.2(40) is an expected behavior and also as per the documentation guide "They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphens"

http://www.cisco.com/univercd/cc/td/doc/product/lan/cat3750/12240se/scg1/swadmin.htm#wp1051875

Regards,

Ankur

New Member

Re: Question about hostname format on 3750G switch running IOS 1

Release 12.2(25) allows you to configure the host name as an IP address. The doc at the link you provide for for 12.2(40) also contains this:

"If you use the switch IP address as its hostname, the IP address is used and no DNS query occurs. If you configure a hostname that contains no periods (.), a period followed by the default domain name is appended to the hostname before the DNS query is made to map the name to an IP address. The default domain name is the value set by the ip domain-name global configuration command. If there is a period (.) in the hostname, the Cisco IOS software looks up the IP address without appending any default domain name to the hostname."

This does imply to me that one should be able to enter the hostname in the format 10.1.1.1.

449
Views
0
Helpful
4
Replies