0.7 About the Author

0.7 About the Author

graphics/author.gif

Christopher R. Hertel is one of those guys in the bright orange vests who lean up against a shovel in the construction zones along the Information Superhighway. By day, he is a Network Design Engineer at the University of Minnesota. He is also a member of the Samba Team, a founding member of the jCIFS Team, and an inconsistently average foil fencer. Most important of all, he is a full-time dad and husband.

0.7.1 Quick Story

A few years back I was interviewing for a job that I really thought I wanted. During the technical interview, I was asked "Is NetBEUI routable?" My head was full of protocol specs and packet headers, and I got a little flustered. I confused NetBEUI with the general idea of encapsulated NetBIOS. Of course I gave the wrong answer, and I did not get the job.

They say success is the sweetest and most honest form of revenge . graphics/smile.gif

0.8 License

Code examples are licensed under the terms of the GNU Lesser General Public License. This allows you to build libraries from the licensed code and use those libraries with your own code, even if your code is proprietary. The library source code, however, must be made available if you distribute your product. See the LGPL for details.

Part I: NBT: NetBIOS over TCP/IP

Chapter 1.   A Short Bio of NetBIOS

Chapter 2.   Speaking NetBIOS

Chapter 3.   The Basics of NBT Implementation

Chapter 4.   The Name Service in Detail

Chapter 5.   The Datagram Service in Detail

Chapter 6.   The Session Service in Detail

Chapter 7.   Where It All Went Wrong

Chapter 1. A Short Bio of NetBIOS

Groan + Grump = GroanUmp

Me, speculating on the etymology of the term "Grown-up" for my children

It all started back in the frontier days of the PC when Microsoft was a lot smaller, IBM seemed a whole lot bigger, and Apple owned personal computer territory as far as the eye could see. Back then, you didn't need no dang standards. If you wanted to sell LANs, you just went out and branded yourself a protocol. Apple had AppleTalk, Digital had DECnet, and, for their longhorn mainframes, IBM had S ystems N etwork A rchitecture (SNA). SNA was a mighty big horse for little PCs, so IBM hired on a company called Sytec and together they rustled up a product they called "PC Network." Not an inspiring name , but it was a simpler time.

PC Network was a Local Area Network (LAN) system designed to support about 80 nodes at best, with no provisions for routing. NetBIOS ( Net work B asic I nput O utput S ystem) was the software interface to the PC Network hardware. It offered a set of commands that could control the hardware, establish and delete sessions, transfer data, etc.

1.1 NetBIOS and DOS: The Early Years

Starting with DOS version 3.1, Microsoft used the NetBIOS API to transport SMB file service messages. They created something called a redirector , and its job was to catch disk drive or port references (e.g. " C: " or " LPT3: ") and look them up in a table. If the device was not in the table, the call was passed along to DOS. If the device was in the table, then the call would be redirected . For example:

  • Using the SUBST command, a user could substitute a drive letter for a local path . This simple aliasing provided convenient shortcuts for long path names :

     subst S: C:\FILES\DEEP\IN\A\DIRECTORY 
  • Using the NET command, a drive letter could be mapped to a remote file service. So, if the redirector found a remote service entry in its table, it would convert the request into an SMB packet and send it out via NetBIOS:

     net use N: \SERVER\SERVICE 

    Note the double backslash preceding the server name . This syntax is part of Microsoft's " U niversal N aming C onvention" (UNC) for network services.

These commands are still available from within the DOS shells of contemporary Windows products. It is worthwhile to fiddle with them a bit. At the DOS prompt, you can type NET HELP for a summary of the NET command and its options. [1]

[1] ...or, if you type the way I do, you can enter NEWT KELP to generate an error message.