[217] | 1 | <?xml version="1.0" encoding="iso-8859-1"?>
|
---|
| 2 | <!DOCTYPE chapter PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
|
---|
| 3 | <chapter id="wins">
|
---|
| 4 | <chapterinfo>
|
---|
| 5 | <author>
|
---|
| 6 | <firstname>Gerald</firstname><surname>Carter</surname>
|
---|
| 7 | </author>
|
---|
| 8 | <pubdate>October 2002</pubdate>
|
---|
| 9 | </chapterinfo>
|
---|
| 10 |
|
---|
| 11 |
|
---|
| 12 | <title>Samba WINS Internals</title>
|
---|
| 13 |
|
---|
| 14 |
|
---|
| 15 | <sect1>
|
---|
| 16 | <title>WINS Failover</title>
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | <para>
|
---|
| 20 | The current Samba codebase possesses the capability to use groups of WINS
|
---|
| 21 | servers that share a common namespace for NetBIOS name registration and
|
---|
| 22 | resolution. The formal parameter syntax is
|
---|
| 23 | </para>
|
---|
| 24 |
|
---|
| 25 | <para><programlisting>
|
---|
| 26 | WINS_SERVER_PARAM = SERVER [ SEPARATOR SERVER_LIST ]
|
---|
| 27 | WINS_SERVER_PARAM = "wins server"
|
---|
| 28 | SERVER = ADDR[:TAG]
|
---|
| 29 | ADDR = ip_addr | fqdn
|
---|
| 30 | TAG = string
|
---|
| 31 | SEPARATOR = comma | \s+
|
---|
| 32 | SERVER_LIST = SERVER [ SEPARATOR SERVER_LIST ]
|
---|
| 33 | </programlisting></para>
|
---|
| 34 |
|
---|
| 35 | <para>
|
---|
| 36 | A simple example of a valid wins server setting is
|
---|
| 37 | </para>
|
---|
| 38 |
|
---|
| 39 | <para><programlisting>
|
---|
| 40 | [global]
|
---|
| 41 | wins server = 192.168.1.2 192.168.1.3
|
---|
| 42 | </programlisting></para>
|
---|
| 43 |
|
---|
| 44 | <para>
|
---|
| 45 | In the event that no TAG is defined in for a SERVER in the list, smbd assigns a default
|
---|
| 46 | TAG of "*". A TAG is used to group servers of a shared NetBIOS namespace together. Upon
|
---|
| 47 | startup, nmbd will attempt to register the netbios name value with one server in each
|
---|
| 48 | tagged group.
|
---|
| 49 | </para>
|
---|
| 50 |
|
---|
| 51 | <para>
|
---|
| 52 | An example using tags to group WINS servers together is show here. Note that the use of
|
---|
| 53 | interface names in the tags is only by convention and is not a technical requirement.
|
---|
| 54 | </para>
|
---|
| 55 |
|
---|
| 56 |
|
---|
| 57 | <para><programlisting>
|
---|
| 58 | [global]
|
---|
| 59 | wins server = 192.168.1.2:eth0 192.168.1.3:eth0 192.168.2.2:eth1
|
---|
| 60 | </programlisting></para>
|
---|
| 61 |
|
---|
| 62 | <para>
|
---|
| 63 | Using this configuration, nmbd would attempt to register the server's NetBIOS name
|
---|
| 64 | with one WINS server in each group. Because the "eth0" group has two servers, the
|
---|
| 65 | second server would only be used when a registration (or resolution) request to
|
---|
| 66 | the first server in that group timed out.
|
---|
| 67 | </para>
|
---|
| 68 |
|
---|
| 69 | <para>
|
---|
| 70 | NetBIOS name resolution follows a similar pattern as name registration. When resolving
|
---|
| 71 | a NetBIOS name via WINS, smbd and other Samba programs will attempt to query a single WINS
|
---|
| 72 | server in a tagged group until either a positive response is obtained at least once or
|
---|
| 73 | until a server from every tagged group has responded negatively to the name query request.
|
---|
| 74 | If a timeout occurs when querying a specific WINS server, that server is marked as down to
|
---|
| 75 | prevent further timeouts and the next server in the WINS group is contacted. Once marked as
|
---|
| 76 | dead, Samba will not attempt to contact that server for name registration/resolution queries
|
---|
| 77 | for a period of 10 minutes.
|
---|
| 78 | </para>
|
---|
| 79 |
|
---|
| 80 | </sect1>
|
---|
| 81 | </chapter>
|
---|