Tech-invite3GPPspaceIETFspace
96959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 3720

Internet Small Computer Systems Interface (iSCSI)

Pages: 257
Obsoleted by:  7143
Updated by:  3980485050487146
Part 1 of 9 – Pages 1 to 17
None   None   Next

ToP   noToC   RFC3720 - Page 1
Network Working Group                                          J. Satran
Request for Comments: 3720                                       K. Meth
Category: Standards Track                                            IBM
                                                          C. Sapuntzakis
                                                           Cisco Systems
                                                          M. Chadalapaka
                                                     Hewlett-Packard Co.
                                                              E. Zeidner
                                                                     IBM
                                                              April 2004


           Internet Small Computer Systems Interface (iSCSI)

Status of this Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2003).  All Rights Reserved.

Abstract

This document describes a transport protocol for Internet Small Computer Systems Interface (iSCSI) that works on top of TCP. The iSCSI protocol aims to be fully compliant with the standardized SCSI architecture model. SCSI is a popular family of protocols that enable systems to communicate with I/O devices, especially storage devices. SCSI protocols are request/response application protocols with a common standardized architecture model and basic command set, as well as standardized command sets for different device classes (disks, tapes, media-changers etc.). As system interconnects move from the classical bus structure to a network structure, SCSI has to be mapped to network transport protocols. IP networks now meet the performance requirements of fast system interconnects and as such are good candidates to "carry" SCSI.
ToP   noToC   RFC3720 - Page 2

Table of Contents

1. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . 9 2. Definitions and Acronyms. . . . . . . . . . . . . . . . . . . 10 2.1. Definitions. . . . . . . . . . . . . . . . . . . . . . 10 2.2. Acronyms . . . . . . . . . . . . . . . . . . . . . . . 14 2.3. Conventions. . . . . . . . . . . . . . . . . . . . . . 16 2.3.1. Word Rule. . . . . . . . . . . . . . . . . . 16 2.3.2. Half-Word Rule . . . . . . . . . . . . . . . 17 2.3.3. Byte Rule. . . . . . . . . . . . . . . . . . 17 3. Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1. SCSI Concepts. . . . . . . . . . . . . . . . . . . . . 17 3.2. iSCSI Concepts and Functional Overview . . . . . . . . 18 3.2.1. Layers and Sessions. . . . . . . . . . . . . 19 3.2.2. Ordering and iSCSI Numbering . . . . . . . . 19 3.2.2.1. Command Numbering and Acknowledging . . . . . . . . . . 20 3.2.2.2. Response/Status Numbering and Acknowledging . . . . . . . . . . 23 3.2.2.3. Data Sequencing . . . . . . . . 24 3.2.3. iSCSI Login. . . . . . . . . . . . . . . . . 24 3.2.4. iSCSI Full Feature Phase . . . . . . . . . . 25 3.2.4.1. Command Connection Allegiance . . 26 3.2.4.2. Data Transfer Overview. . . . . . 27 3.2.4.3. Tags and Integrity Checks . . . . 28 3.2.4.4. Task Management . . . . . . . . . 28 3.2.5. iSCSI Connection Termination . . . . . . . . 29 3.2.6. iSCSI Names. . . . . . . . . . . . . . . . . 29 3.2.6.1. iSCSI Name Properties . . . . . . 30 3.2.6.2. iSCSI Name Encoding . . . . . . . 31 3.2.6.3. iSCSI Name Structure. . . . . . . 32 3.2.6.3.1. Type "iqn." (iSCSI Qualified Name) . . . 32 3.2.6.3.2. Type "eui." (IEEE EUI-64 format). . . . 34 3.2.7. Persistent State . . . . . . . . . . . . . . 34 3.2.8. Message Synchronization and Steering . . . . 35 3.2.8.1. Sync/Steering and iSCSI PDU Length . . . . . . . . . . . . . 36 3.3. iSCSI Session Types. . . . . . . . . . . . . . . . . . 36 3.4. SCSI to iSCSI Concepts Mapping Model . . . . . . . . . 37 3.4.1. iSCSI Architecture Model . . . . . . . . . . 37 3.4.2. SCSI Architecture Model. . . . . . . . . . . 39 3.4.3. Consequences of the Model. . . . . . . . . . 41 3.4.3.1. I_T Nexus State . . . . . . . . . 42 3.5. Request/Response Summary . . . . . . . . . . . . . . . 42 3.5.1. Request/Response Types Carrying SCSI Payload 43 3.5.1.1. SCSI-Command . . . . . . . . . . 43
ToP   noToC   RFC3720 - Page 3
                        3.5.1.2.   SCSI-Response   . . . . . . . . .  43
                        3.5.1.3.   Task Management Function Request.  44
                        3.5.1.4.   Task Management Function Response  44
                        3.5.1.5.   SCSI Data-Out and SCSI Data-In. .  44
                        3.5.1.6.   Ready To Transfer (R2T) . . . . .  45
              3.5.2.    Requests/Responses carrying SCSI and iSCSI
                        Payload. . . . . . . . . . . . . . . . . . .  46
                        3.5.2.1.   Asynchronous Message. . . . . . .  46
              3.5.3.    Requests/Responses Carrying iSCSI Only
                        Payload. . . . . . . . . . . . . . . . . . .  46
                        3.5.3.1.   Text Request and Text Response. .  46
                        3.5.3.2.   Login Request and Login Response.  47
                        3.5.3.3.   Logout Request and Response . . .  47
                        3.5.3.4.   SNACK Request . . . . . . . . . .  48
                        3.5.3.5.   Reject. . . . . . . . . . . . . .  48
                        3.5.3.6.   NOP-Out Request and NOP-In
                                   Response  . . . . . . . . . . . .  48
   4.  SCSI Mode Parameters for iSCSI. . . . . . . . . . . . . . . .  48
   5.  Login and Full Feature Phase Negotiation. . . . . . . . . . .  48
       5.1.   Text Format. . . . . . . . . . . . . . . . . . . . . .  50
       5.2.   Text Mode Negotiation. . . . . . . . . . . . . . . . .  53
              5.2.1.    List negotiations. . . . . . . . . . . . . .  56
              5.2.2.    Simple-value Negotiations. . . . . . . . . .  56
       5.3.   Login Phase. . . . . . . . . . . . . . . . . . . . . .  57
              5.3.1.    Login Phase Start. . . . . . . . . . . . . .  60
              5.3.2.    iSCSI Security Negotiation . . . . . . . . .  62
              5.3.3.    Operational Parameter Negotiation During
                        the Login Phase. . . . . . . . . . . . . . .  63
              5.3.4.    Connection Reinstatement . . . . . . . . . .  64
              5.3.5.    Session Reinstatement, Closure, and Timeout.  64
                        5.3.5.1.  Loss of Nexus Notification . . . .  65
              5.3.6.    Session Continuation and Failure . . . . . .  65
       5.4.   Operational Parameter Negotiation Outside the Login
              Phase. . . . . . . . . . . . . . . . . . . . . . . . .  66
   6.  iSCSI Error Handling and Recovery . . . . . . . . . . . . . .  67
       6.1.   Overview . . . . . . . . . . . . . . . . . . . . . . .  67
              6.1.1.    Background . . . . . . . . . . . . . . . . .  67
              6.1.2.    Goals. . . . . . . . . . . . . . . . . . . .  67
              6.1.3.    Protocol Features and State Expectations . .  68
              6.1.4.    Recovery Classes . . . . . . . . . . . . . .  69
                        6.1.4.1.   Recovery Within-command . . . . .  69
                        6.1.4.2.   Recovery Within-connection. . . .  70
                        6.1.4.3.   Connection Recovery . . . . . . .  71
                        6.1.4.4.   Session Recovery. . . . . . . . .  72
              6.1.5.  Error Recovery Hierarchy . . . . . . . . . . .  72
       6.2.   Retry and Reassign in Recovery . . . . . . . . . . . .  74
              6.2.1.    Usage of Retry . . . . . . . . . . . . . . .  74
ToP   noToC   RFC3720 - Page 4
              6.2.2.    Allegiance Reassignment. . . . . . . . . . .  75
       6.3.   Usage Of Reject PDU in Recovery. . . . . . . . . . . .  76
       6.4.   Connection Timeout Management. . . . . . . . . . . . .  76
              6.4.1.    Timeouts on Transport Exception Events . . .  77
              6.4.2.    Timeouts on Planned Decommissioning. . . . .  77
       6.5.   Implicit Termination of Tasks. . . . . . . . . . . . .  77
       6.6.   Format Errors. . . . . . . . . . . . . . . . . . . . .  78
       6.7.   Digest Errors. . . . . . . . . . . . . . . . . . . . .  78
       6.8.   Sequence Errors. . . . . . . . . . . . . . . . . . . .  80
       6.9.   SCSI Timeouts. . . . . . . . . . . . . . . . . . . . .  81
       6.10.  Negotiation Failures . . . . . . . . . . . . . . . . .  81
       6.11.  Protocol Errors. . . . . . . . . . . . . . . . . . . .  82
       6.12.  Connection Failures. . . . . . . . . . . . . . . . . .  82
       6.13.  Session Errors . . . . . . . . . . . . . . . . . . . .  83
   7.  State Transitions . . . . . . . . . . . . . . . . . . . . . .  84
       7.1.   Standard Connection State Diagrams . . . . . . . . . .  84
              7.1.1.    State Descriptions for Initiators and
                        Targets. . . . . . . . . . . . . . . . . . .  84
              7.1.2.    State Transition Descriptions for Initiators
                        and Targets. . . . . . . . . . . . . . . . .  85
              7.1.3.    Standard Connection State Diagram for an
                        Initiator. . . . . . . . . . . . . . . . . .  88
              7.1.4.    Standard Connection State Diagram for a
                        Target . . . . . . . . . . . . . . . . . . .  90
       7.2.   Connection Cleanup State Diagram for Initiators and
              Targets. . . . . . . . . . . . . . . . . . . . . . . .  92
              7.2.1.    State Descriptions for Initiators and
                        Targets. . . . . . . . . . . . . . . . . . .  94
              7.2.2.    State Transition Descriptions for Initiators
                        and Targets. . . . . . . . . . . . . . . . .  94
       7.3.   Session State Diagrams . . . . . . . . . . . . . . . .  95
              7.3.1.    Session State Diagram for an Initiator . . .  95
              7.3.2.    Session State Diagram for a Target . . . . .  96
              7.3.3.    State Descriptions for Initiators and
                        Targets. . . . . . . . . . . . . . . . . . .  97
              7.3.4.    State Transition Descriptions for Initiators
                        and Targets. . . . . . . . . . . . . . . . .  98
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .  99
       8.1.   iSCSI Security Mechanisms. . . . . . . . . . . . . . . 100
       8.2.   In-band Initiator-Target Authentication. . . . . . . . 100
              8.2.1.    CHAP Considerations. . . . . . . . . . . . . 101
              8.2.2.    SRP Considerations . . . . . . . . . . . . . 103
       8.3.   IPsec. . . . . . . . . . . . . . . . . . . . . . . . . 104
              8.3.1.    Data Integrity and Authentication. . . . . . 104
              8.3.2.    Confidentiality. . . . . . . . . . . . . . . 105
              8.3.3.    Policy, Security Associations, and
                        Cryptographic Key Management . . . . . . . . 105
   9.  Notes to Implementers . . . . . . . . . . . . . . . . . . . . 106
ToP   noToC   RFC3720 - Page 5
       9.1.   Multiple Network Adapters. . . . . . . . . . . . . . . 106
              9.1.1.    Conservative Reuse of ISIDs. . . . . . . . . 107
              9.1.2.    iSCSI Name, ISID, and TPGT Use . . . . . . . 107
       9.2.   Autosense and Auto Contingent Allegiance (ACA) . . . . 109
       9.3.   iSCSI Timeouts . . . . . . . . . . . . . . . . . . . . 109
       9.4.   Command Retry and Cleaning Old Command Instances . . . 110
       9.5.   Synch and Steering Layer and Performance . . . . . . . 110
       9.6.   Considerations for State-dependent Devices and
              Long-lasting SCSI Operations . . . . . . . . . . . . . 111
              9.6.1.    Determining the Proper ErrorRecoveryLevel. . 112
   10. iSCSI PDU Formats . . . . . . . . . . . . . . . . . . . . . . 112
       10.1.  iSCSI PDU Length and Padding . . . . . . . . . . . . . 113
       10.2.  PDU Template, Header, and Opcodes. . . . . . . . . . . 113
              10.2.1.   Basic Header Segment (BHS) . . . . . . . . . 114
                        10.2.1.1.  I . . . . . . . . . . . . . . . . 115
                        10.2.1.2.  Opcode. . . . . . . . . . . . . . 115
                        10.2.1.3.  Final (F) bit . . . . . . . . . . 116
                        10.2.1.4.  Opcode-specific Fields. . . . . . 116
                        10.2.1.5.  TotalAHSLength. . . . . . . . . . 116
                        10.2.1.6.  DataSegmentLength . . . . . . . . 116
                        10.2.1.7.  LUN . . . . . . . . . . . . . . . 116
                        10.2.1.8.  Initiator Task Tag. . . . . . . . 117
              10.2.2.  Additional Header Segment (AHS) . . . . . . . 117
                        10.2.2.1.  AHSType . . . . . . . . . . . . . 117
                        10.2.2.2.  AHSLength . . . . . . . . . . . . 117
                        10.2.2.3.  Extended CDB AHS. . . . . . . . . 118
                        10.2.2.4.  Bidirectional Expected Read-Data
                                   Length AHS. . . . . . . . . . . . 118
              10.2.3.   Header Digest and Data Digest. . . . . . . . 118
              10.2.4.   Data Segment . . . . . . . . . . . . . . . . 119
       10.3.  SCSI Command . . . . . . . . . . . . . . . . . . . . . 119
              10.3.1.   Flags and Task Attributes (byte 1) . . . . . 120
              10.3.2.   CmdSN - Command Sequence Number. . . . . . . 120
              10.3.3.   ExpStatSN. . . . . . . . . . . . . . . . . . 120
              10.3.4.   Expected Data Transfer Length. . . . . . . . 121
              10.3.5.   CDB - SCSI Command Descriptor Block. . . . . 121
              10.3.6.   Data Segment - Command Data. . . . . . . . . 121
       10.4.  SCSI Response. . . . . . . . . . . . . . . . . . . . . 122
              10.4.1.   Flags (byte 1) . . . . . . . . . . . . . . . 123
              10.4.2.   Status . . . . . . . . . . . . . . . . . . . 123
              10.4.3.   Response . . . . . . . . . . . . . . . . . . 124
              10.4.4.   SNACK Tag. . . . . . . . . . . . . . . . . . 125
              10.4.5.   Residual Count . . . . . . . . . . . . . . . 125
              10.4.6.   Bidirectional Read Residual Count. . . . . . 125
              10.4.7.   Data Segment - Sense and Response Data
                        Segment. . . . . . . . . . . . . . . . . . . 125
                        10.4.7.1.  SenseLength . . . . . . . . . . . 126
                        10.4.7.2.  Sense Data. . . . . . . . . . . . 126
ToP   noToC   RFC3720 - Page 6
              10.4.8.   ExpDataSN. . . . . . . . . . . . . . . . . . 127
              10.4.9.   StatSN - Status Sequence Number. . . . . . . 127
              10.4.10.  ExpCmdSN - Next Expected CmdSN from this
                        Initiator. . . . . . . . . . . . . . . . . . 128
              10.4.11.  MaxCmdSN - Maximum CmdSN from this Initiator 128
       10.5.  Task Management Function Request . . . . . . . . . . . 129
              10.5.1.   Function . . . . . . . . . . . . . . . . . . 129
              10.5.2.   TotalAHSLength and DataSegmentLength . . . . 132
              10.5.3.   LUN. . . . . . . . . . . . . . . . . . . . . 132
              10.5.4.   Referenced Task Tag. . . . . . . . . . . . . 132
              10.5.5.   RefCmdSN . . . . . . . . . . . . . . . . . . 132
              10.5.6.   ExpDataSN. . . . . . . . . . . . . . . . . . 133
       10.6.  Task Management Function Response. . . . . . . . . . . 134
              10.6.1.   Response . . . . . . . . . . . . . . . . . . 134
              10.6.2.   Task Management Actions on Task Sets . . . . 136
              10.6.3.   TotalAHSLength and DataSegmentLength . . . . 137
       10.7.  SCSI Data-Out & SCSI Data-In . . . . . . . . . . . . . 137
              10.7.1.   F (Final) Bit. . . . . . . . . . . . . . . . 139
              10.7.2.   A (Acknowledge) Bit. . . . . . . . . . . . . 139
              10.7.3.   Flags (byte 1) . . . . . . . . . . . . . . . 140
              10.7.4.   Target Transfer Tag and LUN. . . . . . . . . 140
              10.7.5.   DataSN . . . . . . . . . . . . . . . . . . . 141
              10.7.6.   Buffer Offset. . . . . . . . . . . . . . . . 141
              10.7.7.   DataSegmentLength. . . . . . . . . . . . . . 141
       10.8.  Ready To Transfer (R2T). . . . . . . . . . . . . . . . 142
              10.8.1.   TotalAHSLength and DataSegmentLength . . . . 143
              10.8.2.   R2TSN. . . . . . . . . . . . . . . . . . . . 143
              10.8.3.   StatSN . . . . . . . . . . . . . . . . . . . 144
              10.8.4.   Desired Data Transfer Length and Buffer
                        Offset . . . . . . . . . . . . . . . . . . . 144
              10.8.5.   Target Transfer Tag. . . . . . . . . . . . . 144
       10.9.  Asynchronous Message . . . . . . . . . . . . . . . . . 145
              10.9.1.   AsyncEvent . . . . . . . . . . . . . . . . . 146
              10.9.2.   AsyncVCode . . . . . . . . . . . . . . . . . 147
              10.9.3.   LUN. . . . . . . . . . . . . . . . . . . . . 147
              10.9.4.   Sense Data and iSCSI Event Data. . . . . . . 148
                        10.9.4.1.  SenseLength . . . . . . . . . . . 148
       10.10. Text Request . . . . . . . . . . . . . . . . . . . . . 149
              10.10.1.  F (Final) Bit. . . . . . . . . . . . . . . . 150
              10.10.2.  C (Continue) Bit . . . . . . . . . . . . . . 150
              10.10.3.  Initiator Task Tag . . . . . . . . . . . . . 150
              10.10.4.  Target Transfer Tag. . . . . . . . . . . . . 150
              10.10.5.  Text . . . . . . . . . . . . . . . . . . . . 151
       10.11. Text Response. . . . . . . . . . . . . . . . . . . . . 152
              10.11.1.  F (Final) Bit. . . . . . . . . . . . . . . . 152
              10.11.2.  C (Continue) Bit . . . . . . . . . . . . . . 153
              10.11.3.  Initiator Task Tag . . . . . . . . . . . . . 153
              10.11.4.  Target Transfer Tag. . . . . . . . . . . . . 153
ToP   noToC   RFC3720 - Page 7
              10.11.5.  StatSN . . . . . . . . . . . . . . . . . . . 154
              10.11.6.  Text Response Data . . . . . . . . . . . . . 154
       10.12. Login Request. . . . . . . . . . . . . . . . . . . . . 154
              10.12.1.  T (Transit) Bit. . . . . . . . . . . . . . . 155
              10.12.2.  C (Continue) Bit . . . . . . . . . . . . . . 155
              10.12.3.  CSG and NSG. . . . . . . . . . . . . . . . . 156
              10.12.4.  Version. . . . . . . . . . . . . . . . . . . 156
                        10.12.4.1.  Version-max. . . . . . . . . . . 156
                        10.12.4.2.  Version-min. . . . . . . . . . . 156
              10.12.5.  ISID . . . . . . . . . . . . . . . . . . . . 157
              10.12.6.  TSIH . . . . . . . . . . . . . . . . . . . . 158
              10.12.7.  Connection ID - CID. . . . . . . . . . . . . 158
              10.12.8.  CmdSN. . . . . . . . . . . . . . . . . . . . 159
              10.12.9.  ExpStatSN. . . . . . . . . . . . . . . . . . 159
              10.12.10. Login Parameters . . . . . . . . . . . . . . 159
       10.13. Login Response . . . . . . . . . . . . . . . . . . . . 160
              10.13.1.  Version-max. . . . . . . . . . . . . . . . . 160
              10.13.2.  Version-active . . . . . . . . . . . . . . . 161
              10.13.3.  TSIH . . . . . . . . . . . . . . . . . . . . 161
              10.13.4.  StatSN . . . . . . . . . . . . . . . . . . . 161
              10.13.5.  Status-Class and Status-Detail . . . . . . . 161
              10.13.6.  T (Transit) Bit. . . . . . . . . . . . . . . 164
              10.13.7.  C (Continue) Bit . . . . . . . . . . . . . . 164
              10.13.8.  Login Parameters . . . . . . . . . . . . . . 164
       10.14. Logout Request . . . . . . . . . . . . . . . . . . . . 165
              10.14.1.  Reason Code. . . . . . . . . . . . . . . . . 167
              10.14.2.  TotalAHSLength and DataSegmentLength . . . . 168
              10.14.3.  CID. . . . . . . . . . . . . . . . . . . . . 168
              10.14.4.  ExpStatSN. . . . . . . . . . . . . . . . . . 168
              10.14.5.  Implicit termination of tasks. . . . . . . . 168
       10.15. Logout Response. . . . . . . . . . . . . . . . . . . . 169
              10.15.1.  Response . . . . . . . . . . . . . . . . . . 170
              10.15.2.  TotalAHSLength and DataSegmentLength . . . . 170
              10.15.3.  Time2Wait. . . . . . . . . . . . . . . . . . 170
              10.15.4.  Time2Retain. . . . . . . . . . . . . . . . . 170
       10.16. SNACK Request. . . . . . . . . . . . . . . . . . . . . 171
              10.16.1.  Type . . . . . . . . . . . . . . . . . . . . 172
              10.16.2.  Data Acknowledgement . . . . . . . . . . . . 173
              10.16.3.  Resegmentation . . . . . . . . . . . . . . . 173
              10.16.4.  Initiator Task Tag . . . . . . . . . . . . . 174
              10.16.5.  Target Transfer Tag or SNACK Tag . . . . . . 174
              10.16.6.  BegRun . . . . . . . . . . . . . . . . . . . 174
              10.16.7.  RunLength. . . . . . . . . . . . . . . . . . 174
       10.17. Reject . . . . . . . . . . . . . . . . . . . . . . . . 175
              10.17.1.  Reason . . . . . . . . . . . . . . . . . . . 176
              10.17.2.  DataSN/R2TSN . . . . . . . . . . . . . . . . 177
              10.17.3.  StatSN, ExpCmdSN and MaxCmdSN. . . . . . . . 177
              10.17.4.  Complete Header of Bad PDU . . . . . . . . . 177
ToP   noToC   RFC3720 - Page 8
       10.18. NOP-Out. . . . . . . . . . . . . . . . . . . . . . . . 178
              10.18.1.  Initiator Task Tag . . . . . . . . . . . . . 179
              10.18.2.  Target Transfer Tag. . . . . . . . . . . . . 179
              10.18.3.  Ping Data. . . . . . . . . . . . . . . . . . 179
       10.19. NOP-In . . . . . . . . . . . . . . . . . . . . . . . . 180
              10.19.1.  Target Transfer Tag. . . . . . . . . . . . . 181
              10.19.2.  StatSN . . . . . . . . . . . . . . . . . . . 181
              10.19.3.  LUN. . . . . . . . . . . . . . . . . . . . . 181
   11. iSCSI Security Text Keys and Authentication Methods . . . . . 181
       11.1.  AuthMethod . . . . . . . . . . . . . . . . . . . . . . 182
              11.1.1.   Kerberos . . . . . . . . . . . . . . . . . . 184
              11.1.2.   Simple Public-Key Mechanism (SPKM) . . . . . 184
              11.1.3.   Secure Remote Password (SRP) . . . . . . . . 185
              11.1.4.   Challenge Handshake Authentication Protocol
                        (CHAP) . . . . . . . . . . . . . . . . . . . 186
   12. Login/Text Operational Text Keys. . . . . . . . . . . . . . . 187
       12.1.  HeaderDigest and DataDigest. . . . . . . . . . . . . . 188
       12.2.  MaxConnections . . . . . . . . . . . . . . . . . . . . 190
       12.3.  SendTargets. . . . . . . . . . . . . . . . . . . . . . 191
       12.4.  TargetName . . . . . . . . . . . . . . . . . . . . . . 191
       12.5.  InitiatorName. . . . . . . . . . . . . . . . . . . . . 192
       12.6.  TargetAlias. . . . . . . . . . . . . . . . . . . . . . 192
       12.7.  InitiatorAlias . . . . . . . . . . . . . . . . . . . . 193
       12.8.  TargetAddress. . . . . . . . . . . . . . . . . . . . . 193
       12.9.  TargetPortalGroupTag . . . . . . . . . . . . . . . . . 194
       12.10. InitialR2T . . . . . . . . . . . . . . . . . . . . . . 194
       12.11. ImmediateData. . . . . . . . . . . . . . . . . . . . . 195
       12.12. MaxRecvDataSegmentLength . . . . . . . . . . . . . . . 196
       12.13. MaxBurstLength . . . . . . . . . . . . . . . . . . . . 196
       12.14. FirstBurstLength . . . . . . . . . . . . . . . . . . . 197
       12.15. DefaultTime2Wait . . . . . . . . . . . . . . . . . . . 197
       12.16. DefaultTime2Retain . . . . . . . . . . . . . . . . . . 198
       12.17. MaxOutstandingR2T. . . . . . . . . . . . . . . . . . . 198
       12.18. DataPDUInOrder . . . . . . . . . . . . . . . . . . . . 198
       12.19. DataSequenceInOrder. . . . . . . . . . . . . . . . . . 199
       12.20. ErrorRecoveryLevel . . . . . . . . . . . . . . . . . . 199
       12.21. SessionType. . . . . . . . . . . . . . . . . . . . . . 200
       12.22. The Private or Public Extension Key Format . . . . . . 200
   13. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 201
       13.1.  Naming Requirements. . . . . . . . . . . . . . . . . . 203
       13.2.  Mechanism Specification Requirements . . . . . . . . . 203
       13.3.  Publication Requirements . . . . . . . . . . . . . . . 203
       13.4.  Security Requirements. . . . . . . . . . . . . . . . . 203
       13.5.  Registration Procedure . . . . . . . . . . . . . . . . 204
              13.5.1.   Present the iSCSI extension item to the
                        Community. . . . . . . . . . . . . . . . . . 204
              13.5.2.   iSCSI extension item review and IESG
                        approval . . . . . . . . . . . . . . . . . . 204
ToP   noToC   RFC3720 - Page 9
              13.5.3.   IANA Registration. . . . . . . . . . . . . . 204
              13.5.4.   Standard iSCSI extension item-label format . 204
       13.6.  IANA Procedures for Registering iSCSI extension items. 205
   References. . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
   Appendix A. Sync and Steering with Fixed Interval Markers . . . . 209
       A.1.   Markers At Fixed Intervals . . . . . . . . . . . . . . 209
       A.2.   Initial Marker-less Interval . . . . . . . . . . . . . 210
       A.3.   Negotiation. . . . . . . . . . . . . . . . . . . . . . 210
              A.3.1.    OFMarker, IFMarker . . . . . . . . . . . . . 210
              A.3.2.    OFMarkInt, IFMarkInt . . . . . . . . . . . . 211
   Appendix B.  Examples . . . . . . . . . . . . . . . . . . . . . . 212
       B.1.   Read Operation Example . . . . . . . . . . . . . . . . 212
       B.2.   Write Operation Example. . . . . . . . . . . . . . . . 213
       B.3.   R2TSN/DataSN Use Examples. . . . . . . . . . . . . . . 214
       B.4.   CRC Examples . . . . . . . . . . . . . . . . . . . . . 217
   Appendix C.  Login Phase Examples . . . . . . . . . . . . . . . . 219
   Appendix D.  SendTargets Operation. . . . . . . . . . . . . . . . 229
   Appendix E.  Algorithmic Presentation of Error Recovery Classes . 233
       E.1.   General Data Structure and Procedure Description . . . 233
       E.2.   Within-command Error Recovery Algorithms . . . . . . . 234
              E.2.1.    Procedure Descriptions . . . . . . . . . . . 234
              E.2.2.    Initiator Algorithms . . . . . . . . . . . . 235
              E.2.3.    Target Algorithms. . . . . . . . . . . . . . 237
       E.3.   Within-connection Recovery Algorithms. . . . . . . . . 240
              E.3.1.    Procedure Descriptions . . . . . . . . . . . 240
              E.3.2.    Initiator Algorithms . . . . . . . . . . . . 241
              E.3.3.    Target Algorithms. . . . . . . . . . . . . . 243
       E.4.   Connection Recovery Algorithms . . . . . . . . . . . . 243
              E.4.1.    Procedure Descriptions . . . . . . . . . . . 243
              E.4.2.    Initiator Algorithms . . . . . . . . . . . . 244
              E.4.3.    Target Algorithms. . . . . . . . . . . . . . 246
   Appendix F.  Clearing Effects of Various Events on Targets. . . . 249
       F.1.   Clearing Effects on iSCSI Objects. . . . . . . . . . . 249
       F.2.   Clearing Effects on SCSI Objects . . . . . . . . . . . 253
   Acknowledgements. . . . . . . . . . . . . . . . . . . . . . . . . 254
   Authors' Addresses. . . . . . . . . . . . . . . . . . . . . . . . 256
   Full Copyright Statement. . . . . . . . . . . . . . . . . . . . . 257

1. Introduction

The Small Computer Systems Interface (SCSI) is a popular family of protocols for communicating with I/O devices, especially storage devices. SCSI is a client-server architecture. Clients of a SCSI interface are called "initiators". Initiators issue SCSI "commands" to request services from components, logical units of a server known as a "target". A "SCSI transport" maps the client-server SCSI protocol to a specific interconnect. An Initiator is one endpoint of a SCSI transport and a target is the other endpoint.
ToP   noToC   RFC3720 - Page 10
   The SCSI protocol has been mapped over various transports, including
   Parallel SCSI, IPI, IEEE-1394 (firewire) and Fibre Channel.  These
   transports are I/O specific and have limited distance capabilities.

   The iSCSI protocol defined in this document describes a means of
   transporting SCSI packets over TCP/IP (see [RFC791], [RFC793],
   [RFC1035], [RFC1122]), providing for an interoperable solution which
   can take advantage of existing Internet infrastructure, Internet
   management facilities, and address distance limitations.

2. Definitions and Acronyms

2.1. Definitions

- Alias: An alias string can also be associated with an iSCSI Node. The alias allows an organization to associate a user-friendly string with the iSCSI Name. However, the alias string is not a substitute for the iSCSI Name. - CID (Connection ID): Connections within a session are identified by a connection ID. It is a unique ID for this connection within the session for the initiator. It is generated by the initiator and presented to the target during login requests and during logouts that close connections. - Connection: A connection is a TCP connection. Communication between the initiator and target occurs over one or more TCP connections. The TCP connections carry control messages, SCSI commands, parameters, and data within iSCSI Protocol Data Units (iSCSI PDUs). - iSCSI Device: A SCSI Device using an iSCSI service delivery subsystem. Service Delivery Subsystem is defined by [SAM2] as a transport mechanism for SCSI commands and responses. - iSCSI Initiator Name: The iSCSI Initiator Name specifies the worldwide unique name of the initiator. - iSCSI Initiator Node: The "initiator". The word "initiator" has been appropriately qualified as either a port or a device in the rest of the document when the context is ambiguous. All unqualified usages of "initiator" refer to an initiator port (or device) depending on the context. - iSCSI Layer: This layer builds/receives iSCSI PDUs and relays/receives them to/from one or more TCP connections that form an initiator-target "session".
ToP   noToC   RFC3720 - Page 11
   - iSCSI Name: The name of an iSCSI initiator or iSCSI target.

   - iSCSI Node: The iSCSI Node represents a single iSCSI initiator or
     iSCSI target.  There are one or more iSCSI Nodes within a Network
     Entity.  The iSCSI Node is accessible via one or more Network
     Portals.  An iSCSI Node is identified by its iSCSI Name.  The
     separation of the iSCSI Name from the addresses used by and for the
     iSCSI Node allows multiple iSCSI Nodes to use the same address, and
     the same iSCSI Node to use multiple addresses.

   - iSCSI Target Name: The iSCSI Target Name specifies the worldwide
     unique name of the target.

   - iSCSI Target Node: The "target".

   - iSCSI Task: An iSCSI task is an iSCSI request for which a response
     is expected.

   - iSCSI Transfer Direction: The iSCSI transfer direction is defined
     with regard to the initiator.  Outbound or outgoing transfers are
     transfers from the initiator to the target, while inbound or
     incoming transfers are from the target to the initiator.

   - ISID: The initiator part of the Session Identifier.  It is
     explicitly specified by the initiator during Login.

   - I_T nexus: According to [SAM2], the I_T nexus is a relationship
     between a SCSI Initiator Port and a SCSI Target Port.  For iSCSI,
     this relationship is a session, defined as a relationship between
     an iSCSI Initiator's end of the session (SCSI Initiator Port) and
     the iSCSI Target's Portal Group.  The I_T nexus can be identified
     by the conjunction of the SCSI port names; that is, the I_T nexus
     identifier is the tuple (iSCSI Initiator Name + ',i,'+ ISID, iSCSI
     Target Name + ',t,'+ Portal Group Tag).

   - Network Entity: The Network Entity represents a device or gateway
     that is accessible from the IP network.  A Network Entity must have
     one or more Network Portals, each of which can be used to gain
     access to the IP network by some iSCSI Nodes contained in that
     Network Entity.

   - Network Portal: The Network Portal is a component of a Network
     Entity that has a TCP/IP network address and that may be used by an
     iSCSI Node within that Network Entity for the connection(s) within
     one of its iSCSI sessions.  A Network Portal in an initiator is
     identified by its IP address.  A Network Portal in a target is
     identified by its IP address and its listening TCP port.
ToP   noToC   RFC3720 - Page 12
   - Originator: In a negotiation or exchange, the party that initiates
     the negotiation or exchange.

   - PDU (Protocol Data Unit): The initiator and target divide their
     communications into messages.  The term "iSCSI protocol data unit"
     (iSCSI PDU) is used for these messages.

   - Portal Groups: iSCSI supports multiple connections within the same
     session; some implementations will have the ability to combine
     connections in a session across multiple Network Portals.  A Portal
     Group defines a set of Network Portals within an iSCSI Network
     Entity that collectively supports the capability of coordinating a
     session with connections spanning these portals.  Not all Network
     Portals within a Portal Group need participate in every session
     connected through that Portal Group.  One or more Portal Groups may
     provide access to an iSCSI Node.  Each Network Portal, as utilized
     by a given iSCSI Node, belongs to exactly one portal group within
     that node.

   - Portal Group Tag: This 16-bit quantity identifies a Portal Group
     within an iSCSI Node.  All Network Portals with the same portal
     group tag in the context of a given iSCSI Node are in the same
     Portal Group.

   - Recovery R2T: An R2T generated by a target upon detecting the loss
     of one or more Data-Out PDUs through one of the following means: a
     digest error, a sequence error, or a sequence reception timeout.  A
     recovery R2T carries the next unused R2TSN, but requests all or
     part of the data burst that an earlier R2T (with a lower R2TSN) had
     already requested.

   - Responder: In a negotiation or exchange, the party that responds to
     the originator of the negotiation or exchange.

   - SCSI Device: This is the SAM2 term for an entity that contains one
     or more SCSI ports that are connected to a service delivery
     subsystem and supports a SCSI application protocol.  For example, a
     SCSI Initiator Device contains one or more SCSI Initiator Ports and
     zero or more application clients.  A Target Device contains one or
     more SCSI Target Ports and one or more device servers and
     associated logical units.  For iSCSI, the SCSI Device is the
     component within an iSCSI Node that provides the SCSI
     functionality.  As such, there can be at most, one SCSI Device
     within a given iSCSI Node.  Access to the SCSI Device can only be
     achieved in an iSCSI normal operational session.  The SCSI Device
     Name is defined to be the iSCSI Name of the node.
ToP   noToC   RFC3720 - Page 13
   - SCSI Layer: This builds/receives SCSI CDBs (Command Descriptor
     Blocks) and relays/receives them with the remaining command execute
     [SAM2] parameters to/from the iSCSI Layer.

   - Session: The group of TCP connections that link an initiator with a
     target form a session (loosely equivalent to a SCSI I-T nexus).
     TCP connections can be added and removed from a session.  Across
     all connections within a session, an initiator sees one and the
     same target.

   - SCSI Initiator Port: This maps to the endpoint of an iSCSI normal
     operational session.  An iSCSI normal operational session is
     negotiated through the login process between an iSCSI initiator
     node and an iSCSI target node.  At successful completion of this
     process, a SCSI Initiator Port is created within the SCSI Initiator
     Device.  The SCSI Initiator Port Name and SCSI Initiator Port
     Identifier are both defined to be the iSCSI Initiator Name together
     with (a) a label that identifies it as an initiator port
     name/identifier and (b) the ISID portion of the session identifier.

   - SCSI Port: This is the SAM2 term for an entity in a SCSI Device
     that provides the SCSI functionality to interface with a service
     delivery subsystem.  For iSCSI, the definition of the SCSI
     Initiator Port and the SCSI Target Port are different.

   - SCSI Port Name: A name made up as UTF-8 [RFC2279] characters and
     includes the iSCSI Name + 'i' or 't' + ISID or Portal Group Tag.


   - SCSI Target Port: This maps to an iSCSI Target Portal Group.

   - SCSI Target Port Name and SCSI Target Port Identifier: These are
     both defined to be the iSCSI Target Name together with (a) a label
     that identifies it as a target port name/identifier and (b) the
     portal group tag.

   - SSID (Session ID): A session between an iSCSI initiator and an
     iSCSI target is defined by a session ID that is a tuple composed of
     an initiator part (ISID) and a target part (Target Portal Group
     Tag).  The ISID is explicitly specified by the initiator at session
     establishment.  The Target Portal Group Tag is implied by the
     initiator through the selection of the TCP endpoint at connection
     establishment.  The TargetPortalGroupTag key must also be returned
     by the target as a confirmation during connection establishment
     when TargetName is given.

   - Target Portal Group Tag: A numerical identifier (16-bit) for an
     iSCSI Target Portal Group.
ToP   noToC   RFC3720 - Page 14
   - TSIH (Target Session Identifying Handle): A target assigned tag for
     a session with a specific named initiator.  The target generates it
     during session establishment.  Its internal format and content are
     not defined by this protocol, except for the value 0 that is
     reserved and used by the initiator to indicate a new session.  It
     is given to the target during additional connection establishment
     for the same session.

2.2. Acronyms

Acronym Definition ------------------------------------------------------------ 3DES Triple Data Encryption Standard ACA Auto Contingent Allegiance AEN Asynchronous Event Notification AES Advanced Encryption Standard AH Additional Header (not the IPsec AH!) AHS Additional Header Segment API Application Programming Interface ASC Additional Sense Code ASCII American Standard Code for Information Interchange ASCQ Additional Sense Code Qualifier BHS Basic Header Segment CBC Cipher Block Chaining CD Compact Disk CDB Command Descriptor Block CHAP Challenge Handshake Authentication Protocol CID Connection ID CO Connection Only CRC Cyclic Redundancy Check CRL Certificate Revocation List CSG Current Stage CSM Connection State Machine DES Data Encryption Standard DNS Domain Name Server DOI Domain of Interpretation DVD Digital Versatile Disk ESP Encapsulating Security Payload EUI Extended Unique Identifier FFP Full Feature Phase FFPO Full Feature Phase Only FIM Fixed Interval Marker Gbps Gigabits per Second HBA Host Bus Adapter HMAC Hashed Message Authentication Code I_T Initiator_Target I_T_L Initiator_Target_LUN IANA Internet Assigned Numbers Authority
ToP   noToC   RFC3720 - Page 15
   ID          Identifier
   IDN         Internationalized Domain Name
   IEEE        Institute of Electrical & Electronics Engineers
   IETF        Internet Engineering Task Force
   IKE         Internet Key Exchange
   I/O         Input - Output
   IO          Initialize Only
   IP          Internet Protocol
   IPsec       Internet Protocol Security
   IPv4        Internet Protocol Version 4
   IPv6        Internet Protocol Version 6
   IQN         iSCSI Qualified Name
   ISID        Initiator Session ID
   ITN         iSCSI Target Name
   ITT         Initiator Task Tag
   KRB5        Kerberos V5
   LFL         Lower Functional Layer
   LTDS        Logical-Text-Data-Segment
   LO          Leading Only
   LU          Logical Unit
   LUN         Logical Unit Number
   MAC         Message Authentication Codes
   NA          Not Applicable
   NIC         Network Interface Card
   NOP         No Operation
   NSG         Next Stage
   OS          Operating System
   PDU         Protocol Data Unit
   PKI         Public Key Infrastructure
   R2T         Ready To Transfer
   R2TSN       Ready To Transfer Sequence Number
   RDMA        Remote Direct Memory Access
   RFC         Request For Comments
   SAM         SCSI Architecture Model
   SAM2        SCSI Architecture Model - 2
   SAN         Storage Area Network
   SCSI        Small Computer Systems Interface
   SN          Sequence Number
   SNACK       Selective Negative Acknowledgment - also
               Sequence Number Acknowledgement for data
   SPKM        Simple Public-Key Mechanism
   SRP         Secure Remote Password
   SSID        Session ID
   SW          Session Wide
   TCB         Task Control Block
   TCP         Transmission Control Protocol
   TPGT        Target Portal Group Tag
   TSIH        Target Session Identifying Handle
ToP   noToC   RFC3720 - Page 16
   TTT         Target Transfer Tag
   UFL         Upper Functional Layer
   ULP         Upper Level Protocol
   URN         Uniform Resource Names [RFC2396]
   UTF         Universal Transformation Format
   WG          Working Group

2.3. Conventions

In examples, "I->" and "T->" show iSCSI PDUs sent by the initiator and target respectively. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119]. iSCSI messages - PDUs - are represented by diagrams as in the following example: Byte/ 0 | 1 | 2 | 3 | / | | | | |0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7|0 1 2 3 4 5 6 7| +---------------+---------------+---------------+---------------+ 0| Basic Header Segment (BHS) | +---------------+---------------+---------------+---------------+ ---------- +| | +---------------+---------------+---------------+---------------+ The diagrams include byte and bit numbering. The following representation and ordering rules are observed in this document: - Word Rule - Half-word Rule - Byte Rule

2.3.1. Word Rule

A word holds four consecutive bytes. Whenever a word has numeric content, it is considered an unsigned number in base 2 positional representation with the lowest numbered byte (e.g., byte 0) bit 0 representing 2**31 and bit 1 representing 2**30 through lowest numbered byte + 3 (e.g., byte 3) bit 7 representing 2**0. Decimal and hexadecimal representation of word values map this representation to decimal or hexadecimal positional notation.
ToP   noToC   RFC3720 - Page 17

2.3.2. Half-Word Rule

A half-word holds two consecutive bytes. Whenever a half-word has numeric content it is considered an unsigned number in base 2 positional representation with the lowest numbered byte (e.g., byte 0), bit 0 representing 2**15 and bit 1 representing 2**14 through lowest numbered byte + 1 (e.g., byte 1), bit 7 representing 2**0. Decimal and hexadecimal representation of half-word values map this representation to decimal or hexadecimal positional notation.

2.3.3. Byte Rule

For every PDU, bytes are sent and received in increasing numbered order (network order). Whenever a byte has numerical content, it is considered an unsigned number in base 2 positional representation with bit 0 representing 2**7 and bit 1 representing 2**6 through bit 7 representing 2**0.


(page 17 continued on part 2)

Next Section