Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is a FQDN valid if the hostname component is entirely numeric? It's not something I've come across before and I'm not sure if something like the following is legal:

001.example.com.

I know it's an issue for Windows Servers, but is a purely numeric hostname (001 in this case) ever an issue for *nix servers?

share|improve this question

2 Answers 2

up vote 7 down vote accepted

It is legal in form 001.example.com, you can add a hostname 001 as a record on DNS server and you will be able to ping and work with 001.example.com, I'm not sure if any *nix service will fail to work with that, it is according to standards and they should all support it, but you will have problems when omitting the domain.

$ ping 001.example.com

Pinging 001.example.com [127.0.0.5] with 32 bytes of data:

For instance ping, traceroute and many other tools will for 001 return an IP representation of the decimal number, which in this case is 0.0.0.1

$ ping 001

Pinging 0.0.0.1 with 32 bytes of data: PING: transmit failed. General failure. PING: transmit failed. General failure. PING: transmit failed. General failure. PING: transmit failed. General failure.


Highest number you can go that way is 30064771070 which represents 255.255.255.254


ping 30064771070

Pinging 255.255.255.254 with 32 bytes of data:


$ ping 30064771071 Ping request could not find host 30064771071. Please check the name and try again.


For number 30064771071 it will fail as it represents 255.255.255.255, and for numbers 30064771072 and higher it will resolve to IP if the hostname exists, for smaller numbers it always tries IP representation of the decimal number


$ ping 30064771072

Pinging 30064771072 [127.0.0.4] with 32 bytes of data: Reply from 127.0.0.4: bytes=32 time<1ms TTL=128 Reply from 127.0.0.4: bytes=32 time<1ms TTL=128

There was a similar question on UNIX SE

share|improve this answer

No issue at all, it is just common to use more relevant/logical names and preferably letters for hostname

See:

http://tools.ietf.org/html/rfc1035

http://kb.iu.edu/data/aiuv.html

Hope this helps

share|improve this answer
    
RFC 1035 outright states that 001 is not valid, as labels should always start with an ASCII letter. –  Mathias R. Jessen Oct 12 '13 at 12:32
4  
it was changed in rfc1123 tools.ietf.org/html/rfc1123#page-13 One aspect of host name syntax is hereby changed: the restriction on the first character is relaxed to allow either a letter or a digit. Host software MUST support this more liberal syntax. –  Alen Oct 12 '13 at 12:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.