Community discussions

MikroTik App
 
arainbow
newbie
Topic Author
Posts: 36
Joined: Sat Sep 15, 2012 12:05 pm

I can't set a DNS name that starts with a digit.

Thu May 31, 2018 12:56 pm

I can't set a DNS name that starts with a digit.


[admin@MikroTik] /ip hotspot profile> pri
Flags: * - default 
 0 * name="default" hotspot-address=192.168.20.1 dns-name="www.abc.com" html-directory=flash/hotspot/hdl 
     html-directory-override="" rate-limit="" http-proxy=0.0.0.0:0 smtp-server=0.0.0.0 
     login-by=http-chap,https,http-pap ssl-certificate=Cert_hotspot split-user-domain=no use-radius=no 
[admin@MikroTik] /ip hotspot profile> set 0 dns-name=1234.abc.com
failure: invalid dns-name
[admin@MikroTik] /ip hotspot profile> set 0 dns-name="1234.abc.com"
failure: invalid dns-name
[admin@MikroTik] /ip hotspot profile> set 0 dns-name="abc1234.abc.com"    
[admin@MikroTik] /ip hotspot profile> 
 
tholderbaum
newbie
Posts: 38
Joined: Thu Jan 23, 2014 3:34 am
Location: Tampa, Florida
Contact:

Re: I can't set a DNS name that starts with a digit.

Fri Jun 01, 2018 5:57 pm

I can confirm this behavior.

RFC 1178 recommends not using DNS Host names that start with numbers. https://tools.ietf.org/html/rfc1178 here is the relevant section:


Don't use digits at the beginning of the name.

Many programs accept a numerical internet address as well as a
name. Unfortunately, some programs do not correctly
distinguish between the two and may be fooled, for example, by
a string beginning with a decimal digit.

Names consisting entirely of hexadecimal digits, such as
"beef", are also problematic, since they can be interpreted
entirely as hexadecimal numbers as well as alphabetic strings.

Don't use non-alphanumeric characters in a name.

Your own computer may handle punctuation or control characters
in a name, but most others do not. If you ever expect to
connect your computer to a heterogeneous network, you can count
on a variety of interpretations of non-alphanumeric characters
in names. Network conventions on this are surprisingly
nonstandard.
 
User avatar
acruhl
Member
Member
Posts: 371
Joined: Fri Jul 03, 2015 7:22 pm

Re: I can't set a DNS name that starts with a digit.

Fri Jun 01, 2018 6:39 pm

Yep, funny that this still comes up. I guess this must still be true after all these years.

There was conjecture in the "old days" that www.3com.com was the only exception ever made. I have no idea if that's true but it made a good story. They are long gone now of course.

(Edit: It's not true. I just thought of at least 1 other.)
 
R1CH
Forum Guru
Forum Guru
Posts: 1101
Joined: Sun Oct 01, 2006 11:44 pm

Re: I can't set a DNS name that starts with a digit.

Fri Jun 01, 2018 7:30 pm

Seems like Mikrotik is not RFC compliant here.
   2.1  Host Names and Numbers

      The syntax of a legal Internet host name was specified in RFC-952
      [DNS:4].  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.
https://tools.ietf.org/html/rfc1123#page-13 (note that this is an INTERNET STANDARD RFC, not just INFORMATIONAL as was previously linked, which was a copy of a magazine article)

Who is online

Users browsing this forum: Aska, Javokhir, loloski, mmackowiak, qwertykolea, yoq and 220 guests