what may be the reasonable length of fully-quialilfied domain name
that can be set up in application? I'd wish this length would cover
possible user desires and at the same time wouldn't violate standard.
TIA~
--
Roman
From RFC 1035:
To simplify implementations, the total number of octets that represent a
domain name (i.e., the sum of all label octets and label lengths) is
limited to 255.
> TIA~
>
> --
> Roman
>
>
--
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: Mark_A...@isc.org
Also, there's an older post on this list that mentions 1004 as the
limit, quoting RFC1035 as the source (however, the number is not
explicitly mentioned in that document):
> To simplify implementations, the total number of octets that
> represent a domain name (i.e., the sum of all label octets and label
> lengths) is limited to 255.
If the OP said "reasonable" and not "legal", I believe it is because
he have already read the RFC and wanted a more operational answer :-)
For instance, mtr, by default, truncates the FQDN at the first 33
characters for display. This is probably the sort of things the OP had
in mind.
Another example is that the longest domain name in ".fr", far from the
theoretical limit (but it hits the limit for a label), is
bolognaise-cannes-moulinets-soies-culdecanard-mouches-flotteurs.fr (68
characters) and
www.bolognaise-cannes-moulinets-soies-culdecanard-mouches-flotteurs.fr
works :-)
Yes. All other lengths are derived from that.
> arpa/nameser.h in libbind defines NS_MAXDNAME to be 1025,
> with the comment 'maximum domain name', while NS_MAXCDNAME is defined
> as 255 with the comment 'maximum compressed domain name'. I've always
> wondered where the 1025 came from.
#define DNS_NAME_MAXTEXT 1023
/*%<
* The maximum length of the text representation of a domain
* name as generated by dns_name_totext(). This does not
* include space for a terminating NULL.
*
* This definition is conservative - the actual maximum
* is 1004, derived as follows:
*
* A backslash-decimal escaped character takes 4 bytes.
* A wire-encoded name can be up to 255 bytes and each
* label is one length byte + at most 63 bytes of data.
* Maximizing the label lengths gives us a name of
* three 63-octet labels, one 61-octet label, and the
* root label:
*
* 1 + 63 + 1 + 63 + 1 + 63 + 1 + 61 + 1 = 255
*
* When printed, this is (3 * 63 + 61) * 4
* bytes for the escaped label data + 4 bytes for the
* dot terminating each label = 1004 bytes total.
*/
#define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1)
/*%<
* Suggested size of buffer passed to dns_name_format().
* Includes space for the terminating NULL.
*/
> Also, there's an older post on this list that mentions 1004 as the
> limit, quoting RFC1035 as the source (however, the number is not
> explicitly mentioned in that document):
>
> http://groups.google.com/group/comp.protocols.dns.bind/browse_thread/thread/6
> 36e8bba1ec6ca0d/c663e6f4b63f95d7?q=FQDN+length&rnum=3#c663e6f4b63f95d7
>
> On 2/1/06, Mark Andrews <Mark_A...@isc.org> wrote:
> > From RFC 1035:
> >
> > To simplify implementations, the total number of octets that represent a
> > domain name (i.e., the sum of all label octets and label lengths) is
> > limited to 255.
> >
> >
There are plenty of real world hostnames that are 253 characters
long. People like to have fun. :-)
> For instance, mtr, by default, truncates the FQDN at the first 33
> characters for display. This is probably the sort of things the OP had
> in mind.
>
> Another example is that the longest domain name in ".fr", far from the
> theoretical limit (but it hits the limit for a label), is
> bolognaise-cannes-moulinets-soies-culdecanard-mouches-flotteurs.fr (68
> characters) and
> www.bolognaise-cannes-moulinets-soies-culdecanard-mouches-flotteurs.fr
> works :-)
--
I was looking for 1025 probably, and 'domain' and 'maximum' yield too
many results.
> > > To simplify implementations, the total number of octets that represent a
> > > domain name (i.e., the sum of all label octets and label lengths) is
> > > limited to 255.
> > >
> > >
> > > > TIA~
> > > >
> > > > --
> > > > Roman
255 characters assuming one octet per character.
http://www.ietf.org/rfc/rfc2181.txt
The DNS itself places only one restriction on the particular labels
that can be used to identify resource records. That one restriction
relates to the length of the label and the full name. The length of
any one label is limited to between 1 and 63 octets. A full domain
name is limited to 255 octets (including the separators).
--
Christian Smith
Dynamic Network Services, Inc.
Some OSes, however, further limit the HOST portion of the FQDN...
HP-UX, for example, limits the host name to a measly 8 chars. And if
someone tells me that an HP-UX host name can be longer than 8 chars, I
can tell them that HP-UX only looks at the first 8 chars when trying to
do a match...
>
> http://www.ietf.org/rfc/rfc2181.txt
>
> The DNS itself places only one restriction on the particular labels
> that can be used to identify resource records. That one restriction
> relates to the length of the label and the full name. The length of
> any one label is limited to between 1 and 63 octets. A full domain
> name is limited to 255 octets (including the separators).
-------------------------------------------------------------------
I am perfectly capable of learning from my mistakes. I will surely
learn a great deal today.
"A democracy is a sheep and two wolves deciding on what to have for
lunch. Freedom is a well armed sheep contesting the results of the
decision." - Benjamin Franklin
"The best we can hope for concerning the people at large is that they
be properly armed." --Alexander Hamilton
Some OSes, however, further limit the HOST portion of the FQDN...
HP-UX, for example, limits the host name to a measly 8 chars. And if
someone tells me that an HP-UX host name can be longer than 8 chars, I
can tell them that HP-UX only looks at the first 8 chars when trying to
do a match...
>
> http://www.ietf.org/rfc/rfc2181.txt
>
> The DNS itself places only one restriction on the particular labels
> that can be used to identify resource records. That one restriction
> relates to the length of the label and the full name. The length of
> any one label is limited to between 1 and 63 octets. A full domain
> name is limited to 255 octets (including the separators).
>
>
> --
> Christian Smith
> Dynamic Network Services, Inc.
>
>
-------------------------------------------------------------------
Gregory Hicks | Principal Systems Engineer
Cadence Design Systems | Direct: 408.576.3609
555 River Oaks Pkwy M/S 6B1 | Fax: 408.894.3400
San Jose, CA 95134 | Internet: ghi...@cadence.com
Well the DNS can only support hostnames up to 253 octets.
Note a hostname does not have a period at the end (RFC 952).
The same limits apply to mail domains in the DNS for the
same reasons.
> --
> Christian Smith
> Dynamic Network Services, Inc.
>
>