NetBIOS Datagram Distributor extensions for Samba


Overview

In order for OS/2 to operate with full functionality in a NetBIOS over TCP/IP environment, it requires the presence of both a NetBIOS Name Server (NBNS) and NetBIOS Datagram Distribution (NBDD) Server. However, the Microsoft WINS implementation makes a couple of changes to the RFC's:

The NBNS implementation in Samba (nmbd) followed the Microsoft guidelines, so is not completely suitable for use in an OS/2 environment. Without these features OS/2 is unable to perform domain location functions across IP subnets, which among other things prevents OS/2 client logons to domains (both OS/2 and NT). The patches provided here add functionality to Samba to allow full OS/2 support in a NetBIOS over TCP/IP environment:

The above two changes are enough to fix the missing OS/2 functionality. Two other changes are made as well:

The former is a Samba bug, it treated all datagram packets the same, while the datagram types used by the NBDD have a different structure. The latest change is a workaround for what appears to be an OS/2 problem. When a system registers its name with an NBNS it negotiates a TTL with the NBNS. Before the expiration of that TTL the client should refresh its name with the NBNS. Over time OS/2 systems appear to lose sync with the server, and don't refresh their names until after Samba has deleted the name from the list. The parameter added tells Samba to wait past the expiration time before deleting the name from its list.

I've been running these changes in a mixed OS/2, NT, and Samba environment for over a year now without a problem. One day I would like these changes to become a part of the standard Samba distribution, but until then I will maintain the changes as separate patches.


Download

The most recent patch is provided against Samba 2.2.1a and 2.2.0. It should work on any system that Samba currently supports. This means a non-OS/2 system is needed to act as the NBNS/NBDD.

You may need to shift-click to download.

Version 1.2 (5/7/2001)

Fix: NBDD no longer forwards a datagram back to the sender if the sender is in the destination group. If there is interest in a port back to 2.0.9 let me know.

For Samba 3.0.6 (untested, provided by a third party) - 306-patch-1.2.tgz

For Samba 2.2.1a - 221a-patch-1.2.tgz

For Samba 2.2.0 - 220-patch-1.2.tgz

Version 1.1 (2/22/2001)

Fixes problem where OS/2 systems cannot logon to a domain which the Samba NBNS/NBDD is a member of.

For Samba 2.0.7 - 207-patch-1.1.tgz

For Samba 2.0.8 - 208-patch-1.1.tgz

For Samba 2.2.0 - 220-patch-1.1.tgz

Version 1.0

For Samba 2.0.6 - 206-patch-1.0.tgz

For Samba 2.0.7 - 207-patch-1.0.tgz


Installation

These instructions assume prior knowledge of installing and configuring Samba. Download the Samba source from www.samba.org and follow these steps (shown for Samba 2.0.7):

  1. download samba-2.0.7.tar.gz and 207-patch-1.1.tgz
  2. tar zxf samba-2.0.7.tar.gz
  3. tar zxf 207-patch-1.1.tgz
  4. mv nbdd-207.patch ./samba-2.0.7
  5. cd samba-2.0.7
  6. patch -p0 < nbdd-207.patch
  7. compile, install, and configure Samba as normal
  8. enable WINS support in smb.conf: wins support = yes
  9. enable NBDD support in smb.conf: nbdd support = yes
  10. if desired, add the "wins grace ttl", I use 2 days: max wins grace ttl = 172800
  11. use MPTS on your OS/2 systems to use the Samba server as both NBNS and NBDD


Caveats

Fixed in 1.1 - If the Samba NBNS server with this patch is set to the same workgroup/domain as an existing NT or OS/2 domain, then you will be unable to logon to that domain. I think I know why this happens, I just need to find time to fix it. In the meantime make sure the domain in smb.conf is different.


Questions and Comments

Please email me at landy AT alumni.caltech.edu. I hope you find this useful!

Brian Landy
2/22/2001