[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Sip] Question about hostname's BNF definition



> I have 2 questions related to BNF definition 
> for hostname. Here is the part from RFC3261: 
>  
> hostname = *( domainlabel "." ) toplabel [ "." ] 
> domainlabel = alphanum / alphanum *( alphanum / "-" ) alphanum 
> toplabel = ALPHA / ALPHA *( alphanum / "-" ) alphanum 
>
> And here are my 2 questions: 
> (1). Based on the BNF definition for hostname, 
> a "." at the end is legal which means the following 
> string is a legal hostname: 
> "company.com." 
> This is wrong, right? No "." should be allowed 
> at the end of hostname.

A dot at the end of hostname is valid;
see rfc1034 section 3.1.
It indicates that it is complete (also 
referred to as absolute or fully qualified).
 
> (2). Based on the different definition for 
> domainlable and toplable, toplable does not alow 
> token starts with DIGIT. Why is that? 

See rfc1034 section 3.5 for definition.
I assume that it was for a quicker distinction 
between IPv4address and hostname.  However this
restriction is not very limiting since it applies
to the suffixes such as ".com", ".gov", etcetera.
If I recall correctly, the no starting-with-digits
used to also apply to the "domainlable" portion.  
The restriction was relaxed to accommodate company 
names such as 3com and 8x8; however I can't recall
the rfc that relaxed the rule.

_______________________________________________
Sip mailing list  https://www1.ietf.org/mailman/listinfo/sip
This list is for NEW development of the core SIP Protocol
Use sip-implementors@cs.columbia.edu for questions on current sip
Use sipping@ietf.org for new developments on the application of sip