Debian Codegraph @

rfc1001.html

raw
1 <pre>Network Working Group
2 Request for Comments: 1001 March, 1987
3
4
5
6
7 <span class="h1">PROTOCOL STANDARD FOR A NetBIOS SERVICE</span>
8 <span class="h1">ON A TCP/UDP TRANSPORT:</span>
9 <span class="h1">CONCEPTS AND METHODS</span>
10
11
12
13
14 ABSTRACT
15
16 This RFC defines a proposed standard protocol to support NetBIOS
17 services in a TCP/IP environment. Both local network and internet
18 operation are supported. Various node types are defined to accommodate
19 local and internet topologies and to allow operation with or without the
20 use of IP broadcast.
21
22 This RFC describes the NetBIOS-over-TCP protocols in a general manner,
23 emphasizing the underlying ideas and techniques. Detailed
24 specifications are found in a companion RFC, "Protocol Standard For a
25 NetBIOS Service on a TCP/UDP Transport: Detailed Specifications".
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 <span class="grey">NetBIOS Working Group [Page 1]</span></pre>
56 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
57 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
58
59
60 SUMMARY OF CONTENTS
61
62
63 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. STATUS OF THIS MEMO </span> 6
64 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. ACKNOWLEDGEMENTS </span> 6
65 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. INTRODUCTION </span> 7
66 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. DESIGN PRINCIPLES </span> 7
67 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. OVERVIEW OF NetBIOS </span> 10
68 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. NetBIOS FACILITIES SUPPORTED BY THIS STANDARD </span> 15
69 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. REQUIRED SUPPORTING SERVICE INTERFACES AND DEFINITIONS </span> 15
70 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. RELATED PROTOCOLS AND SERVICES </span> 16
71 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. NetBIOS SCOPE </span> 16
72 <span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. NetBIOS END-NODES </span> 16
73 <span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. NetBIOS SUPPORT SERVERS </span> 18
74 <span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. TOPOLOGIES </span> 20
75 <span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. GENERAL METHODS </span> 23
76 <span class="h2"><a class="selflink" id="section-14" href="#section-14">14</a>. REPRESENTATION OF NETBIOS NAMES </span> 25
77 <span class="h2"><a class="selflink" id="section-15" href="#section-15">15</a>. NetBIOS NAME SERVICE </span> 27
78 <span class="h2"><a class="selflink" id="section-16" href="#section-16">16</a>. NetBIOS SESSION SERVICE </span> 48
79 <span class="h2"><a class="selflink" id="section-17" href="#section-17">17</a>. NETBIOS DATAGRAM SERVICE </span> 55
80 <span class="h2"><a class="selflink" id="section-18" href="#section-18">18</a>. NODE CONFIGURATION PARAMETERS </span> 58
81 <span class="h2"><a class="selflink" id="section-19" href="#section-19">19</a>. MINIMAL CONFORMANCE </span> 59
82 REFERENCES 60
83 APPENDIX A - INTEGRATION WITH INTERNET GROUP MULTICASTING 61
84 APPENDIX B - IMPLEMENTATION CONSIDERATIONS 62
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114 <span class="grey">NetBIOS Working Group [Page 2]</span></pre>
115 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
116 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
117
118
119 TABLE OF CONTENTS
120
121
122 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. STATUS OF THIS MEMO </span> 6
123
124 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. ACKNOWLEDGEMENTS </span> 6
125
126 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. INTRODUCTION </span> 7
127
128 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. DESIGN PRINCIPLES </span> 8
129 4.1 PRESERVE NetBIOS SERVICES 8
130 4.2 USE EXISTING STANDARDS 8
131 4.3 MINIMIZE OPTIONS 8
132 4.4 TOLERATE ERRORS AND DISRUPTIONS 8
133 4.5 DO NOT REQUIRE CENTRAL MANAGEMENT 9
134 4.6 ALLOW INTERNET OPERATION 9
135 4.7 MINIMIZE BROADCAST ACTIVITY 9
136 4.8 PERMIT IMPLEMENTATION ON EXISTING SYSTEMS 9
137 4.9 REQUIRE ONLY THE MINIMUM NECESSARY TO OPERATE 9
138 4.10 MAXIMIZE EFFICIENCY 10
139 4.11 MINIMIZE NEW INVENTIONS 10
140
141 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. OVERVIEW OF NetBIOS </span> 10
142 5.1 INTERFACE TO APPLICATION PROGRAMS 10
143 5.2 NAME SERVICE 11
144 5.3 SESSION SERVICE 12
145 5.4 DATAGRAM SERVICE 13
146 5.5 MISCELLANEOUS FUNCTIONS 14
147 5.6 NON-STANDARD EXTENSIONS 15
148
149 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. NetBIOS FACILITIES SUPPORTED BY THIS STANDARD </span> 15
150
151 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. REQUIRED SUPPORTING SERVICE INTERFACES AND DEFINITIONS </span> 15
152
153 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. RELATED PROTOCOLS AND SERVICES </span> 16
154
155 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. NetBIOS SCOPE </span> 16
156
157 <span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. NetBIOS END-NODES </span> 16
158 10.1 BROADCAST (B) NODES 16
159 10.2 POINT-TO-POINT (P) NODES 16
160 10.3 MIXED MODE (M) NODES 16
161
162 <span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. NetBIOS SUPPORT SERVERS </span> 18
163 11.1 NetBIOS NAME SERVER (NBNS) NODES 18
164 11.1.1 RELATIONSHIP OF THE NBNS TO THE DOMAIN NAME SYSTEM 19
165 11.2 NetBIOS DATAGRAM DISTRIBUTION SERVER (NBDD) NODES 19
166 11.3 RELATIONSHIP OF NBNS AND NBDD NODES 20
167 11.4 RELATIONSHIP OF NetBIOS SUPPORT SERVERS AND B NODES 20
168 <span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. TOPOLOGIES </span> 20
169 12.1 LOCAL 20
170
171
172
173 <span class="grey">NetBIOS Working Group [Page 3]</span></pre>
174 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
175 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
176
177
178 12.1.1 B NODES ONLY 21
179 12.1.2 P NODES ONLY 21
180 12.1.3 MIXED B AND P NODES 21
181 12.2 INTERNET 22
182 12.2.1 P NODES ONLY 22
183 12.2.2 MIXED M AND P NODES 23
184
185 <span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. GENERAL METHODS </span> 23
186 13.1 REQUEST/RESPONSE INTERACTION STYLE 23
187 13.1.1 RETRANSMISSION OF REQUESTS 24
188 13.1.2 REQUESTS WITHOUT RESPONSES: DEMANDS 24
189 13.2 TRANSACTIONS 25
190 13.2.1 TRANSACTION ID 25
191 13.3 TCP AND UDP FOUNDATIONS 25
192
193 <span class="h2"><a class="selflink" id="section-14" href="#section-14">14</a>. REPRESENTATION OF NETBIOS NAMES </span> 25
194 14.1 FIRST LEVEL ENCODING 26
195 14.2 SECOND LEVEL ENCODING 27
196
197 <span class="h2"><a class="selflink" id="section-15" href="#section-15">15</a>. NetBIOS NAME SERVICE </span> 27
198 15.1 OVERVIEW OF NetBIOS NAME SERVICE 27
199 15.1.1 NAME REGISTRATION (CLAIM) 27
200 15.1.2 NAME QUERY (DISCOVERY) 28
201 15.1.3 NAME RELEASE 28
202 15.1.3.1 EXPLICIT RELEASE 28
203 15.1.3.2 NAME LIFETIME AND REFRESH 29
204 15.1.3.3 NAME CHALLENGE 29
205 15.1.3.4 GROUP NAME FADE-OUT 29
206 15.1.3.5 NAME CONFLICT 30
207 15.1.4 ADAPTER STATUS 31
208 15.1.5 END-NODE NBNS INTERACTION 31
209 15.1.5.1 UDP, TCP, AND TRUNCATION 31
210 15.1.5.2 NBNS WACK 32
211 15.1.5.3 NBNS REDIRECTION 32
212 15.1.6 SECURED VERSUS NON-SECURED NBNS 32
213 15.1.7 CONSISTENCY OF THE NBNS DATA BASE 32
214 15.1.8 NAME CACHING 34
215 15.2 NAME REGISTRATION TRANSACTIONS 34
216 15.2.1 NAME REGISTRATION BY B NODES 34
217 15.2.2 NAME REGISTRATION BY P NODES 35
218 15.2.2.1 NEW NAME, OR NEW GROUP MEMBER 35
219 15.2.2.2 EXISTING NAME AND OWNER IS STILL ACTIVE 36
220 15.2.2.3 EXISTING NAME AND OWNER IS INACTIVE 37
221 15.2.3 NAME REGISTRATION BY M NODES 38
222 15.3 NAME QUERY TRANSACTIONS 39
223 15.3.1 QUERY BY B NODES 39
224 15.3.2 QUERY BY P NODES 40
225 15.3.3 QUERY BY M NODES 43
226 15.3.4 ACQUIRE GROUP MEMBERSHIP LIST 43
227 15.4 NAME RELEASE TRANSACTIONS 44
228 15.4.1 RELEASE BY B NODES 44
229
230
231
232 <span class="grey">NetBIOS Working Group [Page 4]</span></pre>
233 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
234 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
235
236
237 15.4.2 RELEASE BY P NODES 44
238 15.4.3 RELEASE BY M NODES 44
239 15.5 NAME MAINTENANCE TRANSACTIONS 45
240 15.5.1 NAME REFRESH 45
241 15.5.2 NAME CHALLENGE 46
242 15.5.3 CLEAR NAME CONFLICT 47
243 15.6 ADAPTER STATUS TRANSACTIONS 47
244
245 <span class="h2"><a class="selflink" id="section-16" href="#section-16">16</a>. NetBIOS SESSION SERVICE </span> 48
246 16.1 OVERVIEW OF NetBIOS SESSION SERVICE 49
247 16.1.1 SESSION ESTABLISHMENT PHASE OVERVIEW 49
248 16.1.1.1 RETRYING AFTER BEING RETARGETTED 50
249 16.1.1.2 SESSION ESTABLISHMENT TO A GROUP NAME 51
250 16.1.2 STEADY STATE PHASE OVERVIEW 51
251 16.1.3 SESSION TERMINATION PHASE OVERVIEW 51
252 16.2 SESSION ESTABLISHMENT PHASE 52
253 16.3 SESSION DATA TRANSFER PHASE 54
254 16.3.1 DATA ENCAPSULATION 54
255 16.3.2 SESSION KEEP-ALIVES 54
256
257 <span class="h2"><a class="selflink" id="section-17" href="#section-17">17</a>. NETBIOS DATAGRAM SERVICE </span> 55
258 17.1 OVERVIEW OF NetBIOS DATAGRAM SERVICE 55
259 17.1.1 UNICAST, MULTICAST, AND BROADCAST 55
260 17.1.2 FRAGMENTATION OF NetBIOS DATAGRAMS 55
261 17.2 NetBIOS DATAGRAMS BY B NODES 57
262 17.3 NetBIOS DATAGRAMS BY P AND M NODES 58
263
264 <span class="h2"><a class="selflink" id="section-18" href="#section-18">18</a>. NODE CONFIGURATION PARAMETERS </span> 58
265
266 <span class="h2"><a class="selflink" id="section-19" href="#section-19">19</a>. MINIMAL CONFORMANCE </span> 59
267
268 REFERENCES 60
269
270 APPENDIX A 61
271
272 INTEGRATION WITH INTERNET GROUP MULTICASTING 61
273 A-1. ADDITIONAL PROTOCOL REQUIRED IN B AND M NODES 61
274 A-2. CONSTRAINTS 61
275
276 APPENDIX B 62
277
278 IMPLEMENTATION CONSIDERATIONS 62
279 B-1. IMPLEMENTATION MODELS 62
280 B-1.1 MODEL INDEPENDENT CONSIDERATIONS 63
281 B-1.2 SERVICE OPERATION FOR EACH MODEL 63
282 B-2. CASUAL AND RESTRICTED NetBIOS APPLICATIONS 64
283 B-3. TCP VERSUS SESSION KEEP-ALIVES 66
284 B-4. RETARGET ALGORITHMS 67
285 B-5. NBDD SERVICE 68
286 B-6. APPLICATION CONSIDERATIONS 68
287 B-6.1 USE OF NetBIOS DATAGRAMS 68
288
289
290
291 <span class="grey">NetBIOS Working Group [Page 5]</span></pre>
292 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
293 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
294
295
296 PROTOCOL STANDARD FOR A NetBIOS SERVICE
297 ON A TCP/UDP TRANSPORT:
298 CONCEPTS AND METHODS
299
300
301 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. STATUS OF THIS MEMO</span>
302
303 This RFC specifies a proposed standard for the Internet
304 community. Since this topic is new to the Internet community,
305 discussions and suggestions are specifically requested.
306
307 Please send written comments to:
308
309 Karl Auerbach
310 Epilogue Technology Corporation
311 P.O. Box 5432
312 Redwood City, CA 94063
313
314 Please send online comments to:
315
316 Avnish Aggarwal
317 Internet: [email protected]
318 Usenet: ucbvax!mtxinu!excelan!avnish
319
320 Distribution of this document is unlimited.
321
322 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. ACKNOWLEDGEMENTS</span>
323
324 This RFC has been developed under the auspices of the Internet
325 Activities Board, especially the End-to-End Services Task Force.
326
327 The following individuals have contributed to the development of
328 this RFC:
329
330 Avnish Aggarwal Arvind Agrawal Lorenzo Aguilar
331 Geoffrey Arnold Karl Auerbach K. Ramesh Babu
332 Keith Ball Amatzia Ben-Artzi Vint Cerf
333 Richard Cherry David Crocker Steve Deering
334 Greg Ennis Steve Holmgren Jay Israel
335 David Kaufman Lee LaBarre James Lau
336 Dan Lynch Gaylord Miyata David Stevens
337 Steve Thomas Ishan Wu
338
339 The system proposed by this RFC does not reflect any existing
340 Netbios-over-TCP implementation. However, the design
341 incorporates considerable knowledge obtained from prior
342 implementations. Special thanks goes to the following
343 organizations which have provided this invaluable information:
344
345 CMC/Syros Excelan Sytek Ungermann-Bass
346
347
348
349
350 <span class="grey">NetBIOS Working Group [Page 6]</span></pre>
351 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
352 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
353
354
355 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. INTRODUCTION</span>
356
357 This RFC describes the ideas and general methods used to provide
358 NetBIOS on a TCP and UDP foundation. A companion RFC, "Protocol
359 Standard For a NetBIOS Service on a TCP/UDP Transport: Detailed
360 Specifications"[<a href="#ref-1" title="&quot;Protocol Standard For a NetBIOS Service on a TCP/UDP Transport: Detailed Specifications&quot;">1</a>] contains detailed descriptions of packet
361 formats, protocols, and defined constants and variables.
362
363 The NetBIOS service has become the dominant mechanism for
364 personal computer networking. NetBIOS provides a vendor
365 independent interface for the IBM Personal Computer (PC) and
366 compatible systems.
367
368 NetBIOS defines a software interface not a protocol. There is no
369 "official" NetBIOS service standard. In practice, however, the
370 IBM PC-Network version is used as a reference. That version is
371 described in the IBM document 6322916, "Technical Reference PC
372 Network"[<a href="#ref-2" title="&quot;IBM PC Network Technical Reference Manual&quot;">2</a>].
373
374 Protocols supporting NetBIOS services have been constructed on
375 diverse protocol and hardware foundations. Even when the same
376 foundation is used, different implementations may not be able to
377 interoperate unless they use a common protocol. To allow NetBIOS
378 interoperation in the Internet, this RFC defines a standard
379 protocol to support NetBIOS services using TCP and UDP.
380
381 NetBIOS has generally been confined to personal computers to
382 date. However, since larger computers are often well suited to
383 run certain NetBIOS applications, such as file servers, this
384 specification has been designed to allow an implementation to be
385 built on virtually any type of system where the TCP/IP protocol
386 suite is available.
387
388 This standard defines a set of protocols to support NetBIOS
389 services.
390
391 These protocols are more than a simple communications service
392 involving two entities. Rather, this note describes a
393 distributed system in which many entities play a part even if
394 they are not involved as an end-point of a particular NetBIOS
395 connection.
396
397 This standard neither constrains nor determines how those
398 services are presented to application programs.
399
400 Nevertheless, it is expected that on computers operating under
401 the PC-DOS and MS-DOS operating systems that the existing NetBIOS
402 interface will be preserved by implementors.
403
404 NOTE: Various symbolic values are used in this document. For
405 their definitions, refer to the Detailed Specifications[1].
406
407
408
409 <span class="grey">NetBIOS Working Group [Page 7]</span></pre>
410 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
411 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
412
413
414 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. DESIGN PRINCIPLES</span>
415
416 In order to develop the specification the following design principles
417 were adopted to guide the effort. Most are typical to any protocol
418 standardization effort; however, some have been assigned priorities
419 that may be considered unusual.
420
421 <span class="h3"><a class="selflink" id="section-4.1" href="#section-4.1">4.1</a>. PRESERVE NetBIOS SERVICES</span>
422
423 In the absence of an "official" standard for NetBIOS services, the
424 version found in the IBM PC Network Technical Reference[2] is used.
425
426 NetBIOS is the foundation of a large body of existing applications.
427 It is desirable to operate these applications on TCP networks and to
428 extend them beyond personal computers into larger hosts. To support
429 these applications, NetBIOS on TCP must closely conform to the
430 services offered by existing NetBIOS systems.
431
432 IBM PC-Network NetBIOS contains some implementation specific
433 characteristics. This standard does not attempt to completely
434 preserve these. It is certain that some existing software requires
435 these characteristics and will fail to operate correctly on a NetBIOS
436 service based on this RFC.
437
438 <span class="h3"><a class="selflink" id="section-4.2" href="#section-4.2">4.2</a>. USE EXISTING STANDARDS</span>
439
440 Protocol development, especially with standardization, is a demanding
441 process. The development of new protocols must be minimized.
442
443 It is considered essential that an existing standard which provides
444 the necessary functionality with reasonable performance always be
445 chosen in preference to developing a new protocol.
446
447 When a standard protocol is used, it must be unmodified.
448
449 <span class="h3"><a class="selflink" id="section-4.3" href="#section-4.3">4.3</a>. MINIMIZE OPTIONS</span>
450
451 The standard for NetBIOS on TCP should contain few, if any, options.
452
453 Where options are included, the options should be designed so that
454 devices with different option selections should interoperate.
455
456 <span class="h3"><a class="selflink" id="section-4.4" href="#section-4.4">4.4</a>. TOLERATE ERRORS AND DISRUPTIONS</span>
457
458 NetBIOS networks typically operate in an uncontrolled environment.
459 Computers come on-line at arbitrary times. Computers usually go
460 off-line without any notice to their peers. The software is often
461 operated by users who are unfamiliar with networks and who may
462 randomly perturb configuration settings.
463
464 Despite this chaos, NetBIOS networks work. NetBIOS on TCP must also
465
466
467
468 <span class="grey">NetBIOS Working Group [Page 8]</span></pre>
469 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
470 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
471
472
473 be able to operate well in this environment.
474
475 Robust operation does not necessarily mean that the network is proof
476 against all disruptions. A typical NetBIOS network may be disrupted
477 by certain types of behavior, whether inadvertent or malicious.
478
479 <span class="h3"><a class="selflink" id="section-4.5" href="#section-4.5">4.5</a>. DO NOT REQUIRE CENTRAL MANAGEMENT</span>
480
481 NetBIOS on TCP should be able to operate, if desired, without
482 centralized management beyond that typically required by a TCP based
483 network.
484
485 <span class="h3"><a class="selflink" id="section-4.6" href="#section-4.6">4.6</a>. ALLOW INTERNET OPERATION</span>
486
487 The proposed standard recognizes the need for NetBIOS operation
488 across a set of networks interconnected by network (IP) level relays
489 (gateways.)
490
491 However, the standard assumes that this form of operation will be
492 less frequent than on the local MAC bridged-LAN.
493
494 <span class="h3"><a class="selflink" id="section-4.7" href="#section-4.7">4.7</a>. MINIMIZE BROADCAST ACTIVITY</span>
495
496 The standard pre-supposes that the only broadcast services are those
497 supported by UDP. Multicast capabilities are not assumed to be
498 available in any form.
499
500 Despite the availability of broadcast capabilities, the standard
501 recognizes that some administrations may wish to avoid heavy
502 broadcast activity. For example, an administration may wish to avoid
503 isolated non-participating hosts from the burden of receiving and
504 discarding NetBIOS broadcasts.
505
506 <span class="h3"><a class="selflink" id="section-4.8" href="#section-4.8">4.8</a>. PERMIT IMPLEMENTATION ON EXISTING SYSTEMS</span>
507
508 The NetBIOS on TCP protocol should be implementable on common
509 operating systems, such as Unix(tm) and VAX/VMS(tm), without massive
510 effort.
511
512 The NetBIOS protocols should not require services typically
513 unavailable on presently existing TCP/UDP/IP implementations.
514
515 <span class="h3"><a class="selflink" id="section-4.9" href="#section-4.9">4.9</a>. REQUIRE ONLY THE MINIMUM NECESSARY TO OPERATE</span>
516
517 The protocol definition should specify only the minimal set of
518 protocols required for interoperation. However, additional protocol
519 elements may be defined to enhance efficiency. These latter elements
520 may be generated at the option of the sender, although they must be
521 accepted by all receivers.
522
523
524
525
526
527 <span class="grey">NetBIOS Working Group [Page 9]</span></pre>
528 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
529 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
530
531
532 <span class="h3"><a class="selflink" id="section-4.10" href="#section-4.10">4.10</a>. MAXIMIZE EFFICIENCY</span>
533
534 To be useful, a protocol must conduct its business quickly.
535
536 <span class="h3"><a class="selflink" id="section-4.11" href="#section-4.11">4.11</a>. MINIMIZE NEW INVENTIONS</span>
537
538 When an existing protocol is not quite able to support a necessary
539 function, but with a small amount of change, it could, that protocol
540 should be used. This is felt to be easier to achieve than
541 development of new protocols; further, it is likely to have more
542 general utility for the Internet.
543
544 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. OVERVIEW OF NetBIOS</span>
545
546 This section describes the NetBIOS services. It is for background
547 information only. The reader may chose to skip to the next section.
548
549 NetBIOS was designed for use by groups of PCs, sharing a broadcast
550 medium. Both connection (Session) and connectionless (Datagram)
551 services are provided, and broadcast and multicast are supported.
552 Participants are identified by name. Assignment of names is
553 distributed and highly dynamic.
554
555 NetBIOS applications employ NetBIOS mechanisms to locate resources,
556 establish connections, send and receive data with an application
557 peer, and terminate connections. For purposes of discussion, these
558 mechanisms will collectively be called the NetBIOS Service.
559
560 This service can be implemented in many different ways. One of the
561 first implementations was for personal computers running the PC-DOS
562 and MS-DOS operating systems. It is possible to implement NetBIOS
563 within other operating systems, or as processes which are,
564 themselves, simply application programs as far as the host operating
565 system is concerned.
566
567 The NetBIOS specification, published by IBM as "Technical Reference
568 PC Network"[<a href="#ref-2" title="&quot;IBM PC Network Technical Reference Manual&quot;">2</a>] defines the interface and services available to the
569 NetBIOS user. The protocols outlined by that document pertain only
570 to the IBM PC Network and are not generally applicable to other
571 networks.
572
573 <span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. INTERFACE TO APPLICATION PROGRAMS</span>
574
575 NetBIOS on personal computers includes both a set of services and an
576 exact program interface to those services. NetBIOS on other computer
577 systems may present the NetBIOS services to programs using other
578 interfaces. Except on personal computers, no clear standard for a
579 NetBIOS software interface has emerged.
580
581
582
583
584
585
586 <span class="grey">NetBIOS Working Group [Page 10]</span></pre>
587 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
588 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
589
590
591 <span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. NAME SERVICE</span>
592
593 NetBIOS resources are referenced by name. Lower-level address
594 information is not available to NetBIOS applications. An
595 application, representing a resource, registers one or more names
596 that it wishes to use.
597
598 The name space is flat and uses sixteen alphanumeric characters.
599 Names may not start with an asterisk (*).
600
601 Registration is a bid for use of a name. The bid may be for
602 exclusive (unique) or shared (group) ownership. Each application
603 contends with the other applications in real time. Implicit
604 permission is granted to a station when it receives no objections.
605 That is, a bid is made and the application waits for a period of
606 time. If no objections are received, the station assumes that it has
607 permission.
608
609 A unique name should be held by only one station at a time. However,
610 duplicates ("name conflicts") may arise due to errors.
611
612 All instances of a group name are equivalent.
613
614 An application referencing a name generally does not know (or care)
615 whether the name is registered as a unique or a group name.
616
617 An explicit name deletion function is specified, so that applications
618 may remove a name. Implicit name deletion occurs when a station
619 ceases operation. In the case of personal computers, implicit name
620 deletion is a frequent occurrence.
621
622 The Name Service primitives are:
623
624 1) Add Name
625
626 The requesting application wants exclusive use of the name.
627
628 2) Add Group Name
629
630 The requesting application is willing to share use of the
631 name with other applications.
632
633 3) Delete Name
634
635 The application no longer requires use of the name. It is
636 important to note that typical use of NetBIOS is among
637 independently-operated personal computers. A common way to
638 stop using a PC is to turn it off; in this case, the
639 graceful give-back mechanism, provided by the Delete Name
640 function, is not used. Because this occurs frequently, the
641 network service must support this behavior.
642
643
644
645 <span class="grey">NetBIOS Working Group [Page 11]</span></pre>
646 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
647 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
648
649
650 <span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. SESSION SERVICE</span>
651
652 A session is a reliable message exchange, conducted between a pair of
653 NetBIOS applications. Sessions are full-duplex, sequenced, and
654 reliable. Data is organized into messages. Each message may range
655 in size from 0 to 131,071 bytes. No expedited or urgent data
656 capabilities are present.
657
658 Multiple sessions may exist between any pair of calling and called
659 names.
660
661 The parties to a connection have access to the calling and called
662 names.
663
664 The NetBIOS specification does not define how a connection request to
665 a shared (group) name resolves into a session. The usual assumption
666 is that a session may be established with any one owner of the called
667 group name.
668
669 An important service provided to NetBIOS applications is the
670 detection of sessions failure. The loss of a session is reported to
671 an application via all of the outstanding service requests for that
672 session. For example, if the application has only a NetBIOS receive
673 primitive pending and the session terminates, the pending receive
674 will abort with a termination indication.
675
676 Session Service primitives are:
677
678 1) Call
679
680 Initiate a session with a process that is listening under
681 the specified name. The calling entity must indicate both a
682 calling name (properly registered to the caller) and a
683 called name.
684
685 2) Listen
686
687 Accept a session from a caller. The listen primitive may be
688 constrained to accept an incoming call from a named caller.
689 Alternatively, a call may be accepted from any caller.
690
691 3) Hang Up
692
693 Gracefully terminate a session. All pending data is
694 transferred before the session is terminated.
695
696 4) Send
697
698 Transmit one message. A time-out can occur. A time-out of
699 any session send forces the non-graceful termination of the
700 session.
701
702
703
704 <span class="grey">NetBIOS Working Group [Page 12]</span></pre>
705 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
706 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
707
708
709 A "chain send" primitive is required by the PC NetBIOS
710 software interface to allow a single message to be gathered
711 from pieces in various buffers. Chain Send is an interface
712 detail and does not effect the protocol.
713
714 5) Receive
715
716 Receive data. A time-out can occur. A time-out on a
717 session receive only terminates the receive, not the
718 session, although the data is lost.
719
720 The receive primitive may be implemented with variants, such
721 as "Receive Any", which is required by the PC NetBIOS
722 software interface. Receive Any is an interface detail and
723 does not effect the protocol.
724
725 6) Session Status
726
727 Obtain information about all of the requestor's sessions,
728 under the specified name. No network activity is involved.
729
730 <span class="h3"><a class="selflink" id="section-5.4" href="#section-5.4">5.4</a>. DATAGRAM SERVICE</span>
731
732 The Datagram service is an unreliable, non-sequenced, connectionless
733 service. Datagrams are sent under cover of a name properly
734 registered to the sender.
735
736 Datagrams may be sent to a specific name or may be explicitly
737 broadcast.
738
739 Datagrams sent to an exclusive name are received, if at all, by the
740 holder of that name. Datagrams sent to a group name are multicast to
741 all holders of that name. The sending application program cannot
742 distinguish between group and unique names and thus must act as if
743 all non-broadcast datagrams are multicast.
744
745 As with the Session Service, the receiver of the datagram is told the
746 sending and receiving names.
747
748 Datagram Service primitives are:
749
750 1) Send Datagram
751
752 Send an unreliable datagram to an application that is
753 associated with the specified name. The name may be unique
754 or group; the sender is not aware of the difference. If the
755 name belongs to a group, then each member is to receive the
756 datagram.
757
758
759
760
761
762
763 <span class="grey">NetBIOS Working Group [Page 13]</span></pre>
764 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
765 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
766
767
768 2) Send Broadcast Datagram
769
770 Send an unreliable datagram to any application with a
771 Receive Broadcast Datagram posted.
772
773 3) Receive Datagram
774
775 Receive a datagram sent by a specified originating name to
776 the specified name. If the originating name is an asterisk,
777 then the datagram may have been originated under any name.
778
779 Note: An arriving datagram will be delivered to all pending
780 Receiving Datagrams that have source and destination
781 specifications matching those of the datagram. In other
782 words, if a program (or group of programs) issue a series of
783 identical Receive Datagrams, one datagram will cause the
784 entire series to complete.
785
786 4) Receive Broadcast Datagram
787
788 Receive a datagram sent as a broadcast.
789
790 If there are multiple pending Receive Broadcast Datagram
791 operations pending, all will be satisfied by the same
792 received datagram.
793
794 <span class="h3"><a class="selflink" id="section-5.5" href="#section-5.5">5.5</a>. MISCELLANEOUS FUNCTIONS</span>
795
796 The following functions are present to control the operation of the
797 hardware interface to the network. These functions are generally
798 implementation dependent.
799
800 1) Reset
801
802 Initialize the local network adapter.
803
804 2) Cancel
805
806 Abort a pending NetBIOS request. The successful cancel of a
807 Send (or Chain Send) operation will terminate the associated
808 session.
809
810 3) Adapter Status
811
812 Obtain information about the local network adapter or of a
813 remote adapter.
814
815 4) Unlink
816
817 For use with Remote Program Load (RPL). Unlink redirects
818 the PC boot disk device back to the local disk. See the
819
820
821
822 <span class="grey">NetBIOS Working Group [Page 14]</span></pre>
823 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
824 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
825
826
827 NetBIOS specification for further details concerning RPL and
828 the Unlink operation (see page 2-35 in [<a href="#ref-2" title="&quot;IBM PC Network Technical Reference Manual&quot;">2</a>]).
829
830 5) Remote Program Load
831
832 Remote Program Load (RPL) is not a NetBIOS function. It is
833 a NetBIOS application defined by IBM in their NetBIOS
834 specification (see pages 2-80 through 2-82 in [<a href="#ref-2" title="&quot;IBM PC Network Technical Reference Manual&quot;">2</a>]).
835
836 <span class="h3"><a class="selflink" id="section-5.6" href="#section-5.6">5.6</a>. NON-STANDARD EXTENSIONS</span>
837
838 The IBM Token Ring implementation of NetBIOS has added at least one
839 new user capability:
840
841 1) Find Name
842
843 This function determines whether a given name has been
844 registered on the network.
845
846 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. NetBIOS FACILITIES SUPPORTED BY THIS STANDARD</span>
847
848 The protocol specified by this standard permits an implementer to
849 provide all of the NetBIOS services as described in the IBM
850 "Technical Reference PC Network"[<a href="#ref-2" title="&quot;IBM PC Network Technical Reference Manual&quot;">2</a>].
851
852 The following NetBIOS facilities are outside the scope of this
853 specification. These are local implementation matters and do not
854 impact interoperability:
855
856 - RESET
857 - SESSION STATUS
858 - UNLINK
859 - RPL (Remote Program Load)
860
861 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. REQUIRED SUPPORTING SERVICE INTERFACES AND DEFINITIONS</span>
862
863 The protocols described in this RFC require service interfaces to the
864 following:
865
866 - TCP[3,4]
867 - UDP[5]
868
869 Byte ordering, addressing conventions (including addresses to be
870 used for broadcasts and multicasts) are defined by the most
871 recent version of:
872
873 - Assigned Numbers[6]
874
875
876 Additional definitions and constraints are in:
877
878
879
880
881 <span class="grey">NetBIOS Working Group [Page 15]</span></pre>
882 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
883 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
884
885
886 - IP[7]
887 - Internet Subnets[8,9,10]
888
889
890 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. RELATED PROTOCOLS AND SERVICES</span>
891
892 The design of the protocols described in this RFC allow for the
893 future incorporation of the following protocols and services.
894 However, before this may occur, certain extensions may be required to
895 the protocols defined in this RFC or to those listed below.
896
897 - Domain Name Service[11,12,13,14]
898 - Internet Group Multicast[15,16]
899
900 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. NetBIOS SCOPE</span>
901
902 A "NetBIOS Scope" is the population of computers across which a
903 registered NetBIOS name is known. NetBIOS broadcast and multicast
904 datagram operations must reach the entire extent of the NetBIOS
905 scope.
906
907 An internet may support multiple, non-intersecting NetBIOS Scopes.
908
909 Each NetBIOS scope has a "scope identifier". This identifier is a
910 character string meeting the requirements of the domain name system
911 for domain names.
912
913 NOTE: Each implementation of NetBIOS-over-TCP must provide
914 mechanisms to manage the scope identifier(s) to be used.
915
916 Control of scope identifiers implies a requirement for additional
917 NetBIOS interface capabilities. These may be provided through
918 extensions of the user service interface or other means (such as node
919 configuration parameters.) The nature of these extensions is not
920 part of this specification.
921
922 <span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. NetBIOS END-NODES</span>
923
924 End-nodes support NetBIOS service interfaces and contain
925 applications.
926
927 Three types of end-nodes are part of this standard:
928
929 - Broadcast ("B") nodes
930 - Point-to-point ("P") nodes
931 - Mixed mode ("M") nodes
932
933 An IP address may be associated with only one instance of one of the
934 above types.
935
936 Without having preloaded name-to-address tables, NetBIOS participants
937
938
939
940 <span class="grey">NetBIOS Working Group [Page 16]</span></pre>
941 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
942 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
943
944
945 are faced with the task of dynamically resolving references to one
946 another. This can be accomplished with broadcast or mediated point-
947 to-point communications.
948
949 B nodes use local network broadcasting to effect a rendezvous with
950 one or more recipients. P and M nodes use the NetBIOS Name Server
951 (NBNS) and the NetBIOS Datagram Distribution Server (NBDD) for this
952 same purpose.
953
954 End-nodes may be combined in various topologies. No matter how
955 combined, the operation of the B, P, and M nodes is not altered.
956
957 NOTE: It is recommended that the administration of a NetBIOS
958 scope avoid using both M and B nodes within the same scope.
959 A NetBIOS scope should contain only B nodes or only P and M
960 nodes.
961
962 <span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. BROADCAST (B) NODES</span>
963
964 Broadcast (or "B") nodes communicate using a mix of UDP datagrams
965 (both broadcast and directed) and TCP connections. B nodes may
966 freely interoperate with one another within a broadcast area. A
967 broadcast area is a single MAC-bridged "B-LAN". (See <a href="#appendix-A">Appendix A</a> for
968 a discussion of using Internet Group Multicasting as a means to
969 extend a broadcast area beyond a single B-LAN.)
970
971 <span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. POINT-TO-POINT (P) NODES</span>
972
973 Point-to-point (or "P") nodes communicate using only directed UDP
974 datagrams and TCP sessions. P nodes neither generate nor listen for
975 broadcast UDP packets. P nodes do, however, offer NetBIOS level
976 broadcast and multicast services using capabilities provided by the
977 NBNS and NBDD.
978
979 P nodes rely on NetBIOS name and datagram distribution servers.
980 These servers may be local or remote; P nodes operate the same in
981 either case.
982
983 <span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a>. MIXED MODE (M) NODES</span>
984
985 Mixed mode nodes (or "M") nodes are P nodes which have been given
986 certain B node characteristics. M nodes use both broadcast and
987 unicast. Broadcast is used to improve response time using the
988 assumption that most resources reside on the local broadcast medium
989 rather than somewhere in an internet.
990
991 M nodes rely upon NBNS and NBDD servers. However, M nodes may
992 continue limited operation should these servers be temporarily
993 unavailable.
994
995
996
997
998
999 <span class="grey">NetBIOS Working Group [Page 17]</span></pre>
1000 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
1001 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1002
1003
1004 <span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. NetBIOS SUPPORT SERVERS</span>
1005
1006 Two types of support servers are part of this standard:
1007
1008 - NetBIOS name server ("NBNS") nodes
1009 - Netbios datagram distribution ("NBDD") nodes
1010
1011 NBNS and NBDD nodes are invisible to NetBIOS applications and are
1012 part of the underlying NetBIOS mechanism.
1013
1014 NetBIOS name and datagram distribution servers are the focus of name
1015 and datagram activity for P and M nodes.
1016
1017 Both the name (NBNS) and datagram distribution (NBDD) servers are
1018 permitted to shift part of their operation to the P or M end-node
1019 which is requesting a service.
1020
1021 Since the assignment of responsibility is dynamic, and since P and M
1022 nodes must be prepared to operate should the NetBIOS server delegate
1023 control to the maximum extent, the system naturally accommodates
1024 improvements in NetBIOS server function. For example, as Internet
1025 Group Multicasting becomes more widespread, new NBDD implementations
1026 may elect to assume full responsibility for NetBIOS datagram
1027 distribution.
1028
1029 Interoperability between different implementations is assured by
1030 imposing requirements on end-node implementations that they be able
1031 to accept the full range of legal responses from the NBNS or NBDD.
1032
1033 <span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a>. NetBIOS NAME SERVER (NBNS) NODES</span>
1034
1035 The NBNS is designed to allow considerable flexibility with its
1036 degree of responsibility for the accuracy and management of NetBIOS
1037 names. On one hand, the NBNS may elect not to accept full
1038 responsibility, leaving the NBNS essentially a "bulletin board" on
1039 which name/address information is freely posted (and removed) by P
1040 and M nodes without validation by the NBNS. Alternatively, the NBNS
1041 may elect to completely manage and validate names. The degree of
1042 responsibility that the NBNS assumes is asserted by the NBNS each
1043 time a name is claimed through a simple mechanism. Should the NBNS
1044 not assert full control, the NBNS returns enough information to the
1045 requesting node so that the node may challenge any putative holder of
1046 the name.
1047
1048 This ability to shift responsibility for NetBIOS name management
1049 between the NBNS and the P and M nodes allows a network administrator
1050 (or vendor) to make a tradeoff between NBNS simplicity, security, and
1051 delay characteristics.
1052
1053 A single NBNS may be implemented as a distributed entity, such as the
1054 Domain Name Service. However, this RFC does not attempt to define
1055
1056
1057
1058 <span class="grey">NetBIOS Working Group [Page 18]</span></pre>
1059 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
1060 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1061
1062
1063 the internal communications which would be used.
1064
1065 <span class="h4"><a class="selflink" id="section-11.1.1" href="#section-11.1.1">11.1.1</a>. RELATIONSHIP OF THE NBNS TO THE DOMAIN NAME SYSTEM</span>
1066
1067 The NBNS design attempts to align itself with the Domain Name System
1068 in a number of ways.
1069
1070 First, the NetBIOS names are encoded in a form acceptable to the
1071 domain name system.
1072
1073 Second, a scope identifier is appended to each NetBIOS name. This
1074 identifier meets the restricted character set of the domain system
1075 and has a leading period. This makes the NetBIOS name, in
1076 conjunction with its scope identifier, a valid domain system name.
1077
1078 Third, the negotiated responsibility mechanisms permit the NBNS to be
1079 used as a simple bulletin board on which are posted (name,address)
1080 pairs. This parallels the existing domain sytem query service.
1081
1082 This RFC, however, requires the NBNS to provide services beyond those
1083 provided by the current domain name system. An attempt has been made
1084 to coalesce all the additional services which are required into a set
1085 of transactions which follow domain name system styles of interaction
1086 and packet formats.
1087
1088 Among the areas in which the domain name service must be extended
1089 before it may be used as an NBNS are:
1090
1091 - Dynamic addition of entries
1092 - Dynamic update of entry data
1093 - Support for multiple instance (group) entries
1094 - Support for entry time-to-live values and ability to accept
1095 refresh messages to restart the time-to-live period
1096 - New entry attributes
1097
1098 <span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a>. NetBIOS DATAGRAM DISTRIBUTION SERVER (NBDD) NODES</span>
1099
1100 The internet does not yet support broadcasting or multicasting. The
1101 NBDD extends NetBIOS datagram distribution service to this
1102 environment.
1103
1104 The NBDD may elect to complete, partially complete, or totally refuse
1105 to service a node's request to distribute a NetBIOS datagram. An
1106 end-node may query an NBDD to determine whether the NBDD will deliver
1107 a datagram to a specific NetBIOS name.
1108
1109 The design of NetBIOS-over-TCP lends itself to the use of Internet
1110 Group Multicast. For details see <a href="#appendix-A">Appendix A</a>.
1111
1112
1113
1114
1115
1116
1117 <span class="grey">NetBIOS Working Group [Page 19]</span></pre>
1118 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
1119 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1120
1121
1122 <span class="h3"><a class="selflink" id="section-11.3" href="#section-11.3">11.3</a>. RELATIONSHIP OF NBNS AND NBDD NODES</span>
1123
1124 This RFC defines the NBNS and NBDD as distinct, separate entities.
1125
1126 In the absence of NetBIOS name information, a NetBIOS datagram
1127 distribution server must send a copy to each end-node within a
1128 NetBIOS scope.
1129
1130 An implementer may elect to construct NBNS and NBDD nodes which have
1131 a private protocol for the exchange of NetBIOS name information.
1132 Alternatively, an NBNS and NBDD may be implemented within the same
1133 device.
1134
1135 NOTE: Implementations containing private NBNS-NBDD protocols or
1136 combined NBNS-NBDD functions must be clearly identified.
1137
1138 <span class="h3"><a class="selflink" id="section-11.4" href="#section-11.4">11.4</a>. RELATIONSHIP OF NetBIOS SUPPORT SERVERS AND B NODES</span>
1139
1140 As defined in this RFC, neither NBNS nor NBDD nodes interact with B
1141 nodes. NetBIOS servers do not listen to broadcast traffic on any
1142 broadcast area to which they may be attached. Nor are the NetBIOS
1143 support servers even aware of B node activities or names claimed or
1144 used by B nodes.
1145
1146 It may be possible to extend both the NBNS and NBDD so that they
1147 participate in B node activities and act as a bridge to P and M
1148 nodes. However, such extensions are beyond the scope of this
1149 specification.
1150
1151 <span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. TOPOLOGIES</span>
1152
1153 B, P, M, NBNS, and NBDD nodes may be combined in various ways to form
1154 useful NetBIOS environments. This section describes some of these
1155 combinations.
1156
1157 There are three classes of operation:
1158
1159 - Class 0: B nodes only.
1160 - Class 1: P nodes only.
1161 - Class 2: P and M nodes together.
1162
1163 In the drawings which follow, any P node may be replaced by an M
1164 node. The effects of such replacement will be mentioned in
1165 conjunction with each example below.
1166
1167 <span class="h3"><a class="selflink" id="section-12.1" href="#section-12.1">12.1</a>. LOCAL</span>
1168
1169 A NetBIOS scope is operating locally when all entities are within the
1170 same broadcast area.
1171
1172
1173
1174
1175
1176 <span class="grey">NetBIOS Working Group [Page 20]</span></pre>
1177 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
1178 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1179
1180
1181 <span class="h4"><a class="selflink" id="section-12.1.1" href="#section-12.1.1">12.1.1</a>. B NODES ONLY</span>
1182
1183 Local operation with only B nodes is the most basic mode of
1184 operation. Name registration and discovery procedures use broadcast
1185 mechanisms. The NetBIOS scope is limited by the extent of the
1186 broadcast area. This configuration does not require NetBIOS support
1187 servers.
1188
1189 ====+=========+=====BROADCAST AREA=====+==========+=========+====
1190 | | | | |
1191 | | | | |
1192 +--+--+ +--+--+ +--+--+ +--+--+ +--+--+
1193 | B | | B | | B | | B | | B |
1194 +-----+ +-----+ +-----+ +-----+ +-----+
1195
1196 <span class="h4"><a class="selflink" id="section-12.1.2" href="#section-12.1.2">12.1.2</a>. P NODES ONLY</span>
1197
1198 This configuration would typically be used when the network
1199 administrator desires to eliminate NetBIOS as a source of broadcast
1200 activity.
1201
1202
1203 ====+=========+==========+=B'CAST AREA=+==========+=========+====
1204 | | | | | |
1205 | | | | | |
1206 +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+
1207 | P | | P | |NBNS | | P | |NBDD | | P |
1208 +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
1209
1210
1211 This configuration operates the same as if it were in an internet and
1212 is cited here only due to its convenience as a means to reduce the
1213 use of broadcast.
1214
1215 Replacement of one or more of the P nodes with M nodes will not
1216 affect the operation of the other P and M nodes. P and M nodes will
1217 be able to interact with one another. Because M nodes use broadcast,
1218 overall broadcast activity will increase.
1219
1220 <span class="h4"><a class="selflink" id="section-12.1.3" href="#section-12.1.3">12.1.3</a>. MIXED B AND P NODES</span>
1221
1222 B and P nodes do not interact with one another. Replacement of P
1223 nodes with M nodes will allow B's and M's to interact.
1224
1225 NOTE: B nodes and M nodes may be intermixed only on a local
1226 broadcast area. B and M nodes should not be intermixed in
1227 an internet environment.
1228
1229
1230
1231
1232
1233
1234
1235 <span class="grey">NetBIOS Working Group [Page 21]</span></pre>
1236 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
1237 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1238
1239
1240 <span class="h3"><a class="selflink" id="section-12.2" href="#section-12.2">12.2</a>. INTERNET</span>
1241
1242 <span class="h4"><a class="selflink" id="section-12.2.1" href="#section-12.2.1">12.2.1</a>. P NODES ONLY</span>
1243
1244 P nodes may be scattered at various locations in an internetwork.
1245 They require both an NBNS and an NBDD for NetBIOS name and datagram
1246 support, respectively.
1247
1248 The NetBIOS scope is determined by the NetBIOS scope identifier
1249 (domain name) used by the various P (and M) nodes. An internet may
1250 contain numerous NetBIOS scopes.
1251
1252 +-----+
1253 | P |
1254 +--+--+ | +-----+
1255 | |----+ P |
1256 | | +-----+
1257 /-----+-----\ |
1258 +-----+ | | +------+ | +-----+
1259 | P +------+ INTERNET +--+G'WAY |-+----+ P |
1260 +-----+ | | +------+ | +-----+
1261 /-----+-----/ |
1262 / | | +-----+
1263 / | |----+ P |
1264 +-----+ +--+--+ | +-----+
1265 |NBNS + |NBDD |
1266 +-----+ +--+--+
1267
1268 Any P node may be replaced by an M node with no loss of function to
1269 any node. However, broadcast activity will be increased in the
1270 broadcast area to which the M node is attached.
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294 <span class="grey">NetBIOS Working Group [Page 22]</span></pre>
1295 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
1296 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1297
1298
1299 <span class="h4"><a class="selflink" id="section-12.2.2" href="#section-12.2.2">12.2.2</a>. MIXED M AND P NODES</span>
1300
1301 M and P nodes may be mixed. When locating NetBIOS names, M nodes
1302 will tend to find names held by other M nodes on the same common
1303 broadcast area in preference to names held by P nodes or M nodes
1304 elsewhere in the network.
1305
1306 +-----+
1307 | P |
1308 +--+--+
1309 |
1310 |
1311 /-----+-----\
1312 +-----+ | | +-----+
1313 | P +------+ INTERNET +------+NBDD |
1314 +-----+ | | +-----+
1315 /-----+-----/
1316 / |
1317 / |
1318 +-----+ +--+--+
1319 |NBNS + |G'WAY|
1320 +-----+ +--+--+
1321 |
1322 |
1323 ====+=========+==========+=B'CAST AREA=+==========+=========+====
1324 | | | | | |
1325 | | | | | |
1326 +--+--+ +--+--+ +--+--+ +--+--+ +--+--+ +--+--+
1327 | M | | P | | M | | P | | M | | P |
1328 +-----+ +-----+ +--+--+ +-----+ +-----+ +-----+
1329
1330
1331 NOTE: B and M nodes should not be intermixed in an internet
1332 environment. Doing so would allow undetected NetBIOS name
1333 conflicts to arise and cause unpredictable behavior.
1334
1335 <span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. GENERAL METHODS</span>
1336
1337 Overlying the specific protocols, described later, are a few general
1338 methods of interaction between entities.
1339
1340 <span class="h3"><a class="selflink" id="section-13.1" href="#section-13.1">13.1</a>. REQUEST/RESPONSE INTERACTION STYLE</span>
1341
1342 Most interactions between entities consist of a request flowing in
1343 one direction and a subsequent response flowing in the opposite
1344 direction.
1345
1346 In those situations where interactions occur on unreliable transports
1347 (i.e. UDP) or when a request is broadcast, there may not be a strict
1348 interlocking or one-to-one relationship between requests and
1349 responses.
1350
1351
1352
1353 <span class="grey">NetBIOS Working Group [Page 23]</span></pre>
1354 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
1355 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1356
1357
1358 In no case, however, is more than one response generated for a
1359 received request. While a response is pending the responding entity
1360 may send one or more wait acknowledgements.
1361
1362 <span class="h4"><a class="selflink" id="section-13.1.1" href="#section-13.1.1">13.1.1</a>. RETRANSMISSION OF REQUESTS</span>
1363
1364 UDP is an unreliable delivery mechanism where packets can be lost,
1365 received out of transmit sequence, duplicated and delivery can be
1366 significantly delayed. Since the NetBIOS protocols make heavy use of
1367 UDP, they have compensated for its unreliability with extra
1368 mechanisms.
1369
1370 Each NetBIOS packet contains all the necessary information to process
1371 it. None of the protocols use multiple UDP packets to convey a
1372 single request or response. If more information is required than
1373 will fit in a single UDP packet, for example, when a P-type node
1374 wants all the owners of a group name from a NetBIOS server, a TCP
1375 connection is used. Consequently, the NetBIOS protocols will not
1376 fail because of out of sequence delivery of UDP packets.
1377
1378 To overcome the loss of a request or response packet, each request
1379 operation will retransmit the request if a response is not received
1380 within a specified time limit.
1381
1382 Protocol operations sensitive to successive response packets, such as
1383 name conflict detection, are protected from duplicated packets
1384 because they ignore successive packets with the same NetBIOS
1385 information. Since no state on the responder's node is associated
1386 with a request, the responder just sends the appropriate response
1387 whenever a request packet arrives. Consequently, duplicate or
1388 delayed request packets have no impact.
1389
1390 For all requests, if a response packet is delayed too long another
1391 request packet will be transmitted. A second response packet being
1392 sent in response to the second request packet is equivalent to a
1393 duplicate packet. Therefore, the protocols will ignore the second
1394 packet received. If the delivery of a response is delayed until
1395 after the request operation has been completed, successfully or not,
1396 the response packet is ignored.
1397
1398 <span class="h4"><a class="selflink" id="section-13.1.2" href="#section-13.1.2">13.1.2</a>. REQUESTS WITHOUT RESPONSES: DEMANDS</span>
1399
1400 Some request types do not have matching responses. These requests
1401 are known as "demands". In general a "demand" is an imperative
1402 request; the receiving node is expected to obey. However, because
1403 demands are unconfirmed, they are used only in situations where, at
1404 most, limited damage would occur if the demand packet should be lost.
1405
1406 Demand packets are not retransmitted.
1407
1408
1409
1410
1411
1412 <span class="grey">NetBIOS Working Group [Page 24]</span></pre>
1413 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
1414 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1415
1416
1417 <span class="h3"><a class="selflink" id="section-13.2" href="#section-13.2">13.2</a>. TRANSACTIONS</span>
1418
1419 Interactions between a pair of entities are grouped into
1420 "transactions". These transactions comprise one or more
1421 request/response pairs.
1422
1423 <span class="h4"><a class="selflink" id="section-13.2.1" href="#section-13.2.1">13.2.1</a>. TRANSACTION ID</span>
1424
1425 Since multiple simultaneous transactions may be in progress between a
1426 pair of entities a "transaction id" is used.
1427
1428 The originator of a transaction selects an ID unique to the
1429 originator. The transaction id is reflected back and forth in each
1430 interaction within the transaction. The transaction partners must
1431 match responses and requests by comparison of the transaction ID and
1432 the IP address of the transaction partner. If no matching request
1433 can be found the response must be discarded.
1434
1435 A new transaction ID should be used for each transaction. A simple
1436 16 bit transaction counter ought to be an adequate id generator. It
1437 is probably not necessary to search the space of outstanding
1438 transaction ID to filter duplicates: it is extremely unlikely that
1439 any transaction will have a lifetime that is more than a small
1440 fraction of the typical counter cycle period. Use of the IP
1441 addresses in conjunction with the transaction ID further reduces the
1442 possibility of damage should transaction IDs be prematurely re-used.
1443
1444 <span class="h3"><a class="selflink" id="section-13.3" href="#section-13.3">13.3</a>. TCP AND UDP FOUNDATIONS</span>
1445
1446 This version of the NetBIOS-over-TCP protocols uses UDP for many
1447 interactions. In the future this RFC may be extended to permit such
1448 interactions to occur over TCP connections (perhaps to increase
1449 efficiency when multiple interactions occur within a short time or
1450 when NetBIOS datagram traffic reveals that an application is using
1451 NetBIOS datagrams to support connection- oriented service.)
1452
1453 <span class="h2"><a class="selflink" id="section-14" href="#section-14">14</a>. REPRESENTATION OF NETBIOS NAMES</span>
1454
1455 NetBIOS names as seen across the client interface to NetBIOS are
1456 exactly 16 bytes long. Within the NetBIOS-over-TCP protocols, a
1457 longer representation is used.
1458
1459 There are two levels of encoding. The first level maps a NetBIOS
1460 name into a domain system name. The second level maps the domain
1461 system name into the "compressed" representation required for
1462 interaction with the domain name system.
1463
1464 Except in one packet, the second level representation is the only
1465 NetBIOS name representation used in NetBIOS-over-TCP packet formats.
1466 The exception is the RDATA field of a NODE STATUS RESPONSE packet.
1467
1468
1469
1470
1471 <span class="grey">NetBIOS Working Group [Page 25]</span></pre>
1472 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
1473 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1474
1475
1476 <span class="h3"><a class="selflink" id="section-14.1" href="#section-14.1">14.1</a>. FIRST LEVEL ENCODING</span>
1477
1478 The first level representation consists of two parts:
1479
1480 - NetBIOS name
1481 - NetBIOS scope identifier
1482
1483 The 16 byte NetBIOS name is mapped into a 32 byte wide field using a
1484 reversible, half-ASCII, biased encoding. Each half-octet of the
1485 NetBIOS name is encoded into one byte of the 32 byte field. The
1486 first half octet is encoded into the first byte, the second half-
1487 octet into the second byte, etc.
1488
1489 Each 4-bit, half-octet of the NetBIOS name is treated as an 8-bit,
1490 right-adjusted, zero-filled binary number. This number is added to
1491 value of the ASCII character 'A' (hexidecimal 41). The resulting 8-
1492 bit number is stored in the appropriate byte. The following diagram
1493 demonstrates this procedure:
1494
1495
1496 0 1 2 3 4 5 6 7
1497 +-+-+-+-+-+-+-+-+
1498 |a b c d|w x y z| ORIGINAL BYTE
1499 +-+-+-+-+-+-+-+-+
1500 | |
1501 +--------+ +--------+
1502 | | SPLIT THE NIBBLES
1503 v v
1504 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
1505 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
1506 |0 0 0 0 a b c d| |0 0 0 0 w x y z|
1507 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
1508 | |
1509 + + ADD 'A'
1510 | |
1511 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
1512 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
1513 |0 1 0 0 0 0 0 1| |0 1 0 0 0 0 0 1|
1514 +-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+
1515
1516 This encoding results in a NetBIOS name being represented as a
1517 sequence of 32 ASCII, upper-case characters from the set
1518 {A,B,C...N,O,P}.
1519
1520 The NetBIOS scope identifier is a valid domain name (without a
1521 leading dot).
1522
1523 An ASCII dot (2E hexidecimal) and the scope identifier are appended
1524 to the encoded form of the NetBIOS name, the result forming a valid
1525 domain name.
1526
1527
1528
1529
1530 <span class="grey">NetBIOS Working Group [Page 26]</span></pre>
1531 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
1532 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1533
1534
1535 For example, the NetBIOS name "The NetBIOS name" in the NetBIOS scope
1536 "SCOPE.ID.COM" would be represented at level one by the ASCII
1537 character string:
1538
1539 FEGHGFCAEOGFHEECEJEPFDCAHEGBGNGF.SCOPE.ID.COM
1540
1541 <span class="h3"><a class="selflink" id="section-14.2" href="#section-14.2">14.2</a>. SECOND LEVEL ENCODING</span>
1542
1543 The first level encoding must be reduced to second level encoding.
1544 This is performed according to the rules defined in on page 31 of <a href="./rfc883">RFC</a>
1545 <a href="./rfc883">883</a>[<a href="#ref-12" title="&quot;Domain Names - Implementation and Specification&quot;">12</a>] in the section on "Domain name representation and
1546 compression". Also see the section titled "Name Formats" in the
1547 Detailed Specifications[1].
1548
1549 <span class="h2"><a class="selflink" id="section-15" href="#section-15">15</a>. NetBIOS NAME SERVICE</span>
1550
1551 Before a name may be used, the name must be registered by a node.
1552 Once acquired, the name must be defended against inconsistent
1553 registration by other nodes. Before building a NetBIOS session or
1554 sending a NetBIOS datagram, the one or more holders of the name must
1555 be located.
1556
1557 The NetBIOS name service is the collection of procedures through
1558 which nodes acquire, defend, and locate the holders of NetBIOS names.
1559
1560 The name service procedures are different depending whether the end-
1561 node is of type B, P, or M.
1562
1563 <span class="h3"><a class="selflink" id="section-15.1" href="#section-15.1">15.1</a>. OVERVIEW OF NetBIOS NAME SERVICE</span>
1564
1565 <span class="h4"><a class="selflink" id="section-15.1.1" href="#section-15.1.1">15.1.1</a>. NAME REGISTRATION (CLAIM)</span>
1566
1567 Each NetBIOS node can own more than one name. Names are acquired
1568 dynamically through the registration (name claim) procedures.
1569
1570 Every node has a permanent unique name. This name, like any other
1571 name, must be explicitly registered by all end-node types.
1572
1573 A name can be unique (exclusive) or group (non-exclusive). A unique
1574 name may be owned by a single node; a group name may be owned by any
1575 number of nodes. A name ceases to exist when it is not owned by at
1576 least one node. There is no intrinsic quality of a name which
1577 determines its characteristics: these are established at the time of
1578 registration.
1579
1580 Each node maintains state information for each name it has
1581 registered. This information includes:
1582
1583 - Whether the name is a group or unique name
1584 - Whether the name is "in conflict"
1585 - Whether the name is in the process of being deleted
1586
1587
1588
1589 <span class="grey">NetBIOS Working Group [Page 27]</span></pre>
1590 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
1591 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1592
1593
1594 B nodes perform name registration by broadcasting claim requests,
1595 soliciting a defense from any node already holding the name.
1596
1597 P nodes perform name registration through the agency of the NBNS.
1598
1599 M nodes register names through an initial broadcast, like B nodes,
1600 then, in the absence of an objection, by following the same
1601 procedures as a P node. In other words, the broadcast action may
1602 terminate the attempt, but is not sufficient to confirm the
1603 registration.
1604
1605 <span class="h4"><a class="selflink" id="section-15.1.2" href="#section-15.1.2">15.1.2</a>. NAME QUERY (DISCOVERY)</span>
1606
1607 Name query (also known as "resolution" or "discovery") is the
1608 procedure by which the IP address(es) associated with a NetBIOS name
1609 are discovered. Name query is required during the following
1610 operations:
1611
1612 During session establishment, calling and called names must be
1613 specified. The calling name must exist on the node that posts the
1614 CALL. The called name must exist on a node that has previously
1615 posted a LISTEN. Either name may be a unique or group name.
1616
1617 When a directed datagram is sent, a source and destination name must
1618 be specified. If the destination name is a group name, a datagram is
1619 sent to all the members of that group.
1620
1621 Different end-node types perform name resolution using different
1622 techniques, but using the same packet formats:
1623
1624 - B nodes solicit name information by broadcasting a request.
1625
1626 - P nodes ask the NBNS.
1627
1628 - M nodes broadcast a request. If that does not provide the
1629 desired information, an inquiry is sent to the NBNS.
1630
1631 <span class="h4"><a class="selflink" id="section-15.1.3" href="#section-15.1.3">15.1.3</a>. NAME RELEASE</span>
1632
1633 NetBIOS names may be released explicitly or silently by an end- node.
1634 Silent release typically occurs when an end-node fails or is turned-
1635 off. Most of the mechanisms described below are present to detect
1636 silent name release.
1637
1638 <span class="h5"><a class="selflink" id="section-15.1.3.1" href="#section-15.1.3.1">15.1.3.1</a>. EXPLICIT RELEASE</span>
1639
1640 B nodes explicitly release a name by broadcasting a notice.
1641
1642 P nodes send a notification to their NBNS.
1643
1644 M nodes both broadcast a notice and inform their supporting NBNS.
1645
1646
1647
1648 <span class="grey">NetBIOS Working Group [Page 28]</span></pre>
1649 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
1650 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1651
1652
1653 <span class="h5"><a class="selflink" id="section-15.1.3.2" href="#section-15.1.3.2">15.1.3.2</a>. NAME LIFETIME AND REFRESH</span>
1654
1655 Names held by an NBNS are given a lifetime during name registration.
1656 The NBNS will consider a name to have been silently released if the
1657 end-node fails to send a name refresh message to the NBNS before the
1658 lifetime expires. A refresh restarts the lifetime clock.
1659
1660 NOTE: The implementor should be aware of the tradeoff between
1661 accuracy of the database and the internet overhead that the
1662 refresh mechanism introduces. The lifetime period should
1663 be tuned accordingly.
1664
1665
1666 For group names, each end-node must send refresh messages. A node
1667 that fails to do so will be considered to have silently released the
1668 name and dropped from the group.
1669
1670 The lifetime period is established through a simple negotiation
1671 mechanism during name registration: In the name registration
1672 request, the end-node proposes a lifetime value or requests an
1673 infinite lifetime. The NBNS places an actual lifetime value into the
1674 name registration response. The NBNS is always allowed to respond
1675 with an infinite actual period. If the end node proposed an infinite
1676 lifetime, the NBNS may respond with any definite period. If the end
1677 node proposed a definite period, the NBNS may respond with any
1678 definite period greater than or equal to that proposed.
1679
1680 This negotiation of refresh times gives the NBNS means to disable or
1681 enable refresh activity. The end-nodes may set a minimum refresh
1682 cycle period.
1683
1684 NBNS implementations which are completely reliable may disable
1685 refresh.
1686
1687 <span class="h5"><a class="selflink" id="section-15.1.3.3" href="#section-15.1.3.3">15.1.3.3</a>. NAME CHALLENGE</span>
1688
1689 To detect whether a node has silently released its claim to a name,
1690 it is necessary on occasion to challenge that node's current
1691 ownership. If the node defends the name then the node is allowed to
1692 continue possession. Otherwise it is assumed that the node has
1693 released the name.
1694
1695 A name challenge may be issued by an NBNS or by a P or M node. A
1696 challenge may be directed towards any end-node type: B, P, or M.
1697
1698 <span class="h5"><a class="selflink" id="section-15.1.3.4" href="#section-15.1.3.4">15.1.3.4</a>. GROUP NAME FADE-OUT</span>
1699
1700 NetBIOS groups may contain an arbitrarily large number of members.
1701 The time to challenge all members could be quite large.
1702
1703 To avoid long delays when names are claimed through an NBNS, an
1704
1705
1706
1707 <span class="grey">NetBIOS Working Group [Page 29]</span></pre>
1708 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
1709 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1710
1711
1712 optimistic heuristic has been adopted. It is assumed that there will
1713 always be some node which will defend a group name. Consequently, it
1714 is recommended that the NBNS will immediately reject a claim request
1715 for a unique name when there already exists a group with the same
1716 name. The NBNS will never return an IP address (in response to a
1717 NAME REGISTRATION REQUEST) when a group name exists.
1718
1719 An NBNS will consider a group to have faded out of existence when the
1720 last remaining member fails to send a timely refresh message or
1721 explicitly releases the name.
1722
1723 <span class="h5"><a class="selflink" id="section-15.1.3.5" href="#section-15.1.3.5">15.1.3.5</a>. NAME CONFLICT</span>
1724
1725 Name conflict exists when a unique name has been claimed by more than
1726 one node on a NetBIOS network. B, M, and NBNS nodes may detect a
1727 name conflict. The detection mechanism used by B and M nodes is
1728 active only during name discovery. The NBNS may detect conflict at
1729 any time it verifies the consistency of its name database.
1730
1731 B and M nodes detect conflict by examining the responses received in
1732 answer to a broadcast name query request. The first response is
1733 taken as authoritative. Any subsequent, inconsistent responses
1734 represent conflicts.
1735
1736 Subsequent responses are inconsistent with the authoritative response
1737 when:
1738
1739 The subsequent response has the same transaction ID as the
1740 NAME QUERY REQUEST.
1741 AND
1742 The subsequent response is not a duplicate of the
1743 authoritative response.
1744 AND EITHER:
1745 The group/unique characteristic of the authoritative
1746 response is "unique".
1747 OR
1748 The group/unique characteristic of the subsequent
1749 response is "unique".
1750
1751 The period in which B and M nodes examine responses is limited by a
1752 conflict timer, CONFLICT_TIMER. The accuracy or duration of this
1753 timer is not crucial: the NetBIOS system will continue to operate
1754 even with persistent name conflicts.
1755
1756 Conflict conditions are signaled by sending a NAME CONFLICT DEMAND to
1757 the node owning the offending name. Nothing is sent to the node
1758 which originated the authoritative response.
1759
1760 Any end-node that receives NAME CONFLICT DEMAND is required to update
1761 its "local name table" to reflect that the name is in conflict. (The
1762 "local name table" on each node contains names that have been
1763
1764
1765
1766 <span class="grey">NetBIOS Working Group [Page 30]</span></pre>
1767 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
1768 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1769
1770
1771 successfully registered by that node.)
1772
1773 Notice that only those nodes that receive the name conflict message
1774 place a conflict mark next to a name.
1775
1776 Logically, a marked name does not exist on that node. This means
1777 that the node should not defend the name (for name claim purposes),
1778 should not respond to a name discovery requests for that name, nor
1779 should the node send name refresh messages for that name.
1780 Furthermore, it can no longer be used by that node for any session
1781 establishment or sending or receiving datagrams. Existing sessions
1782 are not affected at the time a name is marked as being in conflict.
1783
1784 The only valid user function against a marked name is DELETE NAME.
1785 Any other user NetBIOS function returns immediately with an error
1786 code of "NAME CONFLICT".
1787
1788 <span class="h4"><a class="selflink" id="section-15.1.4" href="#section-15.1.4">15.1.4</a>. ADAPTER STATUS</span>
1789
1790 An end-node or the NBNS may ask any other end-node for a collection
1791 of information about the NetBIOS status of that node. This status
1792 consists of, among other things, a list of the names which the node
1793 believes it owns. The returned status is filtered to contain only
1794 those names which have the same NetBIOS scope identifier as the
1795 requestor's name.
1796
1797 When requesting node status, the requestor identifies the target node
1798 by NetBIOS name A name query transaction may be necessary to acquire
1799 the IP address for the name. Locally cached name information may be
1800 used in lieu of a query transaction. The requesting node sends a
1801 NODE STATUS REQUEST. In response, the receiving node sends a NODE
1802 STATUS RESPONSE containing its local name table and various
1803 statistics.
1804
1805 The amount of status which may be returned is limited by the size of
1806 a UDP packet. However, this is sufficient for the typical NODE
1807 STATUS RESPONSE packet.
1808
1809 <span class="h4"><a class="selflink" id="section-15.1.5" href="#section-15.1.5">15.1.5</a>. END-NODE NBNS INTERACTION</span>
1810
1811 There are certain characteristics of end-node to NBNS interactions
1812 which are in common and are independent of any particular transaction
1813 type.
1814
1815 <span class="h5"><a class="selflink" id="section-15.1.5.1" href="#section-15.1.5.1">15.1.5.1</a>. UDP, TCP, AND TRUNCATION</span>
1816
1817 For all transactions between an end-node and an NBNS, either UDP or
1818 TCP may be used as a transport. If the NBNS receives a UDP based
1819 request, it will respond using UDP. If the amount of information
1820 exceeds what fits into a UDP packet, the response will contain a
1821 "truncation flag". In this situation, the end- node may open a TCP
1822
1823
1824
1825 <span class="grey">NetBIOS Working Group [Page 31]</span></pre>
1826 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
1827 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1828
1829
1830 connection to the NBNS, repeat the request, and receive a complete,
1831 untruncated response.
1832
1833 <span class="h5"><a class="selflink" id="section-15.1.5.2" href="#section-15.1.5.2">15.1.5.2</a>. NBNS WACK</span>
1834
1835 While a name service request is in progress, the NBNS may issue a
1836 WAIT FOR ACKNOWLEDGEMENT RESPONSE (WACK) to assure the client end-
1837 node that the NBNS is still operational and is working on the
1838 request.
1839
1840 <span class="h5"><a class="selflink" id="section-15.1.5.3" href="#section-15.1.5.3">15.1.5.3</a>. NBNS REDIRECTION</span>
1841
1842 The NBNS, because it follows Domain Name system styles of
1843 interaction, is permitted to redirect a client to another NBNS.
1844
1845 <span class="h4"><a class="selflink" id="section-15.1.6" href="#section-15.1.6">15.1.6</a>. SECURED VERSUS NON-SECURED NBNS</span>
1846
1847 An NBNS may be implemented in either of two general ways: The NBNS
1848 may monitor, and participate in, name activity to ensure consistency.
1849 This would be a "secured" style NBNS. Alternatively, an NBNS may be
1850 implemented to be essentially a "bulletin board" on which name
1851 information is posted and responsibility for consistency is delegated
1852 to the end-nodes. This would be a "non-secured" style NBNS.
1853
1854 <span class="h4"><a class="selflink" id="section-15.1.7" href="#section-15.1.7">15.1.7</a>. CONSISTENCY OF THE NBNS DATA BASE</span>
1855
1856 Even in a properly running NetBIOS scope the NBNS and its community
1857 of end-nodes may occasionally lose synchronization with respect to
1858 the true state of name registrations.
1859
1860 This may occur should the NBNS fail and lose all or part of its
1861 database.
1862
1863 More commonly, a P or M node may be turned-off (thus forgetting the
1864 names it has registered) and then be subsequently turned back on.
1865
1866 Finally, errors may occur or an implementation may be incorrect.
1867
1868 Various approaches have been incorporated into the NetBIOS-over- TCP
1869 protocols to minimize the impact of these problems.
1870
1871 1. The NBNS (or any other node) may "challenge" (using a NAME
1872 QUERY REQUEST) an end-node to verify that it actually owns a
1873 name.
1874
1875 Such a challenge may occur at any time. Every end-node must
1876 be prepared to make a timely response.
1877
1878 Failure to respond causes the NBNS to consider that the
1879 end-node has released the name in question.
1880
1881
1882
1883
1884 <span class="grey">NetBIOS Working Group [Page 32]</span></pre>
1885 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
1886 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1887
1888
1889 (If UDP is being used as the underlying transport, the
1890 challenge, like all other requests, must be retransmitted
1891 some number of times in the absence of a response.)
1892
1893 2. The NBNS (or any other node) may request (using the NODE
1894 STATUS REQUEST) that an end-node deliver its entire name
1895 table.
1896
1897 This may occur at any time. Every end-node must be prepared
1898 to make a timely response.
1899
1900 Failure to respond permits (but does not require) the NBNS
1901 to consider that the end-node has failed and released all
1902 names to which it had claims. (Like the challenge, on a UDP
1903 transport, the request must be retransmitted in the absence
1904 of a response.)
1905
1906 3. The NBNS may revoke a P or M node's use of a name by sending
1907 either a NAME CONFLICT DEMAND or a NAME RELEASE REQUEST to
1908 the node.
1909
1910 The receiving end-node may continue existing sessions which
1911 use that name, but must otherwise cease using that name. If
1912 the NBNS placed the name in conflict, the name may be re-
1913 acquired only by deletion and subsequent reclamation. If
1914 the NBNS requested that the name be released, the node may
1915 attempt to re-acquire the name without first performing a
1916 name release transaction.
1917
1918 4. The NBNS may impose a "time-to-live" on each name it
1919 registers. The registering node is made aware of this time
1920 value during the name registration procedure.
1921
1922 Simple or reliable NBNS's may impose an infinite time-to-
1923 live.
1924
1925 5. If an end-node holds any names that have finite time-to-
1926 live values, then that node must periodically send a status
1927 report to the NBNS. Each name is reported using the NAME
1928 REFRESH REQUEST packet.
1929
1930 These status reports restart the timers of both the NBNS and
1931 the reporting node. However, the only timers which are
1932 restarted are those associated with the name found in the
1933 status report. Timers on other names are not affected.
1934
1935 The NBNS may consider that a node has released any name
1936 which has not been refreshed within some multiple of name's
1937 time-to-live.
1938
1939 A well-behaved NBNS, would, however, issue a challenge to-,
1940
1941
1942
1943 <span class="grey">NetBIOS Working Group [Page 33]</span></pre>
1944 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-34" ></span>
1945 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
1946
1947
1948 or request a list of names from-, the non-reporting end-
1949 node before deleting its name(s). The absence of a
1950 response, or of the name in a response, will confirm the
1951 NBNS decision to delete a name.
1952
1953 6. The absence of reports may cause the NBNS to infer that the
1954 end-node has failed. Similarly, receipt of information
1955 widely divergent from what the NBNS believes about the node,
1956 may cause the NBNS to consider that the end-node has been
1957 restarted.
1958
1959 The NBNS may analyze the situation through challenges or
1960 requests for a list of names.
1961
1962 7. A very cautious NBNS is free to poll nodes (by sending NAME
1963 QUERY REQUEST or NODE STATUS REQUEST packets) to verify that
1964 their name status is the same as that registered in the
1965 NBNS.
1966
1967 NOTE: Such polling activity, if used at all by an
1968 implementation, should be kept at a very low level or
1969 enabled only during periods when the NBNS has some reason to
1970 suspect that its information base is inaccurate.
1971
1972 8. P and M nodes can detect incorrect name information at
1973 session establishment.
1974
1975 If incorrect information is found, NBNS is informed via a
1976 NAME RELEASE REQUEST originated by the end-node which
1977 detects the error.
1978
1979 <span class="h4"><a class="selflink" id="section-15.1.8" href="#section-15.1.8">15.1.8</a>. NAME CACHING</span>
1980
1981 An end-node may keep a local cache of NetBIOS name-to-IP address
1982 translation entries.
1983
1984 All cache entries should be flushed on a periodic basis.
1985
1986 In addition, a node ought to flush any cache information associated
1987 with an IP address if the node receives any information indicating
1988 that there may be any possibility of trouble with the node at that IP
1989 address. For example, if a NAME CONFLICT DEMAND is sent to a node,
1990 all cached information about that node should be cleared within the
1991 sending node.
1992
1993 <span class="h3"><a class="selflink" id="section-15.2" href="#section-15.2">15.2</a>. NAME REGISTRATION TRANSACTIONS</span>
1994
1995 <span class="h4"><a class="selflink" id="section-15.2.1" href="#section-15.2.1">15.2.1</a>. NAME REGISTRATION BY B NODES</span>
1996
1997 A name claim transaction initiated by a B node is broadcast
1998 throughout the broadcast area. The NAME REGISTRATION REQUEST will be
1999
2000
2001
2002 <span class="grey">NetBIOS Working Group [Page 34]</span></pre>
2003 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-35" ></span>
2004 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2005
2006
2007 heard by all B and M nodes in the area. Each node examines the claim
2008 to see whether it it is consistent with the names it owns. If an
2009 inconsistency exists, a NEGATIVE NAME REGISTRATION RESPONSE is
2010 unicast to the requestor. The requesting node obtains ownership of
2011 the name (or membership in the group) if, and only if, no NEGATIVE
2012 NAME REGISTRATION RESPONSEs are received within the name claim
2013 timeout, CONFLICT_TIMER. (See "Defined Constants and Variables" in
2014 the Detailed Specification for the value of this timer.)
2015
2016 A B node proclaims its new ownership by broadcasting a NAME OVERWRITE
2017 DEMAND.
2018
2019 B-NODE REGISTRATION PROCESS
2020 &lt;-----NAME NOT ON NETWORK------&gt; &lt;----NAME ALREADY EXISTS----&gt;
2021
2022 REQ. NODE NODE REQ.NODE
2023 HOLDING
2024 NAME
2025
2026 (BROADCAST) REGISTER (BROADCAST) REGISTER
2027 -------------------&gt; &lt;-------------------
2028
2029 REGISTER REGISTER
2030 -------------------&gt; &lt;-------------------
2031
2032 REGISTER NEGATIVE RESPONSE
2033 -------------------&gt; ------------------------------&gt;
2034
2035 OVERWRITE
2036 -------------------&gt; (NODE DOES NOT HAVE THE NAME)
2037
2038 (NODE HAS THE NAME)
2039
2040 The NAME REGISTRATION REQUEST, like any request, must be repeated if
2041 no response is received within BCAST_REQ_RETRY_TIMEOUT. Transmission
2042 of the request is attempted BCAST_REQ_RETRY_COUNT times.
2043
2044 <span class="h4"><a class="selflink" id="section-15.2.2" href="#section-15.2.2">15.2.2</a>. NAME REGISTRATION BY P NODES</span>
2045
2046 A name registration may proceed in various ways depending whether
2047 the name being registered is new to the NBNS. If the name is known
2048 to the NBNS, then challenges may be sent to the prior holder(s).
2049
2050 <span class="h5"><a class="selflink" id="section-15.2.2.1" href="#section-15.2.2.1">15.2.2.1</a>. NEW NAME, OR NEW GROUP MEMBER</span>
2051
2052 The diagram, below, shows the sequence of events when an end-node
2053 registers a name which is new to the NBNS. (The diagram omits WACKs,
2054 NBNS redirections, and retransmission of requests.)
2055
2056 This same interaction will occur if the name being registered is a
2057 group name and the group already exists. The NBNS will add the
2058
2059
2060
2061 <span class="grey">NetBIOS Working Group [Page 35]</span></pre>
2062 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-36" ></span>
2063 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2064
2065
2066 registrant to the set of group members.
2067
2068 P-NODE REGISTRATION PROCESS
2069 (server has no previous information about the name)
2070
2071 P-NODE NBNS
2072 REGISTER
2073 ---------------------------------&gt;
2074
2075 POSITIVE RESPONSE
2076 &lt;---------------------------------
2077
2078 The interaction is rather simple: the end-node sends a NAME
2079 REGISTRATION REQUEST, the NBNS responds with a POSITIVE NAME
2080 REGISTRATION RESPONSE.
2081
2082 <span class="h5"><a class="selflink" id="section-15.2.2.2" href="#section-15.2.2.2">15.2.2.2</a>. EXISTING NAME AND OWNER IS STILL ACTIVE</span>
2083
2084 The following diagram shows interactions when an attempt is made to
2085 register a unique name, the NBNS is aware of an existing owner, and
2086 that existing owner is still active.
2087
2088 There are two sides to the diagram. The left side shows how a non-
2089 secured NBNS would handle the matter. Secured NBNS activity is shown
2090 on the right.
2091
2092 P-NODE REGISTRATION PROCESS
2093 (server HAS a previous owner that IS active)
2094
2095
2096 &lt;------NON-SECURED STYLE-------&gt; &lt;---------SECURED STYLE-------&gt;
2097
2098 REQ. NODE NBNS NODE NBNS REQ.NODE
2099 HOLDING
2100 NAME
2101
2102 REGISTER REGISTER
2103 -------------------&gt; &lt;-------------------
2104 QUERY
2105 END-NODE CHALLENGE &lt;------------
2106 &lt;------------------- QUERY
2107 &lt;------------
2108 QUERY
2109 -----------------------------&gt;
2110 POSITIVE RESP
2111 QUERY ------------&gt;
2112 -----------------------------&gt; NEGATIVE RESPONSE
2113 -----------------&gt;
2114
2115 POSITIVE RESPONSE
2116 &lt;----------------------------
2117
2118
2119
2120 <span class="grey">NetBIOS Working Group [Page 36]</span></pre>
2121 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-37" ></span>
2122 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2123
2124
2125 A non-secured NBNS will answer the NAME REGISTRATION REQUEST with a
2126 END-NODE CHALLENGE REGISTRATION RESPONSE. This response asks the
2127 end-node to issue a challenge transaction against the node indicated
2128 in the response. In this case, the prior node will defend against
2129 the challenge and the registering end-node will simply drop the
2130 registration attempt without further interaction with the NBNS.
2131
2132 A secured NBNS will refrain from answering the NAME REGISTRATION
2133 REQUEST until the NBNS has itself challenged the prior holder(s) of
2134 the name. In this case, the NBNS finds that that the name is still
2135 being defended and consequently returns a NEGATIVE NAME REGISTRATION
2136 RESPONSE to the registrant.
2137
2138 Due to the potential time for the secured NBNS to make the
2139 challenge(s), it is likely that a WACK will be sent by the NBNS to
2140 the registrant.
2141
2142 Although not shown in the diagram, a non-secured NBNS will send a
2143 NEGATIVE NAME REGISTRATION RESPONSE to a request to register a unique
2144 name when there already exists a group of the same name. A secured
2145 NBNS may elect to poll (or challenge) the group members to determine
2146 whether any active members remain. This may impose a heavy load on
2147 the network. It is recommended that group names be allowed to fade-
2148 out through the name refresh mechanism.
2149
2150 <span class="h5"><a class="selflink" id="section-15.2.2.3" href="#section-15.2.2.3">15.2.2.3</a>. EXISTING NAME AND OWNER IS INACTIVE</span>
2151
2152 The following diagram shows interactions when an attempt is made to
2153 register a unique name, the NBNS is aware of an existing owner, and
2154 that existing owner is no longer active.
2155
2156 A non-secured NBNS will answer the NAME REGISTRATION REQUEST with a
2157 END-NODE CHALLENGE REGISTRATION RESPONSE. This response asks the
2158 end-node to issue a challenge transaction against the node indicated
2159 in the response. In this case, the prior node will not defend
2160 against the challenge. The registrant will inform the NBNS through a
2161 NAME OVERWRITE REQUEST. The NBNS will replace the prior name
2162 information in its database with the information in the overwrite
2163 request.
2164
2165 A secured NBNS will refrain from answering the NAME REGISTRATION
2166 REQUEST until the NBNS has itself challenged the prior holder(s) of
2167 the name. In this case, the NBNS finds that that the name is not
2168 being defended and consequently returns a POSITIVE NAME REGISTRATION
2169 RESPONSE to the registrant.
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179 <span class="grey">NetBIOS Working Group [Page 37]</span></pre>
2180 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-38" ></span>
2181 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2182
2183
2184 P-NODE REGISTRATION PROCESS
2185 (server HAS a previous owner that is NOT active)
2186
2187
2188 &lt;------NON-SECURED STYLE-----&gt; &lt;----------SECURED STYLE--------&gt;
2189
2190 REQ. NODE NBNS NODE NBNS REQ.NODE
2191 HOLDING
2192 NAME
2193
2194 REGISTER REGISTER
2195 -------------------&gt; &lt;-------------------
2196 QUERY
2197 END-NODE CHALLENGE &lt;------------
2198 &lt;------------------- QUERY
2199 &lt;------------
2200 NAME QUERY REQUEST POSITIVE RESPONSE
2201 ----------------------------&gt; ------------------&gt;
2202 QUERY
2203 ----------------------------&gt;
2204
2205 OVERWRITE
2206 -------------------&gt;
2207
2208 POSITIVE RESPONSE
2209 &lt;------------------
2210
2211 Due to the potential time for the secured NBNS to make the
2212 challenge(s), it is likely that a WACK will be sent by the NBNS to
2213 the registrant.
2214
2215 A secured NBNS will immediately send a NEGATIVE NAME REGISTRATION
2216 RESPONSE in answer to any NAME OVERWRITE REQUESTS it may receive.
2217
2218 <span class="h4"><a class="selflink" id="section-15.2.3" href="#section-15.2.3">15.2.3</a>. NAME REGISTRATION BY M NODES</span>
2219
2220 An M node begin a name claim operation as if the node were a B node:
2221 it broadcasts a NAME REGISTRATION REQUEST and listens for NEGATIVE
2222 NAME REGISTRATION RESPONSEs. Any NEGATIVE NAME REGISTRATION RESPONSE
2223 prevents the M node from obtaining the name and terminates the claim
2224 operation.
2225
2226 If, however, the M node does not receive any NEGATIVE NAME
2227 REGISTRATION RESPONSE, the M node must continue the claim procedure
2228 as if the M node were a P node.
2229
2230 Only if both name claims were successful does the M node acquire the
2231 name.
2232
2233 The following diagram illustrates M node name registration:
2234
2235
2236
2237
2238 <span class="grey">NetBIOS Working Group [Page 38]</span></pre>
2239 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-39" ></span>
2240 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2241
2242
2243 M-NODE REGISTRATION PROCESS
2244
2245 &lt;---NAME NOT IN BROADCAST AREA--&gt; &lt;--NAME IS IN BROADCAST AREA--&gt;
2246
2247 REQ. NODE NODE REQ.NODE
2248 HOLDING
2249 NAME
2250
2251 (BROADCAST) REGISTER (BROADCAST) REGISTER
2252 -------------------&gt; &lt;-------------------
2253
2254 REGISTER REGISTER
2255 -------------------&gt; &lt;-------------------
2256
2257 REGISTER NEGATIVE RESPONSE
2258 -------------------&gt; -------------------------------&gt;
2259
2260
2261 ! (NODE DOES NOT HAVE THE NAME)
2262 INITIATE !
2263 A P-NODE !
2264 REGISTRATION !
2265 V
2266
2267 <span class="h3"><a class="selflink" id="section-15.3" href="#section-15.3">15.3</a>. NAME QUERY TRANSACTIONS</span>
2268
2269 Name query transactions are initiated by end-nodes to obtain the IP
2270 address(es) and other attributes associated with a NetBIOS name.
2271
2272 <span class="h4"><a class="selflink" id="section-15.3.1" href="#section-15.3.1">15.3.1</a>. QUERY BY B NODES</span>
2273
2274 The following diagram shows how B nodes go about discovering who owns
2275 a name.
2276
2277 The left half of the diagram illustrates what happens if there are no
2278 holders of the name. In that case no responses are received in
2279 answer to the broadcast NAME QUERY REQUEST(s).
2280
2281 The right half shows a POSITIVE NAME QUERY RESPONSE unicast by a name
2282 holder in answer to the broadcast request. A name holder will make
2283 this response to every NAME QUERY REQUEST that it hears. And each
2284 holder acts this way. Thus, the node sending the request may receive
2285 many responses, some duplicates, and from many nodes.
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297 <span class="grey">NetBIOS Working Group [Page 39]</span></pre>
2298 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-40" ></span>
2299 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2300
2301
2302 B-NODE DISCOVERY PROCESS
2303
2304
2305 &lt;------NAME NOT ON NETWORK------&gt; &lt;---NAME PRESENT ON NETWORK--&gt;
2306
2307 REQ. NODE NODE REQ.NODE
2308 HOLDING
2309 NAME
2310
2311 (BROADCAST) QUERY (BROADCAST) QUERY
2312 ----------------------&gt; &lt;---------------------
2313
2314 NAME QUERY REQUEST NAME QUERY REQUEST
2315 ----------------------&gt; &lt;---------------------
2316
2317 QUERY POSITIVE RESPONSE
2318 ----------------------&gt; ------------------------------&gt;
2319
2320 Name query is generally, but not necessarily, a prelude to NetBIOS
2321 session establishment or NetBIOS datagram transmission. However,
2322 name query may be used for other purposes.
2323
2324 A B node may elect to build a group membership list for subsequent
2325 use (e.g. for session establishment) by collecting and saving the
2326 responses.
2327
2328 <span class="h4"><a class="selflink" id="section-15.3.2" href="#section-15.3.2">15.3.2</a>. QUERY BY P NODES</span>
2329
2330 An NBNS answers queries from a P node with a list of IP address and
2331 other information for each owner of the name. If there are multiple
2332 owners (i.e. if the name is a group name), the NBNS loads as many
2333 answers into the response as will fit into a UDP packet. A
2334 truncation flag indicates whether any additional owner information
2335 remains. All the information may be obtained by repeating the query
2336 over a TCP connection.
2337
2338 The NBNS is not required to impose any order on its answer list.
2339
2340 The following diagram shows what happens if the NBNS has no
2341 information about the name:
2342
2343 P-NODE DISCOVERY PROCESS
2344 (server has no information about the name)
2345
2346 P-NODE NBNS
2347 NAME QUERY REQUEST
2348 ---------------------------------&gt;
2349
2350 NEGATIVE RESPONSE
2351 &lt;---------------------------------
2352
2353
2354
2355
2356 <span class="grey">NetBIOS Working Group [Page 40]</span></pre>
2357 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-41" ></span>
2358 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2359
2360
2361 The next diagram illustrates interaction between the end-node and the
2362 NBNS when the NBNS does have information about the name. This
2363 diagram shows, in addition, the retransmission of the request by the
2364 end-node in the absence of a timely response. Also shown are WACKs
2365 (or temporary, intermediate responses) sent by the NBNS to the end-
2366 node:
2367
2368 P-NODE QUERY PROCESS
2369 (server HAS information about the name)
2370
2371 P-NODE NBNS
2372 NAME QUERY REQUEST
2373 /----------------------------------------&gt;
2374 /
2375 ! (OPTIONAL) WACK
2376 ! &lt;- - - - - - - - - - - - - - - - - - - -
2377 ! !
2378 !timer !
2379 ! ! (optional timer restart)
2380 ! !
2381 \ V QUERY
2382 \---------------------------------------&gt;
2383 .
2384 .
2385 .
2386 QUERY
2387 /----------------------------------------&gt;
2388 /
2389 ! (OPTIONAL) WACK
2390 ! &lt;- - - - - - - - - - - - - - - - - - - -
2391 ! !
2392 !timer !
2393 ! ! (optional timer restart)
2394 ! !
2395 \ V QUERY
2396 \---------------------------------------&gt;
2397 .
2398 .
2399
2400 POSITIVE RESPONSE
2401 &lt;-----------------------------------------
2402
2403
2404 The following diagram illustrates NBNS redirection. Upon receipt of
2405 a NAME QUERY REQUEST, the NBNS redirects the client to another NBNS.
2406 The client repeats the request to the new NBNS and obtains a
2407 response. The diagram shows that response as a POSITIVE NAME QUERY
2408 RESPONSE. However any legal NBNS response may occur in actual
2409 operation.
2410
2411
2412
2413
2414
2415 <span class="grey">NetBIOS Working Group [Page 41]</span></pre>
2416 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-42" ></span>
2417 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2418
2419
2420 NBNS REDIRECTION
2421
2422 P-NODE NBNS
2423 NAME QUERY REQUEST
2424 ---------------------------------&gt;
2425
2426 REDIRECT NAME QUERY RESPONSE
2427 &lt;---------------------------------
2428
2429 (START FROM THE
2430 VERY BEGINNING
2431 USING THE ADDRESS
2432 OF THE NEWLY
2433 SUPPLIED NBNS.)
2434 NEW
2435 P-NODE NBNS
2436 NAME QUERY REQUEST
2437 ---------------------------------&gt;
2438
2439 POSITIVE NAME QUERY RESPONSE
2440 &lt;---------------------------------
2441
2442 The next diagram shows how a P or M node tells the NBNS that the NBNS
2443 has provided incorrect information. This procedure may begin after a
2444 DATAGRAM ERROR packet has been received or a session set-up attempt
2445 has discovered that the NetBIOS name does not exist at the
2446 destination, the IP address of which was obtained from the NBNS
2447 during a prior name query transaction. The NBNS, in this case a
2448 secure NBNS, issues queries to verify whether the information is, in
2449 fact, incorrect. The NBNS closes the transaction by sending either a
2450 POSITIVE or NEGATIVE NAME RELEASE RESPONSE, depending on the results
2451 of the verification.
2452
2453 CORRECTING NBNS INFORMATION BASE
2454
2455 P-NODE NBNS
2456 NAME RELEASE REQUEST
2457 ---------------------------------&gt;
2458 QUERY
2459 ----------------&gt;
2460
2461 QUERY
2462 ----------------&gt;
2463
2464 (NAME TAKEN OFF THE DATABASE
2465 IF NBNS FINDS IT TO BE
2466 INCORRECT)
2467
2468 POSITIVE/NEGATIVE RESPONSE
2469 &lt;---------------------------------
2470
2471
2472
2473
2474 <span class="grey">NetBIOS Working Group [Page 42]</span></pre>
2475 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-43" ></span>
2476 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2477
2478
2479 <span class="h4"><a class="selflink" id="section-15.3.3" href="#section-15.3.3">15.3.3</a>. QUERY BY M NODES</span>
2480
2481 M node name query follows the B node pattern. In the absence of
2482 adequate results, the M node then continues by performing a P node
2483 type query. This is shown in the following diagram:
2484
2485 M-NODE DISCOVERY PROCESS
2486
2487
2488 &lt;---NAME NOT ON BROADCAST AREA--&gt; &lt;--NAME IS ON BROADCAST AREA-&gt;
2489
2490 REQ. NODE NODE REQ.NODE
2491 HOLDING
2492 NAME
2493
2494 (BROADCAST) QUERY (BROADCAST) QUERY
2495 ---------------------&gt; &lt;----------------------
2496
2497 NAME QUERY REQUEST NAME QUERY REQUEST
2498 ---------------------&gt; &lt;----------------------
2499
2500 QUERY POSITIVE RESPONSE
2501 ---------------------&gt; -------------------------------&gt;
2502
2503 !
2504 INITIATE !
2505 A P-NODE !
2506 DISCOVERY !
2507 PROCESS !
2508 V
2509
2510
2511
2512 <span class="h4"><a class="selflink" id="section-15.3.4" href="#section-15.3.4">15.3.4</a>. ACQUIRE GROUP MEMBERSHIP LIST</span>
2513
2514 The entire membership of a group may be acquired by sending a NAME
2515 QUERY REQUEST to the NBNS. The NBNS will respond with a POSITIVE
2516 NAME QUERY RESPONSE or a NEGATIVE NAME QUERY RESPONSE. A negative
2517 response completes the procedure and indicates that there are no
2518 members in the group.
2519
2520 If the positive response has the truncation bit clear, then the
2521 response contains the entire list of group members. If the
2522 truncation bit is set, then this entire procedure must be repeated,
2523 but using TCP as a foundation rather than UDP.
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533 <span class="grey">NetBIOS Working Group [Page 43]</span></pre>
2534 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-44" ></span>
2535 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2536
2537
2538 <span class="h3"><a class="selflink" id="section-15.4" href="#section-15.4">15.4</a>. NAME RELEASE TRANSACTIONS</span>
2539
2540 <span class="h4"><a class="selflink" id="section-15.4.1" href="#section-15.4.1">15.4.1</a>. RELEASE BY B NODES</span>
2541
2542 A NAME RELEASE DEMAND contains the following information:
2543
2544 - NetBIOS name
2545 - The scope of the NetBIOS name
2546 - Name type: unique or group
2547 - IP address of the releasing node
2548 - Transaction ID
2549
2550 REQUESTING OTHER
2551 B-NODE B-NODES
2552 NAME RELEASE DEMAND
2553 ----------------------------------&gt;
2554
2555 <span class="h4"><a class="selflink" id="section-15.4.2" href="#section-15.4.2">15.4.2</a>. RELEASE BY P NODES</span>
2556
2557 A NAME RELEASE REQUEST contains the following information:
2558
2559 - NetBIOS name
2560 - The scope of the NetBIOS name
2561 - Name type: unique or group
2562 - IP address of the releasing node
2563 - Transaction ID
2564
2565
2566 A NAME RELEASE RESPONSE contains the following information:
2567
2568 - NetBIOS name
2569 - The scope of the NetBIOS name
2570 - Name type: unique or group
2571 - IP address of the releasing node
2572 - Transaction ID
2573 - Result:
2574 - Yes: name was released
2575 - No: name was not released, a reason code is provided
2576
2577 REQUESTING
2578 P-NODE NBNS
2579 NAME RELEASE REQUEST
2580 ----------------------------------&gt;
2581
2582 NAME RELEASE RESPONSE
2583 &lt;---------------------------------
2584
2585 <span class="h4"><a class="selflink" id="section-15.4.3" href="#section-15.4.3">15.4.3</a>. RELEASE BY M NODES</span>
2586
2587 The name release procedure of the M node is a combination of the P
2588 and B node name release procedures. The M node first performs the P
2589
2590
2591
2592 <span class="grey">NetBIOS Working Group [Page 44]</span></pre>
2593 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-45" ></span>
2594 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2595
2596
2597 release procedure. If the P procedure fails then the release
2598 procedure does not continue, it fails. If and only if the P
2599 procedure succeeds then the M node broadcasts the NAME RELEASE DEMAND
2600 to the broadcast area, the B procedure.
2601
2602 NOTE: An M node typically performs a B-style operation and then a
2603 P-style operation. In this case, however, the P-style
2604 operation comes first.
2605
2606 The following diagram illustrates the M node name release procedure:
2607
2608 &lt;-----P procedure fails-------&gt; &lt;-------P procedure succeeds---&gt;
2609
2610 REQUESTING NBNS REQUESTING NBNS
2611 M-NODE M-NODE
2612
2613 NAME RELEASE REQUEST NAME RELEASE REQUEST
2614 --------------------------&gt; ------------------------&gt;
2615
2616 NEGATIVE RELEASE RESPONSE POSITIVE RELEASE RESPONSE
2617 &lt;-------------------------- &lt;-------------------------
2618
2619 OTHER
2620 M-NODES
2621
2622 NAME RELEASE DEMAND
2623 ------------------------&gt;
2624
2625 <span class="h3"><a class="selflink" id="section-15.5" href="#section-15.5">15.5</a>. NAME MAINTENANCE TRANSACTIONS</span>
2626
2627 <span class="h4"><a class="selflink" id="section-15.5.1" href="#section-15.5.1">15.5.1</a>. NAME REFRESH</span>
2628
2629 Name refresh transactions are used to handle the following
2630 situations:
2631
2632 a) An NBNS node needs to detect if a P or M node has "silently"
2633 gone down, so that names held by that node can be purged
2634 from the data base.
2635
2636
2637 b) If the NBNS goes down, it needs to be able to reconstruct
2638 the data base when it comes back up.
2639
2640
2641 c) If the network should be partitioned, the NBNS needs to be
2642 able to able to update its data base when the network
2643 reconnects.
2644
2645 Each P or M node is responsible for sending periodic NAME REFRESH
2646 REQUESTs for each name that it has registered. Each refresh packet
2647 contains a single name that has been successfully registered by that
2648
2649
2650
2651 <span class="grey">NetBIOS Working Group [Page 45]</span></pre>
2652 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-46" ></span>
2653 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2654
2655
2656 node. The interval between such packets is negotiated between the
2657 end node and the NBNS server at the time that the name is initially
2658 claimed. At name claim time, an end node will suggest a refresh
2659 timeout value. The NBNS node can modify this value in the reply
2660 packet. A NBNS node can also choose to tell the end node to not send
2661 any refresh packet by using the "infinite" timeout value in the
2662 response packet. The timeout value returned by the NBNS is the
2663 actual refresh timeout that the end node must use.
2664
2665 When a node sends a NAME REFRESH REQUEST, it must be prepared to
2666 receive a negative response. This would happen, for example, if the
2667 the NBNS discovers that the the name had already been assigned to
2668 some other node. If such a response is received, the end node should
2669 mark the name as being in conflict. Such an entry should be treated
2670 in the same way as if name conflict had been detected against the
2671 name. The following diagram illustrates name refresh:
2672
2673 &lt;-----Successful Refresh-----&gt; &lt;-----Unsuccessful Refresh----&gt;
2674
2675 REFRESHING NBNS REFRESHING NBNS
2676 NODE NODE
2677
2678 NAME REFRESH REQUEST NAME REFRESH REQUEST
2679 ------------------------&gt; -----------------------&gt;
2680
2681 POSITIVE RESPONSE NEGATIVE RESPONSE
2682 &lt;------------------------ &lt;-----------------------
2683 !
2684 !
2685 V
2686 MARK NAME IN
2687 CONFLICT
2688
2689 <span class="h4"><a class="selflink" id="section-15.5.2" href="#section-15.5.2">15.5.2</a>. NAME CHALLENGE</span>
2690
2691 Name challenge is done by sending a NAME QUERY REQUEST to an end node
2692 of any type. If a POSITIVE NAME QUERY RESPONSE is returned, then
2693 that node still owns the name. If a NEGATIVE NAME QUERY RESPONSE is
2694 received or if no response is received, it can be assumed that the
2695 end node no longer owns the name.
2696
2697 Name challenge can be performed either by the NBNS node, or by an end
2698 node. When an end-node sends a name claim packet, the NBNS node may
2699 do the challenge operation. The NBNS node can choose, however, to
2700 require the end node do the challenge. In that case, the NBNS will
2701 send an END-NODE CHALLENGE RESPONSE packet to the end node, which
2702 should then proceed to challenge the putative owner.
2703
2704 Note that the name challenge procedure sends a normal NAME QUERY
2705 REQUEST packet to the end node. It does not require a special
2706 packet. The only new packet introduced is the END-NODE CHALLENGE
2707
2708
2709
2710 <span class="grey">NetBIOS Working Group [Page 46]</span></pre>
2711 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-47" ></span>
2712 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2713
2714
2715 RESPONSE which is sent by an NBNS node when the NBNS wants the end-
2716 node to perform the challenge operation.
2717
2718 <span class="h4"><a class="selflink" id="section-15.5.3" href="#section-15.5.3">15.5.3</a>. CLEAR NAME CONFLICT</span>
2719
2720 It is possible during a refresh request from a M or P node for a NBNS
2721 to detects a name in conflict. The response to the NAME REFRESH
2722 REQUEST must be a NEGATIVE NAME REGISTRATION RESPONSE. Optionally,
2723 in addition, the NBNS may send a NAME CONFLICT DEMAND or a NAME
2724 RELEASE REQUEST to the refreshing node. The NAME CONFLICT DEMAND
2725 forces the node to place the name in the conflict state. The node
2726 will eventually inform it's user of the conflict. The NAME RELEASE
2727 REQUEST will force the node to flush the name from its local name
2728 table completely. This forces the node to flush the name in
2729 conflict. This does not cause termination of existing sessions using
2730 this name.
2731
2732 The following diagram shows an NBNS detecting and correcting a
2733 conflict:
2734
2735 REFRESHING NODE NBNS
2736
2737 NAME REFRESH REQUEST
2738 -----------------------------------------&gt;
2739
2740 NEGATIVE NAME REGISTRATION RESPONSE
2741 &lt;-----------------------------------------
2742
2743 NAME CONFLICT DEMAND
2744 &lt;-----------------------------------------
2745
2746 OR
2747
2748 NAME RELEASE REQUEST
2749 &lt;-----------------------------------------
2750
2751 POSITIVE/NEGATIVE RELEASE REQUEST
2752 -----------------------------------------&gt;
2753
2754 <span class="h3"><a class="selflink" id="section-15.6" href="#section-15.6">15.6</a>. ADAPTER STATUS TRANSACTIONS</span>
2755
2756 Adapter status is obtained from a node as follows:
2757
2758 1. Perform a name discovery operation to obtain the IP
2759 addresses of a set of end-nodes.
2760
2761 2. Repeat until all end-nodes from the set have been used:
2762
2763 a. Select one end-node from the set.
2764
2765 b. Send a NODE STATUS REQUEST to that end-node using UDP.
2766
2767
2768
2769 <span class="grey">NetBIOS Working Group [Page 47]</span></pre>
2770 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-48" ></span>
2771 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2772
2773
2774 c. Await a NODE STATUS RESPONSE. (If a timely response is
2775 not forthcoming, repeat step "b" UCAST_REQ_RETRY_COUNT
2776 times. After the last retry, go to step "a".)
2777
2778 d. If the truncation bit is not set in the response, the
2779 response contains the entire node status. Return the
2780 status to the user and terminate this procedure.
2781
2782 e. If the truncation bit is set in the response, then not
2783 all status was returned because it would not fit into
2784 the response packet. The responder will set the
2785 truncation bit if the IP datagram length would exceed
2786 MAX_DATAGRAM_LENGTH. Return the status to the user and
2787 terminate this procedure.
2788
2789
2790 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Return error to user, no status obtained.</span>
2791
2792 The repetition of step 2, above, through all nodes of the set, is
2793 optional.
2794
2795 Following is an example transaction of a successful Adapter Status
2796 operation:
2797
2798 REQUESTING NODE NAME OWNER
2799
2800 NAME QUERY REQUEST
2801 -----------------------------------------&gt;
2802
2803 POSITIVE NAME QUERY RESPONSE
2804 &lt;-----------------------------------------
2805
2806 NODE STATUS REQUEST
2807 -----------------------------------------&gt;
2808
2809 NODE STATUS RESPONSE
2810 &lt;-----------------------------------------
2811
2812 <span class="h2"><a class="selflink" id="section-16" href="#section-16">16</a>. NetBIOS SESSION SERVICE</span>
2813
2814 The NetBIOS session service begins after one or more IP addresses
2815 have been found for the target name. These addresses may have been
2816 acquired using the NetBIOS name query transactions or by other means,
2817 such as a local name table or cache.
2818
2819 NetBIOS session service transactions, packets, and protocols are
2820 identical for all end-node types. They involve only directed
2821 (point-to-point) communications.
2822
2823
2824
2825
2826
2827
2828 <span class="grey">NetBIOS Working Group [Page 48]</span></pre>
2829 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-49" ></span>
2830 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2831
2832
2833 <span class="h3"><a class="selflink" id="section-16.1" href="#section-16.1">16.1</a>. OVERVIEW OF NetBIOS SESSION SERVICE</span>
2834
2835 Session service has three phases:
2836
2837 Session establishment - it is during this phase that the IP
2838 address and TCP port of the called name is determined, and a
2839 TCP connection is established with the remote party.
2840
2841 Steady state - it is during this phase that NetBIOS data
2842 messages are exchanged over the session. Keep-alive packets
2843 may also be exchanged if the participating nodes are so
2844 configured.
2845
2846 Session close - a session is closed whenever either a party (in
2847 the session) closes the session or it is determined that one
2848 of the parties has gone down.
2849
2850 <span class="h4"><a class="selflink" id="section-16.1.1" href="#section-16.1.1">16.1.1</a>. SESSION ESTABLISHMENT PHASE OVERVIEW</span>
2851
2852 An end-node begins establishment of a session to another node by
2853 somehow acquiring (perhaps using the name query transactions or a
2854 local cache) the IP address of the node or nodes purported to own the
2855 destination name.
2856
2857 Every end-node awaits incoming NetBIOS session requests by listening
2858 for TCP calls to a well-known service port, SSN_SRVC_TCP_PORT. Each
2859 incoming TCP connection represents the start of a separate NetBIOS
2860 session initiation attempt. The NetBIOS session server, not the
2861 ultimate application, accepts the incoming TCP connection(s).
2862
2863 Once the TCP connection is open, the calling node sends session
2864 service request packet. This packet contains the following
2865 information:
2866
2867 - Calling IP address (see note)
2868 - Calling NetBIOS name
2869 - Called IP address (see note)
2870 - Called NetBIOS name
2871
2872 NOTE: The IP addresses are obtained from the TCP service
2873 interface.
2874
2875 When the session service request packet arrives at the NetBIOS
2876 server, one of the the following situations will exist:
2877
2878 - There exists a NetBIOS LISTEN compatible with the incoming
2879 call and there are adequate resources to permit session
2880 establishment to proceed.
2881
2882 - There exists a NetBIOS LISTEN compatible with the incoming
2883 call, but there are inadequate resources to permit
2884
2885
2886
2887 <span class="grey">NetBIOS Working Group [Page 49]</span></pre>
2888 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-50" ></span>
2889 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2890
2891
2892 establishment of a session.
2893
2894 - The called name does, in fact, exist on the called node, but
2895 there is no pending NetBIOS LISTEN compatible with the
2896 incoming call.
2897
2898 - The called name does not exist on the called node.
2899
2900 In all but the first case, a rejection response is sent back over the
2901 TCP connection to the caller. The TCP connection is then closed and
2902 the session phase terminates. Any retry is the responsibility of the
2903 caller. For retries in the case of a group name, the caller may use
2904 the next member of the group rather than immediately retrying the
2905 instant address. In the case of a unique name, the caller may
2906 attempt an immediate retry using the same target IP address unless
2907 the called name did not exist on the called node. In that one case,
2908 the NetBIOS name should be re-resolved.
2909
2910 If a compatible LISTEN exists, and there are adequate resources, then
2911 the session server may transform the existing TCP connection into the
2912 NetBIOS data session. Alternatively, the session server may
2913 redirect, or "retarget" the caller to another TCP port (and IP
2914 address).
2915
2916 If the caller is redirected, the caller begins the session
2917 establishment anew, but using the new IP address and TCP port given
2918 in the retarget response. Again a TCP connection is created, and
2919 again the calling and called node exchange credentials. The called
2920 party may accept the call, reject the call, or make a further
2921 redirection.
2922
2923 This mechanism is based on the presumption that, on hosts where it is
2924 not possible to transfer open TCP connections between processes, the
2925 host will have a central session server. Applications willing to
2926 receive NetBIOS calls will obtain an ephemeral TCP port number, post
2927 a TCP unspecified passive open on that port, and then pass that port
2928 number and NetBIOS name information to the NetBIOS session server
2929 using a NetBIOS LISTEN operation. When the call is placed, the
2930 session server will "retarget" the caller to the application's TCP
2931 socket. The caller will then place a new call, directly to the
2932 application. The application has the responsibility to mimic the
2933 session server at least to the extent of receiving the calling
2934 credentials and then accepting or rejecting the call.
2935
2936 <span class="h5"><a class="selflink" id="section-16.1.1.1" href="#section-16.1.1.1">16.1.1.1</a>. RETRYING AFTER BEING RETARGETTED</span>
2937
2938 A calling node may find that it can not establish a session with a
2939 node to which it was directed by the retargetting procedure. Since
2940 retargetting may be nested, there is an issue whether the caller
2941 should begin a retry at the initial starting point or back-up to an
2942 intermediate retargetting point. The caller may use any method. A
2943
2944
2945
2946 <span class="grey">NetBIOS Working Group [Page 50]</span></pre>
2947 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-51" ></span>
2948 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
2949
2950
2951 discussion of two such methods is in <a href="#appendix-B">Appendix B</a>, "Retarget
2952 Algorithms".
2953
2954 <span class="h5"><a class="selflink" id="section-16.1.1.2" href="#section-16.1.1.2">16.1.1.2</a>. SESSION ESTABLISHMENT TO A GROUP NAME</span>
2955
2956 Session establishment with a group name requires special
2957 consideration. When a NetBIOS CALL attempt is made to a group name,
2958 name discovery will result in a list (possibly incomplete) of the
2959 members of that group. The calling node selects one member from the
2960 list and attempts to build a session. If that fails, the calling
2961 node may select another member and make another attempt.
2962
2963 When the session service attempts to make a connection with one of
2964 the members of the group, there is no guarantee that that member has
2965 a LISTEN pending against that group name, that the called node even
2966 owns, or even that the called node is operating.
2967
2968 <span class="h4"><a class="selflink" id="section-16.1.2" href="#section-16.1.2">16.1.2</a>. STEADY STATE PHASE OVERVIEW</span>
2969
2970 NetBIOS data messages are exchanged in the steady state. NetBIOS
2971 messages are sent by prepending the user data with a message header
2972 and sending the header and the user data over the TCP connection.
2973 The receiver removes the header and passes the data to the NetBIOS
2974 user.
2975
2976 In order to detect failure of one of the nodes or of the intervening
2977 network, "session keep alive" packets may be periodically sent in the
2978 steady state.
2979
2980 Any failure of the underlying TCP connection, whether a reset, a
2981 timeout, or other failure, implies failure of the NetBIOS session.
2982
2983 <span class="h4"><a class="selflink" id="section-16.1.3" href="#section-16.1.3">16.1.3</a>. SESSION TERMINATION PHASE OVERVIEW</span>
2984
2985 A NetBIOS session is terminated normally when the user requests the
2986 session to be closed or when the session service detects the remote
2987 partner of the session has gracefully terminated the TCP connection.
2988 A NetBIOS session is abnormally terminated when the session service
2989 detects a loss of the connection. Connection loss can be detected
2990 with the keep-alive function of the session service or TCP, or on the
2991 failure of a SESSION MESSAGE send operation.
2992
2993 When a user requests to close a session, the service first attempts a
2994 graceful in-band close of the TCP connection. If the connection does
2995 not close within the SSN_CLOSE_TIMEOUT the TCP connection is aborted.
2996 No matter how the TCP connection is terminated, the NetBIOS session
2997 service always closes the NetBIOS session.
2998
2999 When the session service receives an indication from TCP that a
3000 connection close request has been received, the TCP connection and
3001 the NetBIOS session are immediately closed and the user is informed
3002
3003
3004
3005 <span class="grey">NetBIOS Working Group [Page 51]</span></pre>
3006 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-52" ></span>
3007 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3008
3009
3010 of the loss of the session. All data received up to the close
3011 indication should be delivered, if possible, to the session's user.
3012
3013 <span class="h3"><a class="selflink" id="section-16.2" href="#section-16.2">16.2</a>. SESSION ESTABLISHMENT PHASE</span>
3014
3015 All the following diagrams assume a name query operation was
3016 successfully completed by the caller node for the listener's name.
3017
3018 This first diagram shows the sequence of network events used to
3019 successfully establish a session without retargetting by the
3020 listener. The TCP connection is first established with the well-
3021 known NetBIOS session service TCP port, SSN_SRVC_TCP_PORT. The
3022 caller then sends a SESSION REQUEST packet over the TCP connection
3023 requesting a session with the listener. The SESSION REQUEST contains
3024 the caller's name and the listener's name. The listener responds
3025 with a POSITIVE SESSION RESPONSE informing the caller this TCP
3026 connection is accepted as the connection for the data transfer phase
3027 of the session.
3028
3029 CALLER LISTENER
3030
3031 TCP CONNECT
3032 ====================================&gt;
3033 TCP ACCEPT
3034 &lt;===================================
3035 SESSION REQUEST
3036 ------------------------------------&gt;
3037 POSITIVE RESPONSE
3038 &lt;-----------------------------------
3039
3040 The second diagram shows the sequence of network events used to
3041 successfully establish a session when the listener does retargetting.
3042 The session establishment procedure is the same as with the first
3043 diagram up to the listener's response to the SESSION REQUEST. The
3044 listener, divided into two sections, the listen processor and the
3045 actual listener, sends a SESSION RETARGET RESPONSE to the caller.
3046 This response states the call is acceptable, but the data transfer
3047 TCP connection must be at the new IP address and TCP port. The
3048 caller then re-iterates the session establishment process anew with
3049 the new IP address and TCP port after the initial TCP connection is
3050 closed. The new listener then accepts this connection for the data
3051 transfer phase with a POSITIVE SESSION RESPONSE.
3052
3053 CALLER LISTEN PROCESSOR LISTENER
3054
3055 TCP CONNECT
3056 =============================&gt;
3057 TCP ACCEPT
3058 &lt;=============================
3059 SESSION REQUEST
3060 -----------------------------&gt;
3061
3062
3063
3064 <span class="grey">NetBIOS Working Group [Page 52]</span></pre>
3065 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-53" ></span>
3066 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3067
3068
3069 SESSION RETARGET RESPONSE
3070 &lt;-----------------------------
3071 TCP CLOSE
3072 &lt;=============================
3073 TCP CLOSE
3074 =============================&gt;
3075
3076 TCP CONNECT
3077 ====================================================&gt;
3078 TCP ACCEPT
3079 &lt;====================================================
3080 SESSION REQUEST
3081 ----------------------------------------------------&gt;
3082 POSITIVE RESPONSE
3083 &lt;----------------------------------------------------
3084
3085 The third diagram is the sequence of network events for a rejected
3086 session request with the listener. This type of rejection could
3087 occur with either a non-retargetting listener or a retargetting
3088 listener. After the TCP connection is established at
3089 SSN_SRVC_TCP_PORT, the caller sends the SESSION REQUEST over the TCP
3090 connection. The listener does not have either a listen pending for
3091 the listener's name or the pending NetBIOS listen is specific to
3092 another caller's name. Consequently, the listener sends a NEGATIVE
3093 SESSION RESPONSE and closes the TCP connection.
3094
3095 CALLER LISTENER
3096
3097 TCP CONNECT
3098 ====================================&gt;
3099 TCP ACCEPT
3100 &lt;===================================
3101 SESSION REQUEST
3102 ------------------------------------&gt;
3103 NEGATIVE RESPONSE
3104 &lt;-----------------------------------
3105 TCP CLOSE
3106 &lt;===================================
3107 TCP CLOSE
3108 ====================================&gt;
3109
3110 The fourth diagram is the sequence of network events when session
3111 establishment fails with a retargetting listener. After being
3112 redirected, and after the initial TCP connection is closed the caller
3113 tries to establish a TCP connection with the new IP address and TCP
3114 port. The connection fails because either the port is unavailable or
3115 the target node is not active. The port unavailable race condition
3116 occurs if another caller has already acquired the TCP connection with
3117 the listener. For additional implementation suggestions, see
3118 <a href="#appendix-B">Appendix B</a>, "Retarget Algorithms".
3119
3120
3121
3122
3123 <span class="grey">NetBIOS Working Group [Page 53]</span></pre>
3124 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-54" ></span>
3125 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3126
3127
3128 CALLER LISTEN PROCESSOR LISTENER
3129
3130 TCP CONNECT
3131 =============================&gt;
3132 TCP ACCEPT
3133 &lt;=============================
3134 SESSION REQUEST
3135 -----------------------------&gt;
3136 REDIRECT RESPONSE
3137 &lt;-----------------------------
3138 TCP CLOSE
3139 &lt;=============================
3140 TCP CLOSE
3141 =============================&gt;
3142
3143 TCP CONNECT
3144 ====================================================&gt;
3145
3146 CONNECTION REFUSED OR TIMED OUT
3147 &lt;===================================================
3148
3149
3150 <span class="h3"><a class="selflink" id="section-16.3" href="#section-16.3">16.3</a>. SESSION DATA TRANSFER PHASE</span>
3151
3152 <span class="h4"><a class="selflink" id="section-16.3.1" href="#section-16.3.1">16.3.1</a>. DATA ENCAPSULATION</span>
3153
3154 NetBIOS messages are exchanged in the steady state. Messages are
3155 sent by prepending user data with message header and sending the
3156 header and the user data over the TCP connection. The receiver
3157 removes the header and delivers the NetBIOS data to the user.
3158
3159 <span class="h4"><a class="selflink" id="section-16.3.2" href="#section-16.3.2">16.3.2</a>. SESSION KEEP-ALIVES</span>
3160
3161 In order to detect node failure or network partitioning, "session
3162 keep alive" packets are periodically sent in the steady state. A
3163 session keep alive packet is discarded by a peer node.
3164
3165 A session keep alive timer is maintained for each session. This
3166 timer is reset whenever any data is sent to, or received from, the
3167 session peer. When the timer expires, a NetBIOS session keep-alive
3168 packet is sent on the TCP connection. Sending the keep-alive packet
3169 forces data to flow on the TCP connection, thus indirectly causing
3170 TCP to detect whether the connection is still active.
3171
3172 Since many TCP implementations provide a parallel TCP "keep- alive"
3173 mechanism, the NetBIOS session keep-alive is made a configurable
3174 option. It is recommended that the NetBIOS keep- alive mechanism be
3175 used only in the absence of TCP keep-alive.
3176
3177 Note that unlike TCP keep alives, NetBIOS session keep alives do not
3178 require a response from the NetBIOS peer -- the fact that it was
3179
3180
3181
3182 <span class="grey">NetBIOS Working Group [Page 54]</span></pre>
3183 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-55" ></span>
3184 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3185
3186
3187 possible to send the NetBIOS session keep alive is sufficient
3188 indication that the peer, and the connection to it, are still active.
3189
3190 The only requirement for interoperability is that when a session keep
3191 alive packet is received, it should be discarded.
3192
3193 <span class="h2"><a class="selflink" id="section-17" href="#section-17">17</a>. NETBIOS DATAGRAM SERVICE</span>
3194
3195 <span class="h3"><a class="selflink" id="section-17.1" href="#section-17.1">17.1</a>. OVERVIEW OF NetBIOS DATAGRAM SERVICE</span>
3196
3197 Every NetBIOS datagram has a named destination and source. To
3198 transmit a NetBIOS datagram, the datagram service must perform a name
3199 query operation to learn the IP address and the attributes of the
3200 destination NetBIOS name. (This information may be cached to avoid
3201 the overhead of name query on subsequent NetBIOS datagrams.)
3202
3203 NetBIOS datagrams are carried within UDP packets. If a NetBIOS
3204 datagram is larger than a single UDP packet, it may be fragmented
3205 into several UDP packets.
3206
3207 End-nodes may receive NetBIOS datagrams addressed to names not held
3208 by the receiving node. Such datagrams should be discarded. If the
3209 name is unique then a DATAGRAM ERROR packet is sent to the source of
3210 that NetBIOS datagram.
3211
3212 <span class="h4"><a class="selflink" id="section-17.1.1" href="#section-17.1.1">17.1.1</a>. UNICAST, MULTICAST, AND BROADCAST</span>
3213
3214 NetBIOS datagrams may be unicast, multicast, or broadcast. A NetBIOS
3215 datagram addressed to a unique NetBIOS name is unicast. A NetBIOS
3216 datatgram addressed to a group NetBIOS name, whether there are zero,
3217 one, or more actual members, is multicast. A NetBIOS datagram sent
3218 using the NetBIOS "Send Broadcast Datagram" primitive is broadcast.
3219
3220 <span class="h4"><a class="selflink" id="section-17.1.2" href="#section-17.1.2">17.1.2</a>. FRAGMENTATION OF NetBIOS DATAGRAMS</span>
3221
3222 When the header and data of a NetBIOS datagram exceeds the maximum
3223 amount of data allowed in a UDP packet, the NetBIOS datagram must be
3224 fragmented before transmission and reassembled upon receipt.
3225
3226 A NetBIOS Datagram is composed of the following protocol elements:
3227
3228 - IP header of 20 bytes (minimum)
3229 - UDP header of 8 bytes
3230 - NetBIOS Datagram Header of 14 bytes
3231 - The NetBIOS Datagram data.
3232
3233 The NetBIOS Datagram data section is composed of 3 parts:
3234
3235 - Source NetBIOS name (255 bytes maximum)
3236 - Destination NetBIOS name (255 bytes maximum)
3237 - The NetBIOS user's data (maximum of 512 bytes)
3238
3239
3240
3241 <span class="grey">NetBIOS Working Group [Page 55]</span></pre>
3242 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-56" ></span>
3243 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3244
3245
3246 The two name fields are in second level encoded format (see <a href="#section-14">section</a>
3247 <a href="#section-14">14</a>.)
3248
3249 A maximum size NetBIOS datagram is 1064 bytes. The minimal maximum
3250 IP datagram size is 576 bytes. Consequently, a NetBIOS Datagram may
3251 not fit into a single IP datagram. This makes it necessary to permit
3252 the fragmentation of NetBIOS Datagrams.
3253
3254 On networks meeting or exceeding the minimum IP datagram length
3255 requirement of 576 octets, at most two NetBIOS datagram fragments
3256 will be generated. The protocols and packet formats accommodate
3257 fragmentation into three or more parts.
3258
3259 When a NetBIOS datagram is fragmented, the IP, UDP and NetBIOS
3260 Datagram headers are present in each fragment. The NetBIOS Datagram
3261 data section is split among resulting UDP datagrams. The data
3262 sections of NetBIOS datagram fragments do not overlap. The only
3263 fields of the NetBIOS Datagram header that would vary are the FLAGS
3264 and OFFSET fields.
3265
3266 The FIRST bit in the FLAGS field indicate whether the fragment is the
3267 first in a sequence of fragments. The MORE bit in the FLAGS field
3268 indicates whether other fragments follow.
3269
3270 The OFFSET field is the byte offset from the beginning of the NetBIOS
3271 datagram data section to the first byte of the data section in a
3272 fragment. It is 0 for the first fragment. For each subsequent
3273 fragment, OFFSET is the sum of the bytes in the NetBIOS data sections
3274 of all preceding fragments.
3275
3276 If the NetBIOS datagram was not fragmented:
3277
3278 - FIRST = TRUE
3279 - MORE = FALSE
3280 - OFFSET = 0
3281
3282 If the NetBIOS datagram was fragmented:
3283
3284 - First fragment:
3285 - FIRST = TRUE
3286 - MORE = TRUE
3287 - OFFSET = 0
3288
3289 - Intermediate fragments:
3290 - FIRST = FALSE
3291 - MORE = TRUE
3292 - OFFSET = sum(NetBIOS data in prior fragments)
3293
3294 - Last fragment:
3295 - FIRST = FALSE
3296 - MORE = FALSE
3297
3298
3299
3300 <span class="grey">NetBIOS Working Group [Page 56]</span></pre>
3301 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-57" ></span>
3302 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3303
3304
3305 - OFFSET = sum(NetBIOS data in prior fragments)
3306
3307 The relative position of intermediate fragments may be ascertained
3308 from OFFSET.
3309
3310 An NBDD must remember the destination name of the first fragment in
3311 order to relay the subsequent fragments of a single NetBIOS datagram.
3312 The name information can be associated with the subsequent fragments
3313 through the transaction ID, DGM_ID, and the SOURCE_IP, fields of the
3314 packet. This information can be purged by the NBDD after the last
3315 fragment has been processed or FRAGMENT_TO time has expired since the
3316 first fragment was received.
3317
3318 <span class="h3"><a class="selflink" id="section-17.2" href="#section-17.2">17.2</a>. NetBIOS DATAGRAMS BY B NODES</span>
3319
3320 For NetBIOS datagrams with a named destination (i.e. non- broadcast),
3321 a B node performs a name discovery for the destination name before
3322 sending the datagram. (Name discovery may be bypassed if information
3323 from a previous discovery is held in a cache.) If the name type
3324 returned by name discovery is UNIQUE, the datagram is unicast to the
3325 sole owner of the name. If the name type is GROUP, the datagram is
3326 broadcast to the entire broadcast area using the destination IP
3327 address BROADCAST_ADDRESS.
3328
3329 A receiving node always filters datagrams based on the destination
3330 name. If the destination name is not owned by the node or if no
3331 RECEIVE DATAGRAM user operations are pending for the name, then the
3332 datagram is discarded. For datagrams with a UNIQUE name destination,
3333 if the name is not owned by the node then the receiving node sends a
3334 DATAGRAM ERROR packet. The error packet originates from the
3335 DGM_SRVC_UDP_PORT and is addressed to the SOURCE_IP and SOURCE_PORT
3336 from the bad datagram. The receiving node quietly discards datagrams
3337 with a GROUP name destination if the name is not owned by the node.
3338
3339 Since broadcast NetBIOS datagrams do not have a named destination,
3340 the B node sends the DATAGRAM SERVICE packet(s) to the entire
3341 broadcast area using the destination IP address BROADCAST_ADDRESS.
3342 In order for the receiving nodes to distinguish this datagram as a
3343 broadcast NetBIOS datagram, the NetBIOS name used as the destination
3344 name is '*' (hexadecimal 2A) followed by 15 bytes of hexidecimal 00.
3345 The NetBIOS scope identifier is appended to the name before it is
3346 converted into second-level encoding. For example, if the scope
3347 identifier is "NETBIOS.SCOPE" then the first-level encoded name would
3348 be:
3349
3350 CKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.NETBIOS.SCOPE
3351
3352 According to [<a href="#ref-2" title="&quot;IBM PC Network Technical Reference Manual&quot;">2</a>], a user may not provide a NetBIOS name beginning
3353 with "*".
3354
3355 For each node in the broadcast area that receives the NetBIOS
3356
3357
3358
3359 <span class="grey">NetBIOS Working Group [Page 57]</span></pre>
3360 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-58" ></span>
3361 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3362
3363
3364 broadcast datagram, if any RECEIVE BROADCAST DATAGRAM user operations
3365 are pending then the data from the NetBIOS datagram is replicated and
3366 delivered to each. If no such operations are pending then the node
3367 silently discards the datagram.
3368
3369 <span class="h3"><a class="selflink" id="section-17.3" href="#section-17.3">17.3</a>. NetBIOS DATAGRAMS BY P AND M NODES</span>
3370
3371 P and M nodes do not use IP broadcast to distribute NetBIOS
3372 datagrams.
3373
3374 Like B nodes, P and M nodes must perform a name discovery or use
3375 cached information to learn whether a destination name is a group or
3376 a unique name.
3377
3378 Datagrams to unique names are unicast directly to the destination by
3379 P and M nodes, exactly as they are by B nodes.
3380
3381 Datagrams to group names and NetBIOS broadcast datagrams are unicast
3382 to the NBDD. The NBDD then relays the datagrams to each of the nodes
3383 specified by the destination name.
3384
3385 An NBDD may not be capable of sending a NetBIOS datagram to a
3386 particular NetBIOS name, including the broadcast NetBIOS name ("*")
3387 defined above. A query mechanism is available to the end- node to
3388 determine if a NBDD will be able to relay a datagram to a given name.
3389 Before a datagram, or its fragments, are sent to the NBDD the P or M
3390 node may send a DATAGRAM QUERY REQUEST packet to the NBDD with the
3391 DESTINATION_NAME from the DATAGRAM SERVICE packet(s). The NBDD will
3392 respond with a DATAGRAM POSITIVE QUERY RESPONSE if it will relay
3393 datagrams to the specified destination name. After a positive
3394 response the end-node unicasts the datagram to the NBDD. If the NBDD
3395 will not be able to relay a datagram to the destination name
3396 specified in the query, a DATAGRAM NEGATIVE QUERY RESPONSE packet is
3397 returned. If the NBDD can not distribute a datagram, the end-node
3398 then has the option of getting the name's owner list from the NBNS
3399 and sending the datagram directly to each of the owners.
3400
3401 An NBDD must be able to respond to DATAGRAM QUERY REQUEST packets.
3402 The response may always be positive. However, the usage or
3403 implementation of the query mechanism by a P or M node is optional.
3404 An implementation may always unicast the NetBIOS datagram to the NBDD
3405 without asking if it will be relayed. Except for the datagram query
3406 facility described above, an NBDD provides no feedback to indicate
3407 whether it forwarded a datagram.
3408
3409 <span class="h2"><a class="selflink" id="section-18" href="#section-18">18</a>. NODE CONFIGURATION PARAMETERS</span>
3410
3411 - B NODES:
3412 - Node's permanent unique name
3413 - Whether IGMP is in use
3414 - Broadcast IP address to use
3415
3416
3417
3418 <span class="grey">NetBIOS Working Group [Page 58]</span></pre>
3419 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-59" ></span>
3420 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3421
3422
3423 - Whether NetBIOS session keep-alives are needed
3424 - Usable UDP data field length (to control fragmentation)
3425 - P NODES:
3426 - Node's permanent unique name
3427 - IP address of NBNS
3428 - IP address of NBDD
3429 - Whether NetBIOS session keep-alives are needed
3430 - Usable UDP data field length (to control fragmentation)
3431 - M NODES:
3432 - Node's permanent unique name
3433 - Whether IGMP is in use
3434 - Broadcast IP address to use
3435 - IP address of NBNS
3436 - IP address of NBDD
3437 - Whether NetBIOS session keep-alives are needed
3438 - Usable UDP data field length (to control fragmentation)
3439
3440
3441 <span class="h2"><a class="selflink" id="section-19" href="#section-19">19</a>. MINIMAL CONFORMANCE</span>
3442
3443 To ensure multi-vendor interoperability, a minimally conforming
3444 implementation based on this specification must observe the following
3445 rules:
3446
3447 a) A node designed to work only in a broadcast area must
3448 conform to the B node specification.
3449
3450 b) A node designed to work only in an internet must conform to
3451 the P node specification.
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477 <span class="grey">NetBIOS Working Group [Page 59]</span></pre>
3478 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-60" ></span>
3479 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3480
3481
3482
3483 REFERENCES
3484
3485
3486 [<a id="ref-1">1</a>] "Protocol Standard For a NetBIOS Service on a TCP/UDP
3487 Transport: Detailed Specifications", <a href="./rfc1002">RFC 1002</a>, March 1987.
3488
3489 [<a id="ref-2">2</a>] IBM Corp., "IBM PC Network Technical Reference Manual", No.
3490 6322916, First Edition, September 1984.
3491
3492 [<a id="ref-3">3</a>] J. Postel (Ed.), "Transmission Control Protocol", <a href="./rfc793">RFC 793</a>,
3493 September 1981.
3494
3495 [<a id="ref-4">4</a>] MIL-STD-1778
3496
3497 [<a id="ref-5">5</a>] J. Postel, "User Datagram Protocol", <a href="./rfc768">RFC 768</a>, 28 August
3498 1980.
3499
3500 [<a id="ref-6">6</a>] J. Reynolds, J. Postel, "Assigned Numbers", <a href="./rfc990">RFC 990</a>,
3501 November 1986.
3502
3503 [<a id="ref-7">7</a>] J. Postel, "Internet Protocol", <a href="./rfc791">RFC 791</a>, September 1981.
3504
3505 [<a id="ref-8">8</a>] J. Mogul, "Internet Subnets", <a href="./rfc950">RFC 950</a>, October 1984
3506
3507 [<a id="ref-9">9</a>] J. Mogul, "Broadcasting Internet Datagrams in the Presence
3508 of Subnets", <a href="./rfc922">RFC 922</a>, October 1984.
3509
3510 [<a id="ref-10">10</a>] J. Mogul, "Broadcasting Internet Datagrams", <a href="./rfc919">RFC 919</a>,
3511 October 1984.
3512
3513 [<a id="ref-11">11</a>] P. Mockapetris, "Domain Names - Concepts and Facilities",
3514 <a href="./rfc882">RFC 882</a>, November 1983.
3515
3516 [<a id="ref-12">12</a>] P. Mockapetris, "Domain Names - Implementation and
3517 Specification", <a href="./rfc883">RFC 883</a>, November 1983.
3518
3519 [<a id="ref-13">13</a>] P. Mockapetris, "Domain System Changes and Observations",
3520 <a href="./rfc973">RFC 973</a>, January 1986.
3521
3522 [<a id="ref-14">14</a>] C. Partridge, "Mail Routing and the Domain System", <a href="./rfc974">RFC 974</a>,
3523 January 1986.
3524
3525 [<a id="ref-15">15</a>] S. Deering, D. Cheriton, "Host Groups: A Multicast Extension
3526 to the Internet Protocol", <a href="./rfc966">RFC 966</a>, December 1985.
3527
3528 [<a id="ref-16">16</a>] S. Deering, "Host Extensions for IP Multicasting", <a href="./rfc988">RFC 988</a>,
3529 July 1986.
3530
3531
3532
3533
3534
3535
3536 <span class="grey">NetBIOS Working Group [Page 60]</span></pre>
3537 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-61" ></span>
3538 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3539
3540
3541 APPENDIX A
3542
3543
3544 This appendix contains supporting technical discussions. It is not
3545 an integral part of the NetBIOS-over-TCP specification.
3546
3547 INTEGRATION WITH INTERNET GROUP MULTICASTING
3548
3549 The Netbios-over-TCP system described in this RFC may be easily
3550 integrated with the Internet Group Multicast system now being
3551 developed for the internet.
3552
3553 In the main body of the RFC, the notion of a broadcast area was
3554 considered to be a single MAC-bridged "B-LAN". However, the
3555 protocols defined will operate over an extended broadcast area
3556 resulting from the creation of a permanent Internet Multicast Group.
3557
3558 Each separate broadcast area would be based on a separate permanent
3559 Internet Multicast Group. This multicast group address would be used
3560 by B and M nodes as their BROADCAST_ADDRESS.
3561
3562 In order to base the broadcast area on a multicast group certain
3563 additional procedures are required and certain constraints must be
3564 met.
3565
3566 A-1. ADDITIONAL PROTOCOL REQUIRED IN B AND M NODES
3567
3568 All B or M nodes operating on an IGMP based broadcast area must have
3569 IGMP support in their IP layer software. These nodes must perform an
3570 IGMP join operation to enter the IGMP group before engaging in
3571 NetBIOS activity.
3572
3573 A-2. CONSTRAINTS
3574
3575 Broadcast Areas may overlap. For this reason, end-nodes must be
3576 careful to examine the NetBIOS scope identifiers in all received
3577 broadcast packets.
3578
3579 The NetBIOS broadcast protocols were designed for a network that
3580 exhibits a low average transit time and low rate of packet loss. An
3581 IGMP based broadcast area must exhibit these characteristics. In
3582 practice this will tend to constrain IGMP broadcast areas to a campus
3583 of networks interconnected by high-speed routers and inter-router
3584 links. It is unlikely that transcontinental broadcast areas would
3585 exhibit the required characteristics.
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595 <span class="grey">NetBIOS Working Group [Page 61]</span></pre>
3596 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-62" ></span>
3597 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3598
3599
3600 APPENDIX B
3601
3602
3603 This appendix contains supporting technical discussions. It is not
3604 an integral part of the NetBIOS-over-TCP specification.
3605
3606 IMPLEMENTATION CONSIDERATIONS
3607
3608 B-1. IMPLEMENTATION MODELS
3609
3610 On any participating system, there must be some sort of NetBIOS
3611 Service to coordinate access by NetBIOS applications on that system.
3612
3613 To analyze the impact of the NetBIOS-over-TCP architecture, we use
3614 the following three models of how a NetBIOS service might be
3615 implemented:
3616
3617 1. Combined Service and Application Model
3618
3619 The NetBIOS service and application are both contained
3620 within a single process. No interprocess communication is
3621 assumed within the system; all communication is over the
3622 network. If multiple applications require concurrent access
3623 to the NetBIOS service, they must be folded into this
3624 monolithic process.
3625
3626
3627 2. Common Kernel Element Model
3628
3629 The NetBIOS Service is part of the operating system (perhaps
3630 as a device driver or a front-end processor). The NetBIOS
3631 applications are normal operating system application
3632 processes. The common element NetBIOS service contains all
3633 the information, such as the name and listen tables,
3634 required to co-ordinate the activities of the applications.
3635
3636
3637 3. Non-Kernel Common Element Model
3638
3639 The NetBIOS Service is implemented as an operating system
3640 application process. The NetBIOS applications are other
3641 operating system application processes. The service and the
3642 applications exchange data via operating system interprocess
3643 communication. In a multi-processor (e.g. network)
3644 operating system, each module may reside on a different cpu.
3645 The NetBIOS service process contains all the shared
3646 information required to coordinate the activities of the
3647 NetBIOS applications. The applications may still require a
3648 subroutine library to facilitate access to the NetBIOS
3649 service.
3650
3651
3652
3653
3654 <span class="grey">NetBIOS Working Group [Page 62]</span></pre>
3655 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-63" ></span>
3656 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3657
3658
3659 For any of the implementation models, the TCP/IP service can be
3660 located in the operating system or split among the NetBIOS
3661 applications and the NetBIOS service processes.
3662
3663 B-1.1 MODEL INDEPENDENT CONSIDERATIONS
3664
3665 The NetBIOS name service associates a NetBIOS name with a host. The
3666 NetBIOS session service further binds the name to a specific TCP port
3667 for the duration of the session.
3668
3669 The name service does not need to be informed of every Listen
3670 initiation and completion. Since the names are not bound to any TCP
3671 port in the name service, the session service may use a different tcp
3672 port for each session established with the same local name.
3673
3674 The TCP port used for the data transfer phase of a NetBIOS session
3675 can be globally well-known, locally well-known, or ephemeral. The
3676 choice is a local implementation issue. The RETARGET mechanism
3677 allows the binding of the NetBIOS session to a TCP connection to any
3678 TCP port, even to another IP node.
3679
3680 An implementation may use the session service's globally well- known
3681 TCP port for the data transfer phase of the session by not using the
3682 RETARGET mechanism and, rather, accepting the session on the initial
3683 TCP connection. This is permissible because the caller always uses
3684 an ephemeral TCP port.
3685
3686 The complexity of the called end RETARGET mechanism is only required
3687 if a particular implementation needs it. For many real system
3688 environments, such as an in-kernel NetBIOS service implementation, it
3689 will not be necessary to retarget incoming calls. Rather, all
3690 NetBIOS sessions may be multiplexed through the single, well-known,
3691 NetBIOS session service port. These implementations will not be
3692 burdened by the complexity of the RETARGET mechanism, nor will their
3693 callers be required to jump through the retargetting hoops.
3694
3695 Nevertheless, all callers must be ready to process all possible
3696 SESSION RETARGET RESPONSEs.
3697
3698 B-1.2 SERVICE OPERATION FOR EACH MODEL
3699
3700 It is possible to construct a NetBIOS service based on this
3701 specification for each of the above defined implementation models.
3702
3703 For the common kernel element model, all the NetBIOS services, name,
3704 datagram, and session, are simple. All the information is contained
3705 within a single entity and can therefore be accessed or modified
3706 easily. A single port or multiple ports for the NetBIOS sessions can
3707 be used without adding any significant complexity to the session
3708 establishment procedure. The only penalty is the amount of overhead
3709 incurred to get the NetBIOS messages and operation requests/responses
3710
3711
3712
3713 <span class="grey">NetBIOS Working Group [Page 63]</span></pre>
3714 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-64" ></span>
3715 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3716
3717
3718 through the user and operating system boundary.
3719
3720 The combined service and application model is very similar to the
3721 common kernel element model in terms of its requirements on the
3722 NetBIOS service. The major difficulty is the internal coordination
3723 of the multiple NetBIOS service and application processes existing in
3724 a system of this type.
3725
3726 The NetBIOS name, datagram and session protocols assume that the
3727 entities at the end-points have full control of the various well-
3728 known TCP and UDP ports. If an implementation has multiple NetBIOS
3729 service entities, as would be the case with, for example, multiple
3730 applications each linked into a NetBIOS library, then that
3731 implementation must impose some internal coordination.
3732 Alternatively, use of the NetBIOS ports could be periodically
3733 assigned to one application or another.
3734
3735 For the typical non-kernel common element mode implementation, three
3736 permanent system-wide NetBIOS service processes would exist:
3737
3738 - The name server
3739 - the datagram server
3740 - and session server
3741
3742 Each server would listen for requests from the network on a UDP or
3743 TCP well-known port. Each application would have a small piece of
3744 the NetBIOS service built-in, possibly a library. Each application's
3745 NetBIOS support library would need to send a message to the
3746 particular server to request an operation, such as add name or send a
3747 datagram or set-up a listen.
3748
3749 The non-kernel common element model does not require a TCP connection
3750 be passed between the two processes, session server and application.
3751 The RETARGET operation for an active NetBIOS Listen could be used by
3752 the session server to redirect the session to another TCP connection
3753 on a port allocated and owned by the application's NetBIOS support
3754 library. The application with either a built-in or a kernel-based
3755 TCP/IP service could then accept the RETARGETed connection request
3756 and process it independently of the session server.
3757
3758 On Unix(tm) or POSIX(tm), the NetBIOS session server could create
3759 sub-processes for incoming connections. The open sessions would be
3760 passed through "fork" and "exec" to the child as an open file
3761 descriptor. This approach is very limited, however. A pre- existing
3762 process could not receive an incoming call. And all call-ed
3763 processes would have to be sub-processes of the session server.
3764
3765 B-2. CASUAL AND RESTRICTED NetBIOS APPLICATIONS
3766
3767 Because NetBIOS was designed to operate in the open system
3768 environment of the typical personal computer, it does not have the
3769
3770
3771
3772 <span class="grey">NetBIOS Working Group [Page 64]</span></pre>
3773 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-65" ></span>
3774 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3775
3776
3777 concept of privileged or unprivileged applications. In many multi-
3778 user or multi-tasking operating systems applications are assigned
3779 privilege capabilities. These capabilities limit the applications
3780 ability to acquire and use system resources. For these systems it is
3781 important to allow casual applications, those with limited system
3782 privileges, and privileged applications, those with 'super-user'
3783 capabilities but access to them and their required resources is
3784 restricted, to access NetBIOS services. It is also important to
3785 allow a systems administrator to restrict certain NetBIOS resources
3786 to a particular NetBIOS application. For example, a file server
3787 based on the NetBIOS services should be able to have names and TCP
3788 ports for sessions only it can use.
3789
3790 A NetBIOS application needs at least two local resources to
3791 communicate with another NetBIOS application, a NetBIOS name for
3792 itself and, typically, a session. A NetBIOS service cannot require
3793 that NetBIOS applications directly use privileged system resources.
3794 For example, many systems require privilege to use TCP and UDP ports
3795 with numbers less than 1024. This RFC requires reserved ports for
3796 the name and session servers of a NetBIOS service implementation. It
3797 does not require the application to have direct access these reserved
3798 ports.
3799
3800 For the name service, the manager of the local name table must have
3801 access to the NetBIOS name service's reserved UDP port. It needs to
3802 listen for name service UDP packets to defend and define its local
3803 names to the network. However, this manager need not be a part of a
3804 user application in a system environment which has privilege
3805 restrictions on reserved ports.
3806
3807 The internal name server can require certain privileges to add,
3808 delete, or use a certain name, if an implementer wants the
3809 restriction. This restriction is independent of the operation of the
3810 NetBIOS service protocols and would not necessarily prevent the
3811 interoperation of that implementation with another implementation.
3812
3813 The session server is required to own a reserved TCP port for session
3814 establishment. However, the ultimate TCP connection used to transmit
3815 and receive data does not have to be through that reserved port. The
3816 RETARGET procedure the NetBIOS session to be shifted to another TCP
3817 connection, possibly through a different port at the called end.
3818 This port can be an unprivileged resource, with a value greater than
3819 1023. This facilitates casual applications.
3820
3821 Alternately, the RETARGET mechanism allows the TCP port used for data
3822 transmission and reception to be a reserved port. Consequently, an
3823 application wishing to have access to its ports maintained by the
3824 system administrator can use these restricted TCP ports. This
3825 facilitates privileged applications.
3826
3827 A particular implementation may wish to require further special
3828
3829
3830
3831 <span class="grey">NetBIOS Working Group [Page 65]</span></pre>
3832 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-66" ></span>
3833 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3834
3835
3836 privileges for session establishment, these could be associated with
3837 internal information. It does not have to be based solely on TCP
3838 port allocation. For example, a given NetBIOS name may only be used
3839 for sessions by applications with a certain system privilege level.
3840
3841 The decision to use reserved or unreserved ports or add any
3842 additional name registration and usage authorization is a purely
3843 local implementation decision. It is not required by the NetBIOS
3844 protocols specified in the RFC.
3845
3846 B-3. TCP VERSUS SESSION KEEP-ALIVES
3847
3848 The KEEP-ALIVE is a protocol element used to validate the existence
3849 of a connection. A packet is sent to the remote connection partner
3850 to solicit a response which shows the connection is still
3851 functioning. TCP KEEP-ALIVES are used at the TCP level on TCP
3852 connections while session KEEP-ALIVES are used on NetBIOS sessions.
3853 These protocol operations are always transparent to the connection
3854 user. The user will only find out about a KEEP-ALIVE operation if it
3855 fails, therefore, if the connection is lost.
3856
3857 The NetBIOS specification[2] requires the NetBIOS service to inform
3858 the session user if a session is lost when it is in a passive or
3859 active state. Therefore,if the session user is only waiting for a
3860 receive operation and the session is dropped the NetBIOS service must
3861 inform the session user. It cannot wait for a session send operation
3862 before it informs the user of the loss of the connection.
3863
3864 This requirement stems from the management of scarce or volatile
3865 resources by a NetBIOS application. If a particular user terminates
3866 a session with a server application by destroying the client
3867 application or the NetBIOS service without a NetBIOS Hang Up, the
3868 server application will want to clean-up or free allocated resources.
3869 This server application if it only receives and then sends a response
3870 requires the notification of the session abort in the passive state.
3871
3872 The standard definition of a TCP service cannot detect loss of a
3873 connection when it is in a passive state, waiting for a packet to
3874 arrive. Some TCP implementations have added a KEEP-ALIVE operation
3875 which is interoperable with implementations without this feature.
3876 These implementations send a packet with an invalid sequence number
3877 to the connection partner. The partner, by specification, must
3878 respond with a packet showing the correct sequence number of the
3879 connection. If no response is received from the remote partner
3880 within a certain time interval then the TCP service assumes the
3881 connection is lost.
3882
3883 Since many TCP implementations do not have this KEEP-ALIVE function
3884 an optional NetBIOS KEEP-ALIVE operation has been added to the
3885 NetBIOS session protocols. The NetBIOS KEEP-ALIVE uses the
3886 properties of TCP to solicit a response from the remote connection
3887
3888
3889
3890 <span class="grey">NetBIOS Working Group [Page 66]</span></pre>
3891 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-67" ></span>
3892 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3893
3894
3895 partner. A NetBIOS session message called KEEP-ALIVE is sent to the
3896 remote partner. Since this results in TCP sending an IP packet to
3897 the remote partner, the TCP connection is active. TCP will discover
3898 if the TCP connection is lost if the remote TCP partner does not
3899 acknowledge the IP packet. Therefore, the NetBIOS session service
3900 does not send a response to a session KEEP ALIVE message. It just
3901 throws it away. The NetBIOS session service that transmits the KEEP
3902 ALIVE is informed only of the failure of the TCP connection. It does
3903 not wait for a specific response message.
3904
3905 A particular NetBIOS implementation should use KEEP-ALIVES if it is
3906 concerned with maintaining compatibility with the NetBIOS interface
3907 specification[2]. Compatibility is especially important if the
3908 implementation wishes to support existing NetBIOS applications, which
3909 typically require the session loss detection on their servers, or
3910 future applications which were developed for implementations with
3911 session loss detection.
3912
3913 B-4. RETARGET ALGORITHMS
3914
3915 This section contains 2 suggestions for RETARGET algorithms. They
3916 are called the "straight" and "stack" methods. The algorithm in the
3917 body of the RFC uses the straight method. Implementation of either
3918 algorithm must take into account the Session establishment maximum
3919 retry count. The retry count is the maximum number of TCP connect
3920 operations allowed before a failure is reported.
3921
3922 The straight method forces the session establishment procedure to
3923 begin a retry after a retargetting failure with the initial node
3924 returned from the name discovery procedure. A retargetting failure
3925 is when a TCP connection attempt fails because of a time- out or a
3926 NEGATIVE SESSION RESPONSE is received with an error code specifying
3927 NOT LISTENING ON CALLED NAME. If any other failure occurs the
3928 session establishment procedure should retry from the call to the
3929 name discovery procedure.
3930
3931 A minimum of 2 retries, either from a retargetting or a name
3932 discovery failure. This will give the session service a chance to
3933 re-establish a NetBIOS Listen or, more importantly, allow the NetBIOS
3934 scope, local name service or the NBNS, to re-learn the correct IP
3935 address of a NetBIOS name.
3936
3937 The stack method operates similarly to the straight method. However,
3938 instead of retrying at the initial node returned by the name
3939 discovery procedure, it restarts with the IP address of the last node
3940 which sent a SESSION RETARGET RESPONSE prior to the retargetting
3941 failure. To limit the stack method, any one host can only be tried a
3942 maximum of 2 times.
3943
3944
3945
3946
3947
3948
3949 <span class="grey">NetBIOS Working Group [Page 67]</span></pre>
3950 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-68" ></span>
3951 <span class="grey"><a href="./rfc1001">RFC 1001</a> March 1987</span>
3952
3953
3954 B-5. NBDD SERVICE
3955
3956 If the NBDD does not forward datagrams then don't provide Group and
3957 Broadcast NetBIOS datagram services to the NetBIOS user. Therefore,
3958 ignore the implementation of the query request and, when get a
3959 negative response, acquiring the membership list of IP addresses and
3960 sending the datagram as a unicast to each member.
3961
3962 B-6. APPLICATION CONSIDERATIONS
3963
3964 B-6.1 USE OF NetBIOS DATAGRAMS
3965
3966 Certain existing NetBIOS applications use NetBIOS datagrams as a
3967 foundation for their own connection-oriented protocols. This can
3968 cause excessive NetBIOS name query activity and place a substantial
3969 burden on the network, server nodes, and other end- nodes. It is
3970 recommended that this practice be avoided in new applications.
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008 NetBIOS Working Group [Page 68]
4009 </pre>