Directory listing in

Christopher R. Hertel crh at
Fri Dec 29 21:59:48 GMT 2000

> Although specific implementations may limit it more, RFC 1001 seems to
> indicate that, in fact, NetBIOS names are handled as binary, really,
> and there are no invalid characters in them at all.  This is then munged
> up into ASCII later, so the first stage at which the name has invalid
> characters is the full-length encoded version (from RFC 1001):
>    For example, the NetBIOS name "The NetBIOS name" in the NetBIOS
>    scope "SCOPE.ID.COM" would be represented at level one by the
>    ASCII character string:
> Ugh.  We can't very well make that the URI syntax.

:)  This is why the RFC-proposed syntax never caught on.  BTW, there is 
an error in the above translation.  To quote my own junk:

  RFC 1001 provides an example of First Level Encoding in Section 14.1.
  The string "The NetBIOS name" is translated to: 


  Decoding this string, however, we get "Tge NetBIOS tame".
  Perhaps it's a secret message. 
  The correct translation would be: 


> Since both the workgroup and the scope could potentially contain
> anything at all, there is no possible way to really tell them apart.

According to the RFCs, the scope labels should conform to the preferred
DNS naming syntax.  That is, start with alpha, followed by alphanumeric or
a dash, and end with alphanumeric.  Also, they *must* be no more than 63
characters long, and are compared without regard to case.

Unfortunately, the Windows systems I've tried allow you to enter just 
about any garbage string you like in the Scope field.  Ick.

> (Who thought that up?)

They were trying to be compatible with DNS best practices.  It's a kludge,
and it didn't work. 

> Given the situation, I think Chris mentioned
> the only viable solution:  Demand a specific character be escaped if
> used in the workgroup or scope name.  Since NT is already starting
> to sing a different tune when it sees a ".", that may be the best
> nominee for the job.
> Just to summarize, I think that leaves two syntaxes:
> (broswing) smb://[workgroup[.scope]]/
> (specific) smb://[[domain;]user[:password]@]server/[share/[path/][file]]

The server name also needs to have a scope, as in:


This is nasty but true.  As with any NetBIOS name, the name exists
*within* a scope, so the scope must be specified.  In the above, the 
first step will be to use the NetBIOS Name Service to resolve the server 
name to an IP address so that packets may be sent.  We need to send to 
the correct IP address, of course.

Now the wierd thing is that in Microsoft's implementaton the scope string 
is *not* included in the Session Service (TCP/139) SESSION SETUP REQUEST 
packet.  If you do include it, I think it sends back a "Called name not 
found" message.  My reading of the RFCs is that MS got this bit wrong, 
but the section is ambiguous enought that I forgive them.

Chris -)-----

PS.  See:
     That's my documentation on the workings of NBT.  More to come.

Christopher R. Hertel -)-----                   University of Minnesota
crh at              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz

More information about the samba-technical mailing list