Chapter 9. An Introductory Tour of SMB

The devil is in the details.

Popular saying

We will start with a quick museum tour of SMB. Our guide will be the venerable U niversal N aming C onvention (UNC). You may remember UNC from the brief introduction way back in Chapter 1 on page 3. UNC will provide directions and point out highlights along the tour.

Please stay together, everyone.

The UNC directions are presented in terms of a path , much like the U niform R esource I dentifier (URI) paths that are used on the World Wide Web. To explain UNC, let us first consider something more modern and familiar:

 http://ubiqx.org/cifs/index.html 

That string is in URI syntax, as used by web browsers, and it breaks down to provide these landmarks :


            http  ==  The  protocol  to  use.
  ubiqx.org  ==  The   name  of  the  server.
            cifs  ==  The  directory  path.
    SMB.html  ==  The  file  name.

The landmarks guide us along a path which eventually leads us to the file we wanted to access.

The SMB protocol pre-dates the use of URIs and was originally designed for use on LANs, not internetworks, so it naturally has a different (though surprisingly similar) way of specifying paths. A U niversal N aming C onvention (UNC) path comparable to the URI path above might look something like this:

 \ubiqx\cifs\SMB.html 

...and would parse out like this:


            ubiqx  ==  The  name  of  the  server.
              cifs  ==  The  directory  path.
      SMB.html  ==  The  file  name.

Very similar indeed.

One obvious difference between the two formats is that UNC doesn't provide a protocol specification. That's not because it always assumes SMB. The UNC format can support all sorts of filesharing protocols, but it is up to the underlying operating system or application to try to figure out which one to use. Protocol and transport discovery are handled by trial-and-error, with each possibility tested until something works. As you might imagine, a system with AppleTalk, NetWare, and SMB all enabled may have a lot of work to do.

The UNC format is handled natively by Microsoft & IBM's extended family of operating systems: DOS, OS/2, and Windows. [1] Samba's smbclient utility can also parse UNC names , but it does so at the application level rather than within the OS, and it only ever tries to deal with SMB. Even so, smbclient must handle both NBT and naked transport, which can be tricky.

[1] Steve French says that OS/2 may have been the first OS to fully support the UNC scheme.



Implementing CIFS. The Common Internet File System
Implementing CIFS: The Common Internet File System
ISBN: 013047116X
EAN: 2147483647
Year: 2002
Pages: 210

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net