24.3 NBNS Wildcard DMB Queries and Enhanced Browsing

24.3 NBNS Wildcard DMB Queries and Enhanced Browsing

Samba's implementation of the NBNS supports a non-standard wildcard Domain Master Browser query. You can send a query for the name " *<1B> " (that's an asterisk, followed by 14 bytes of either space or nul padding, with a suffix byte value of 0x1B ), and Samba's NBNS will return a list of all of the IP addresses of all Domain Master Browsers that have registered with it. In other words, all of the IP addresses for all of the <1B> names in its database.

If the ENHANCED BROWSING parameter is set to TRUE (the default), a Samba DMB will periodically send a query for " *<1B> " to the NBNS to get the list of DMB IPs. The Samba DMB will then go through the list of IPs and send a NODE STATUS REQUEST message to any IP address that it doesn't already recognize. The reply will contain the registered workgroup <1B> name of the "foreign" DMB.

This trick is used by Samba to short-cut the building of the workgroup list. The normal mechanism relies on Local Master Browsers to discover foreign workgroups on their own subnet and report them back to the DMB. That process is slow and, as shown in Figure 24.1, workgroups can be isolated on separate subnets where they will never see or be seen by foreigners. By querying the NBNS for the list of DMBs, Samba does a better job of ensuring that all of the workgroups within the NBT namespace know about one another.

Figure 24.1. Hidden workgroups

The ARTHROPODS and MAMMALS workgroups are isolated because there is no subnet on which they both have a Local or Domain Master Browser. Workgroups normally find one another by broadcasting DomainAnnouncement messages on the local LAN. Samba can query the NBNS to find Domain Master Browsers on remote subnets, and synchronize with them to merge isolated Browse Lists.

graphics/24fig01.gif

...but it's not perfect. There might be workgroups out there that don't have a DMB, in which case querying the NBNS for DMB names won't help much. With Enhanced Browsing enabled, a Samba DMB will try to find lost workgroups by periodically querying other DMBs to see if they know about them. The Samba DMB then adds any missing workgroups to its internal list.

There is a downside to this second trick, which is that bogus or expired workgroup names, once added to the Browse List, may never disappear. Samba DMBs may wind up sending the bogus names back and forth like an urban legend. This is known as the "Dead Workgroup" problem. The comments under ENHANCED BROWSING in the smb.conf manual page suggest disabling this feature if empty workgroups won't go away.

Note that Windows also has a work-around for this problem. You can specify foreign DMBs in the LMHOSTS file on a known DMB, and the DMB will include the foreign names in its Browse List and try to synchronize with them.



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