📄 rfc1002.txt
字号:
Network Working Group
Request for Comments: 1002 March, 1987
PROTOCOL STANDARD FOR A NetBIOS SERVICE
ON A TCP/UDP TRANSPORT:
DETAILED SPECIFICATIONS
ABSTRACT
This RFC defines a proposed standard protocol to support NetBIOS
services in a TCP/IP environment. Both local network and internet
operation are supported. Various node types are defined to accommodate
local and internet topologies and to allow operation with or without the
use of IP broadcast.
This RFC gives the detailed specifications of the NetBIOS-over-TCP
packets, protocols, and defined constants and variables. A more general
overview is found in a companion RFC, "Protocol Standard For a NetBIOS
Service on a TCP/UDP Transport: Concepts and Methods".
NetBIOS Working Group [Page 1]
RFC 1002 March 1987
TABLE OF CONTENTS
1. STATUS OF THIS MEMO 4
2. ACKNOWLEDGEMENTS 4
3. INTRODUCTION 5
4. PACKET DESCRIPTIONS 5
4.1 NAME FORMAT 5
4.2 NAME SERVICE PACKETS 7
4.2.1 GENERAL FORMAT OF NAME SERVICE PACKETS 7
4.2.1.1 HEADER 8
4.2.1.2 QUESTION SECTION 10
4.2.1.3 RESOURCE RECORD 11
4.2.2 NAME REGISTRATION REQUEST 13
4.2.3 NAME OVERWRITE REQUEST & DEMAND 14
4.2.4 NAME REFRESH REQUEST 15
4.2.5 POSITIVE NAME REGISTRATION RESPONSE 16
4.2.6 NEGATIVE NAME REGISTRATION RESPONSE 16
4.2.7 END-NODE CHALLENGE REGISTRATION RESPONSE 17
4.2.8 NAME CONFLICT DEMAND 18
4.2.9 NAME RELEASE REQUEST & DEMAND 19
4.2.10 POSITIVE NAME RELEASE RESPONSE 20
4.2.11 NEGATIVE NAME RELEASE RESPONSE 20
4.2.12 NAME QUERY REQUEST 21
4.2.13 POSITIVE NAME QUERY RESPONSE 22
4.2.14 NEGATIVE NAME QUERY RESPONSE 23
4.2.15 REDIRECT NAME QUERY RESPONSE 24
4.2.16 WAIT FOR ACKNOWLEDGEMENT (WACK) RESPONSE 25
4.2.17 NODE STATUS REQUEST 26
4.2.18 NODE STATUS RESPONSE 27
4.3 SESSION SERVICE PACKETS 29
4.3.1 GENERAL FORMAT OF SESSION PACKETS 29
4.3.2 SESSION REQUEST PACKET 30
4.3.3 POSITIVE SESSION RESPONSE PACKET 31
4.3.4 NEGATIVE SESSION RESPONSE PACKET 31
4.3.5 SESSION RETARGET RESPONSE PACKET 31
4.3.6 SESSION MESSAGE PACKET 32
4.3.7 SESSION KEEP ALIVE PACKET 32
4.4 DATAGRAM SERVICE PACKETS 32
4.4.1 NetBIOS DATAGRAM HEADER 32
4.4.2 DIRECT_UNIQUE, DIRECT_GROUP, & BROADCAST DATAGRAM 33
4.4.3 DATAGRAM ERROR PACKET 34
4.4.4 DATAGRAM QUERY REQUEST 34
4.4.5 DATAGRAM POSITIVE AND NEGATIVE QUERY RESPONSE 34
5. PROTOCOL DESCRIPTIONS 35
5.1 NAME SERVICE PROTOCOLS 35
5.1.1 B-NODE ACTIVITY 35
NetBIOS Working Group [Page 2]
RFC 1002 March 1987
5.1.1.1 B-NODE ADD NAME 35
5.1.1.2 B-NODE ADD_GROUP NAME 37
5.1.1.3 B-NODE FIND_NAME 37
5.1.1.4 B NODE NAME RELEASE 38
5.1.1.5 B-NODE INCOMING PACKET PROCESSING 39
5.1.2 P-NODE ACTIVITY 42
5.1.2.1 P-NODE ADD_NAME 42
5.1.2.2 P-NODE ADD GROUP NAME 45
5.1.2.3 P-NODE FIND NAME 45
5.1.2.4 P-NODE DELETE_NAME 46
5.1.2.5 P-NODE INCOMING PACKET PROCESSING 47
5.1.2.6 P-NODE TIMER INITIATED PROCESSING 49
5.1.3 M-NODE ACTIVITY 50
5.1.3.1 M-NODE ADD NAME 50
5.1.3.2 M-NODE ADD GROUP NAME 54
5.1.3.3 M-NODE FIND NAME 55
5.1.3.4 M-NODE DELETE NAME 56
5.1.3.5 M-NODE INCOMING PACKET PROCESSING 58
5.1.3.6 M-NODE TIMER INITIATED PROCESSING 60
5.1.4 NBNS ACTIVITY 60
5.1.4.1 NBNS INCOMING PACKET PROCESSING 61
5.1.4.2 NBNS TIMER INITIATED PROCESSING 66
5.2 SESSION SERVICE PROTOCOLS 67
5.2.1 SESSION ESTABLISHMENT PROTOCOLS 67
5.2.1.1 USER REQUEST PROCESSING 67
5.2.1.2 RECEIVED PACKET PROCESSING 71
5.2.2 SESSION DATA TRANSFER PROTOCOLS 72
5.2.2.1 USER REQUEST PROCESSING 72
5.2.2.2 RECEIVED PACKET PROCESSING 72
5.2.2.3 PROCESSING INITIATED BY TIMER 73
5.2.3 SESSION TERMINATION PROTOCOLS 73
5.2.3.1 USER REQUEST PROCESSING 73
5.2.3.2 RECEPTION INDICATION PROCESSING 73
5.3 NetBIOS DATAGRAM SERVICE PROTOCOLS 74
5.3.1 B NODE TRANSMISSION OF NetBIOS DATAGRAMS 74
5.3.2 P AND M NODE TRANSMISSION OF NetBIOS DATAGRAMS 76
5.3.3 RECEPTION OF NetBIOS DATAGRAMS BY ALL NODES 78
5.3.4 PROTOCOLS FOR THE NBDD 80
6. DEFINED CONSTANTS AND VARIABLES 83
REFERENCES 85
NetBIOS Working Group [Page 3]
RFC 1002 March 1987
PROTOCOL STANDARD FOR A NetBIOS SERVICE
ON A TCP/UDP TRANSPORT:
DETAILED SPECIFICATIONS
1. STATUS OF THIS MEMO
This RFC specifies a proposed standard for the DARPA Internet
community. Since this topic is new to the Internet community,
discussions and suggestions are specifically requested.
Please send written comments to:
Karl Auerbach
Epilogue Technology Corporation
P.O. Box 5432
Redwood City, CA 94063
Please send online comments to:
Avnish Aggarwal
Internet: mtxinu!excelan!avnish@ucbvax.berkeley.edu
Usenet: ucbvax!mtxinu!excelan!avnish
Distribution of this memorandum is unlimited.
2. ACKNOWLEDGEMENTS
This RFC has been developed under the auspices of the Internet
Activities Board.
The following individuals have contributed to the development of
this RFC:
Avnish Aggarwal Arvind Agrawal Lorenzo Aguilar
Geoffrey Arnold Karl Auerbach K. Ramesh Babu
Keith Ball Amatzia Ben-Artzi Vint Cerf
Richard Cherry David Crocker Steve Deering
Greg Ennis Steve Holmgren Jay Israel
David Kaufman Lee LaBarre James Lau
Dan Lynch Gaylord Miyata David Stevens
Steve Thomas Ishan Wu
The system proposed by this RFC does not reflect any existing
Netbios-over-TCP implementation. However, the design
incorporates considerable knowledge obtained from prior
implementations. Special thanks goes to the following
organizations which have provided this invaluable information:
CMC/Syros Excelan Sytek Ungermann-Bass
NetBIOS Working Group [Page 4]
RFC 1002 March 1987
3. INTRODUCTION
This RFC contains the detailed packet formats and protocol
specifications for NetBIOS-over-TCP. This RFC is a companion to
RFC 1001, "Protocol Standard For a NetBIOS Service on a TCP/UDP
Transport: Concepts and Methods" [1].
4. PACKET DESCRIPTIONS
Bit and byte ordering are defined by the most recent version of
"Assigned Numbers" [2].
4.1. NAME FORMAT
The NetBIOS name representation in all NetBIOS packets (for NAME,
SESSION, and DATAGRAM services) is defined in the Domain Name
Service RFC 883[3] as "compressed" name messages. This format is
called "second-level encoding" in the section entitled
"Representation of NetBIOS Names" in the Concepts and Methods
document.
For ease of description, the first two paragraphs from page 31,
the section titled "Domain name representation and compression",
of RFC 883 are replicated here:
Domain names messages are expressed in terms of a sequence
of labels. Each label is represented as a one octet length
field followed by that number of octets. Since every domain
name ends with the null label of the root, a compressed
domain name is terminated by a length byte of zero. The
high order two bits of the length field must be zero, and
the remaining six bits of the length field limit the label
to 63 octets or less.
To simplify implementations, the total length of label
octets and label length octets that make up a domain name is
restricted to 255 octets or less.
The following is the uncompressed representation of the NetBIOS name
"FRED ", which is the 4 ASCII characters, F, R, E, D, followed by 12
space characters (0x20). This name has the SCOPE_ID: "NETBIOS.COM"
EGFCEFEECACACACACACACACACACACACA.NETBIOS.COM
This uncompressed representation of names is called "first-level
encoding" in the section entitled "Representation of NetBIOS Names"
in the Concepts and Methods document.
The following is a pictographic representation of the compressed
representation of the previous uncompressed Domain Name
representation.
NetBIOS Working Group [Page 5]
RFC 1002 March 1987
1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 0x20 | E (0x45) | G (0x47) | F (0x46) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| C (0x43) | E (0x45) | F (0x46) | E (0x45) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| E (0x45) | C (0x43) | A (0x41) | C (0x43) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| A (0x41) | C (0x43) | A (0x41) | C (0x43) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| A (0x41) | C (0x43) | A (0x41) | C (0x43) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| A (0x41) | C (0x43) | A (0x41) | C (0x43) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| A (0x41) | C (0x43) | A (0x41) | C (0x43) |
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -