Intro to Iscsi

download Intro to Iscsi

of 80

Transcript of Intro to Iscsi

  • 8/10/2019 Intro to Iscsi

    1/80

    IMPACT modules consist of focused, in-depth training content that can be consumed in about 1-2 hours

    Welcome to Introduction to iSCSI - IMPACT

    2004 EMC Corporation. All rights reserved. These materials may not be copied without EMC's written consent.

    EMC Global Education IMPACT

    For questions or support please contact Global Education

    ! Complete Course Directions on how to

    update your online transcript to reflect a

    complete status for this course.

    ! Course Description

    ! Student Resource Guide Training slides with notes

    ! Assessment Must be completed online

    (Note: Completed Assessments will be reflected online within 24-48 hrs.)

    Home

    mailto:[email protected]://secure.testcraft.com/emc/assess.asp?aid=MR-5WP-ISCSI&apass=PASSWORDhttps://secure.testcraft.com/emc/assess.asp?aid=MR-5WP-ISCSI&apass=PASSWORDmailto:[email protected]
  • 8/10/2019 Intro to Iscsi

    2/80

    EMC Global Education

    Introduction to iSCSIIMPACT

    Course Description

    e-Learning

    This course presents the student with the necessaryinformation to understand the basics of the iSCSIprotocol, iSCSI PDU format, address and naming, andiSCSI logins in an IP storage network.

    Course

    Number:MR-5WP-ISCSI

    Method: Impact Duration: 2hours

    Audience

    This course is intended for any person responsible for prospecting, architecting, deploying, operating, ormaintaining a SAN or NAS environment in which iSCSI technology is used.

    Prerequisites

    The prerequisites listed are helpful to understanding the course content and should be completed priorto registering for this course. The prerequisites for this course include:

    None

    Assumed knowledge for successful completion includes:

    Basic understanding of networking

    TCP/IP knowledge

    Course Objectives

    Upon successful completion of this course, participants should be able to:

    Explain the basic concepts of the iSCSI protocol

    List the iSCSI login processes

    Explain how data is carried between the initiator and the target

    Modules Covered

    These modules are designed to support the course objectives. The following modules are includedin this course:

    SCSI Concepts

    iSCSI Concepts

    iSCSI Layers

    iSCSI Addresses and Names

    iSCSI Login

    iSCSI Discovery

    iSCSI Communication

    Labs

  • 8/10/2019 Intro to Iscsi

    3/80

    iSCSI Overview, 1

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    iSCSI Overview IMPACT

    Copyright 2004 EMC Corporation. All rights reserved.

    These materials may not be copied without EMC's written consent.

    EMC believes the information in this publication is accurate as of its publication date. The information is

    subject to change without notice.

    THE INFORMATION IN THIS PUBLICATION IS PROVIDED AS IS. EMC CORPORATION MAKES NO

    REPRESENTATIONS OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS

    PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR

    FITNESS FOR A PARTICULAR PURPOSE.

    Use, copying, and distribution of any EMC software described in this publication requires an applicable

    software license.

    EMC is a registered trademark

  • 8/10/2019 Intro to Iscsi

    4/80

    iSCSI Overview, 2

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    2

    iSCSI Overview

    After completing this course, you will be able to:

    ! Explain the basic concepts of the iSCSI protocol

    ! List the iSCSI login processes

    ! Explain how data is carried between the initiator and

    the target

  • 8/10/2019 Intro to Iscsi

    5/80

    iSCSI Overview, 3

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    SCSI Concepts

    Lesson

    As a result of completing this lesson, students should be able to do the following:

    List the basic components of the SCSI environment

    Explain the differences between a Logical Unit and a Logical Unit Number Define a SCSI task

  • 8/10/2019 Intro to Iscsi

    6/80

    iSCSI Overview, 4

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    4

    Target and Initiator

    The basic components of the SCSI environment are target, initiator, logical units, and logical unit number.

    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". The "device

    server" on the logical unit accepts SCSI commands and processes them.

  • 8/10/2019 Intro to Iscsi

    7/80

    iSCSI Overview, 5

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    5

    Nodes

    ! A single Initiator or Target

    ! Names are assigned to allNodes

    ! Independent of IP addressand independent of MACaddress

    Within iSCSI a Node is defined as a single Initiator or Target. These definitions map to the traditional SCSI

    Target/ Initiator model. iSCSI Names are assigned to all Nodes and are independent of the associated

    address.

  • 8/10/2019 Intro to Iscsi

    8/80

    iSCSI Overview, 6

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    6

    Logical Unit Number

    Target

    LUNs

    1 2 3 4

    At the highest level, SCSI is a family of interfaces for requesting services from I/O devices, including hard

    drives, tape drives, CD and DVD drives, printers, and scanners. In SCSI terminology, an individual I/O device

    is called a "logical unit" (LU).

    A "SCSI transport" maps the client-server SCSI protocol to a specific interconnect. Initiators are one endpoint

    of a SCSI transport. The "target" is the other endpoint. A target can contain multiple Logical Units (LUs). Each

    Logical Unit has an address within a target called a Logical Unit Number (LUN).

    A Logical Unit Number (LUN) is the logical unit address. A single address will be used to identify individual

    logical units.

  • 8/10/2019 Intro to Iscsi

    9/80

    iSCSI Overview, 7

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    7

    SCSI Tasks

    Target

    LUNs

    1 2 3 4

    A SCSI task is a SCSI command or possibly a linked set of SCSI commands. Some LUs support multiple

    pending (queued) tasks, but the queue of tasks is managed by the logical unit. The target uses an initiator

    provided "task tag" to distinguish between tasks. Only one command in a task can be outstanding at any

    given time.

    Each SCSI command results in an optional data phase and a required response phase. In the data phase,

    information can travel from the initiator to target (e.g., WRITE), target to initiator (e.g., READ), or in both

    directions. In the response phase, the target returns the final status of the operation, including any errors.

  • 8/10/2019 Intro to Iscsi

    10/80

    iSCSI Overview, 8

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    iSCSI Concepts

    Lesson

    As a result of completing this lesson, students should be able to do the following:

    Define iSCSI

    Identify the advantages and disadvantages of iSCSI Explain the three protocols used in a IP Storage Network

    Identify the IP Storage Deployment Models

  • 8/10/2019 Intro to Iscsi

    11/80

    iSCSI Overview, 9

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    9

    What is iSCSI?

    ! A method to transfer blocks of data using the TCP/IPnetwork

    ! Serialized service delivery subsystem

    ! SCSI protocol over IP (Internet Protocol)

    TCP is a reliable transport that retransmits dropped packets IP is an unreliable transport mechanism (packet dropping

    allowed)

    Ethernet (10/100/1G/10G) is a popular Physical Transportlayer

    The Internet Small Computer Systems Interface (iSCSI) protocol provides a means of transporting SCSI

    packets over TCP/IP. iSCSI works by wrapping SCSI commands into TCP and transporting them over an IP

    network. Since iSCSI is IP based traffic, it can be routed or switched on standard Ethernet equipment.

  • 8/10/2019 Intro to Iscsi

    12/80

    iSCSI Overview, 10

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    10

    iSCSIs still SCSI

    ! iSCSI architecture follows the typical SCSI model

    LUTargetInitiatorOS

    TCP / IP

    Network

    With the invention of fiber channel the SCSI cables between the initiator and target have been replaced with

    fiber cables. Now with the invention of iSCSI the fiber cables are being replaced with less expensive network

    cables and existing TCP/ IP networks.

  • 8/10/2019 Intro to Iscsi

    13/80

    iSCSI Overview, 11

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    11

    Advantages of iSCSI

    ! Many customers are moving from distributed to

    centralized data storage.

    ! SCSI is already installed for storage connections.

    !

    TCP/IP is already installed for LANcommunications.

    ! LAN switching is currently cheaper than FC

    switching.

    dd

    iSCSI also leverages IP knowledge and infrastructure. iSCSI leverages SCSI knowledge and standards.

    IP knowledge is more widespread than FC knowledge.

  • 8/10/2019 Intro to Iscsi

    14/80

  • 8/10/2019 Intro to Iscsi

    15/80

    iSCSI Overview, 13

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    13

    Protocols used in a IP Storage Network

    iSCSI

    FC

    iSCSI/FC

    Gateway

    FC

    FCIP

    Router

    FCIP

    Router

    FC

    FC

    iFCP

    Switch

    iFCP

    Switch

    FC

    IPNetwork

    IPNetwork

    IPNetwork

    IPNetwork

    iFCPFCIP

    protocols used in a IP Storage Network

    Today, there are three protocols used in block storage over IP approaches in development:

    iSCSI Native TCP/IP protocol. An IP-based protocol for establishing and managing Connections

    between IP-based storage devices, hosts, and clients. No Fibre Channel content, but bridging between

    iSCSI and FC is possible.

    FCIP TCP/IP based tunneling/encapsulating protocol for connecting/extending Fibre Channel SANS.

    More IP content, little Fibre Channel content. FCIP is a protocol used to merge two or more SANS

    together using IP.

    iFCP Gateway to gateway protocol for FC over IP. Mapping natively in IP across Fibre Channel and

    IP. An IP-based tunneling protocol for interconnecting Fibre Channel devices together in place of Fibre

    Channel switches. iFCP allows fabrics to remain independent.

  • 8/10/2019 Intro to Iscsi

    16/80

    iSCSI Overview, 14

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    14

    IP Storage Deployment Models

    = IP

    = FCNative! All Ethernet (No Fibre Channel)

    ! iSCSI Protocol

    ! Ethernet Switches & Routers

    Bridging! Servers Ethernet Attached

    ! Storage FC Attached (SAN or DAS)

    ! iSCSI Protocol

    Extension! Servers & Storage SAN Attached

    ! FCIP or iFCP Protocol

    ! SRDF

    Native iSCSI allows for all communications using Ethernet. Initiators may be directly attached to iSCSI

    Targets or may be connected using standard Ethernet routers and switches.

    Bridging architectures allow for the Initiators to exist in an Ethernet environment while the storage remains in

    a Fibre Channel SAN.

    Extension architectures are most often used to provide connectivity across large distances. Either FCIP or

    iFCP bring the long distance benefits of IP to Fibre Channel.

  • 8/10/2019 Intro to Iscsi

    17/80

    iSCSI Overview, 15

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    15

    Can we bridge FC to iSCSI?

    Host still sees LUNs

    whether FC or iSCSI

    Symm still arbitrates access

    via Volume Logix;

    switch zoning still applies

    Router can determine

    which IP portals are seen

    by hosts

    IP FC

    Yes, with qualified bridges see the latest EMC support Matrix.

    Restrictions on the environment:

    The network must be a local layer 2 network dedicated solely to the iSCSI configuration.

    The network must be engineered with no packet loss or duplication.

    iSCSI sessions may need to be manually re-established.

    A PSQ (Pre-site Qualification) is required for each implementation.

    Network design is key to making sure iSCSI works.

    Real-world implementations require Gigabit Ethernet.

    Consider iSCSI a local-area technology.

    Segregate iSCSI traffic from general traffic. Layer 2 VLANs are particularly good for this type of design.

    Oversubscription is OK for general user LANs, but not for iSCSI.

  • 8/10/2019 Intro to Iscsi

    18/80

    iSCSI Overview, 16

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    16

    Specifications

    ! www.ietf.org

    The IP Storage workgroupmaintains current drafts

    ! www.t10.org

    The Internet Engineering Task Force (IETF) is a community of network designers, operators, vendors, and

    researchers concerned with the evolution of the Internet architecture and the smooth operation of the Internet.

    The actual technical work of the IETF is done in its working groups, which are organized by topic into several

    areas (e.g., routing, transport, security, etc.). The current draft specifications for iSCSI are in the RFCprocess and can be located at http://ietf.org

    T10 is a Technical Committee of the Internationals Committee on Information Technology Standards

    (INCITS). INCITS is accredited by, and operates under rules that are approved by, the American National

    Standards Institute (ANSI). These rules are designed to insure that voluntary standards are developed by the

    consensus of industry groups. INCITS develops Information Processing System standards, while ANSI

    approves the process under which they are developed and publishes them. Related specifications on the

    SCSI architectural model are located at http://www.t10.org

  • 8/10/2019 Intro to Iscsi

    19/80

    iSCSI Overview, 17

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    17

    Protocol Mapping

    EthernetHeader

    Ethernet

    Header

    IP

    Header

    TCP

    Header

    iSCSI

    Header

    SCSI Commands

    & Data

    CR

    C

    The iSCSI protocol is a mapping of the SCSI remote procedure invocation model over the TCP protocol.

    SCSI commands are carried by iSCSI requests and SCSI responses and status are carried by iSCSI

    responses. iSCSI also uses the request response mechanism for iSCSI protocol mechanisms.

  • 8/10/2019 Intro to Iscsi

    20/80

    iSCSI Overview, 18

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    18

    iSCSI PDU

    Expected Data Transfer Length or Opcode Specific Fields

    Initiator Task Tag or Opcode specific

    Logical Unit Number (LUN)

    DataSegmentLengthTotalAHSLength

    Opcode Specific Fields.|I| Opcode

    Basic

    Header

    Segment

    Basic

    Header

    Segment

    Additional

    Header

    Segment

    Additional

    Header

    Segment

    Header

    Digest

    Header

    DigestSCSI

    Command & Data

    SCSI

    Command & Data

    Header

    Data

    Digest

    Header

    Data

    Digest

    In keeping with similar protocols, the initiator and target divide their communications into messages. This

    message is the iSCSI protocol data unit (iSCSI PDU).

  • 8/10/2019 Intro to Iscsi

    21/80

    iSCSI Overview, 19

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    19

    Architectural Model

    iSCSINode

    TargetIP Network

    Network

    Portal

    10.1.2.1TCP port

    3250

    NetworkPortal

    10.1.2.2TCP port

    3260

    iSCSINode

    Initiator

    Network

    Portal

    10.1.1.1

    Network

    Portal

    10.1.1.2

    Network Entity

    iSCSI Client

    Network Entity

    iSCSI Server

    There are two major network components associated with iSCSI. The first is the Network Entity, the specific

    device or gateway accessible to the IP network. This device must have one or more Network Portals

    available for use. The second network component is the Network Portal. This component of the Network

    Entity has an assigned IP address and a listening TCP port.

  • 8/10/2019 Intro to Iscsi

    22/80

    iSCSI Overview, 20

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    20

    iSCSI Portal Groups

    iSCSINode

    TargetIP Network

    Network

    Portal

    10.1.2.1TCP port

    3250

    NetworkPortal

    10.1.2.2TCP port

    3260

    iSCSINode

    Initiator

    Network

    Portal

    10.1.1.1

    Network

    Portal

    10.1.1.2

    Network Entity

    iSCSI Client

    Network Entity

    iSCSI Server

    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 Node that collectively supports the capability of coordinating a session with

    connections that span these portals. Portal Groups are identified within an iSCSI Node by a portal group tag,a simple unsigned-integer between 0 and 65535. Both iSCSI Initiators and iSCSI Targets have portal groups,

    though only the iSCSI Target Portal Groups are used directly in the iSCSI protocol.

  • 8/10/2019 Intro to Iscsi

    23/80

    iSCSI Overview, 21

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    iSCSI Layers

    Lesson

    As a result of completing this lesson, students should be able to do the following:

    List the layers of the iSCSI architectural model

    Explain the concept of TOE and how it is used to increase performance

    Describe the iSCSI frame composition

  • 8/10/2019 Intro to Iscsi

    24/80

    iSCSI Overview, 22

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    22

    iSCSI Layers

    Ethernet

    Command Descriptor Blocks

    Builds/receives iSCSI PDUs

    Control messages, SCSI commands,

    parameters, data

    Packet transmission protocol

    Optical and Electrical Interfaces, Cables,

    Connectors, etc.

    Volume managers, File systems, applications

    IP

    TCP

    iSCSI

    SCSI Device Driver

    Application

    The iSCSI protocol is broken up into logical layers.

  • 8/10/2019 Intro to Iscsi

    25/80

    iSCSI Overview, 23

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    23

    Ethernet

    Ethernet

    Command Descriptor Blocks

    Builds/receives iSCSI PDUs

    Control messages, SCSI commands,

    parameters, data

    Packet transmission protocol

    Optical and Electrical Interfaces, Cables,

    Connectors, etc.

    Volume managers, File systems, applications

    IP

    TCP

    iSCSI

    SCSI Device Driver

    Application

    Ethernet is the most widely-installed local area network (LAN) technology. Specified in a standard, IEEE

    802.3, Ethernet was originally developed by Xerox and then developed further by Xerox, DEC, and Intel. An

    Ethernet LAN typically uses coaxial cable or special grades of twisted pair wires. Ethernet systems provide

    transmission speeds up to 1 Gbps throughput and may use traditional copper or fiber optic cable. Devices areconnected to the cable and compete for access using a Carrier Sense Multiple Access with Collision

    Detection (CSMA/CD) protocol.

    Fast Ethernet or 100BASE-T provides transmission speeds up to 100 megabits per second and is typically

    used for LAN backbone systems, supporting workstations with 10BASE-T cards. Gigabit Ethernet provides an

    even higher level of backbone support at 1000 megabits per second (1 gigabit or 1 billion bits per second).

    10-Gigabit Ethernet provides up to 10 billion bits per second.

  • 8/10/2019 Intro to Iscsi

    26/80

    iSCSI Overview, 24

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    24

    NIC & TOE

    ! Checksum offload

    Fragmentation, out of orderpackets handled by host

    Could hurt systemperformance

    ! Full TCP/IP offload

    Fragmentation, out of orderpackets handled by TOE

    Increasedmemory/processingrequirements

    iSCSI & SCSI handled byhost

    ! Full TCP/IP+iSCSI/SCSI

    Completes storageconnection

    Runs all layers on TOE

    Traditional Ethernet adapters (NIC) are designed to transfer packetized file level data among PCs, servers

    and storage devices, such as NAS appliances. However, NICs do not traditionally transfer block level data,

    which is handled by a storage host bus adapter, such as Fibre Channel or parallel SCSI. In order for a NIC to

    process block level data the data needs to be placed into a TCP/IP packet before being sent over the IPnetwork. Through the use of iSCSI drivers on the host or server, a NIC can transmit packets of block level

    data over an IP network. When using a NIC, the server handles the packet creation of block level data and

    performs all of the TCP/IP processing. This is extremely CPU intensive and lowers the overall server

    performance. The TCP/IP processing performance bottleneck has been the driving force behind the

    development of TCP/IP offload engines (TOE) on adapter cards. A TOE removes the TCP/IP processing from

    the host CPU and completes TCP/IP processing and packet creation on the HBA. Thus a TCP/IP offload

    storage NIC operates more like a storage HBA rather than a standard NIC.

  • 8/10/2019 Intro to Iscsi

    27/80

    iSCSI Overview, 25

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    25

    IP

    Ethernet

    Command Descriptor Blocks

    Builds/receives iSCSI PDUs

    Control messages, SCSI commands,

    parameters, data

    Packet transmission protocol

    Optical and Electrical Interfaces, Cables,Connectors, etc.

    Volume managers, File systems, applications

    IP

    TCP

    iSCSI

    SCSI Device Driver

    Application

    The Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another. Each

    host on the network has at least one IP address that uniquely identifies it from all other computers on the

    Internet. When you send or receive data, the message gets divided into chunks called packets. Each of these

    packets contains both the sender's address and the receiver's address.

    iSCSI O i 26

  • 8/10/2019 Intro to Iscsi

    28/80

    iSCSI Overview, 26

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    26

    Packets

    iSCSI PDU

    IP Packet

    TCP Segment

    Basic

    Header

    Segment

    Additional

    Header

    Segment

    Data

    Header

    Data

    Digest

    Header

    Digest

    TCP

    Header

    IP

    Header

    Because a message is divided into a number of packets, each packet can, if necessary, be sent by a different

    route across the network. Packets can arrive in a different order than the order they were sent in. The Internet

    Protocol just delivers them. It's up to another protocol, the Transmission Control Protocol (TCP) to put them

    back in the right order.

    An "iSCSI packet" contains SCSI data and the iSCSI header, which is created by the iSCSI initiator, and is

    then wrapped in other protocol layers to facilitate its transport.

    The Ethernet Header is used to provide the physical network capability (CAT5, MAC, FDX, etc).

    The IP Header provides packet routing information used for moving the information across the network and

    the TCP Header contains the information needed to guarantee delivery to the target destination.

    The iSCSI Header explains how to extract SCSI commands and data.

    iSCSI O i 27

  • 8/10/2019 Intro to Iscsi

    29/80

    iSCSI Overview, 27

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    27

    SCSI to iSCSI Mapping

    SCSI Command and DataSCSI Command and Data

    Header DataHeader Data

    PDU PDU

    Header DataHeader Data

    PDU

    Header DataHeader Data

    PDU

    Header DataHeader Data

    IP packetIP packet

    IP packetIP packet

    IP packetIP packet

    IP packetIP packet

    IP packetIP packet

    IP packetIP packet

    IP packetIP packet

    IP packetIP packet

    As in most networking protocols the data is broken up and encapsulated within packets for transmission. In

    iSCSI the SCSI commands are issued and broken into iSCSI PDUs. These in turn are broken into IP packets

    and transmitted across the physical level. The receiving node must then reassemble the data and pass it up

    the network stack until a SCSI command is extracted.

    iSCSI Overview 28

  • 8/10/2019 Intro to Iscsi

    30/80

    iSCSI Overview, 28

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    28

    TCP

    Ethernet

    Command Descriptor Blocks

    Builds/receives iSCSI PDUs

    Control messages, SCSI commands,

    parameters, data

    Packet transmission protocol

    Optical and Electrical Interfaces, Cables,Connectors, etc.

    Volume managers, File systems, applications

    IP

    TCP

    iSCSI

    SCSI Device Driver

    Application

    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. The group of TCP connections that link an initiator with a target form a session (loosely equivalent to a

    SCSI I_T nexus).

    iSCSI Overview 29

  • 8/10/2019 Intro to Iscsi

    31/80

    iSCSI Overview, 29

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    29

    iSCSI Session ID

    TSIH

    ISID

    The two principal Session Ids in iSCSI are the ISID and the TSIH. The Initiator Session ID (ISID) is generated

    by the initiator during session login. There is one ISID for each session between a Target and Initiator pair

    and is used for all additional logins during that session. The Target Session Identifying Handle (TSIH) is an

    assigned tag by the Target for a session with a specific Initiator.

    iSCSI Overview, 30

  • 8/10/2019 Intro to Iscsi

    32/80

    iSCSI Overview, 30

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    30

    iSCSI

    Ethernet

    Command Descriptor Blocks

    Builds/receives iSCSI PDUs

    Control messages, SCSI commands,

    parameters, data

    Packet transmission protocol

    Optical and Electrical Interfaces, Cables,Connectors, etc.

    Volume managers, File systems, applications

    IP

    TCP

    iSCSI

    SCSI Device Driver

    Application

    The iSCSI layer builds/receives iSCSI PDUs and relays/ receives them to/from one or more TCP

    connections.

    iSCSI Overview, 31

  • 8/10/2019 Intro to Iscsi

    33/80

    ,

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    31

    PDU Template

    Data Digest (Optional)

    DataSegment, Command Data (Optional)

    AHS (Optional)

    Header Digest (Optional)

    SCSI Command Descriptor Block (CDB)

    ExpStatSN

    CmdSN

    z

    y

    x

    48

    32

    28

    24Expected Data Transfer Length or Opcode Specific Fields20

    Initiator Task Tag or Opcode specific

    8

    16

    4

    0

    Byte 3Byte 2Byte 1Byte 0

    Logical Unit Number (LUN)

    DataSegmentLengthTotalAHSLength

    Opcode Specific Fields.|I| Opcode

    7 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 0

    iSCSI Protocol Data Units (PDUs) are used to carry messages between the Target and the Initiator. It is

    within the PDU that the actual mapping of SCSI data, commands and responses to iSCSI take place. PDUs

    are padded to the closest integer number of four byte words. The padding bytes should be sent as 0. Each of

    the segments within the PDU

    iSCSI Overview, 32

  • 8/10/2019 Intro to Iscsi

    34/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    32

    Basic Header Segment

    48

    44

    40

    36

    32

    28

    24

    Expected Data Transfer Length or Opcode Specific Fields20Initiator Task Tag or Opcode specific16

    12

    8

    4

    0

    Byte 3Byte 2Byte 1Byte 0

    Logical Unit Number (LUN)

    DataSegmentLengthTotalAHSLength

    Opcode Specific Fields.|I| Opcode

    7 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 0

    The Basic Header Segment (BHS) is 48 bytes long. The Opcode and DataSegmentLength fields appear in

    all iSCSI PDUs. In addition, when used, the Initiator Task Tag and Logical Unit Number always appear in the

    same location in the header. The Immediate Delivery (I) bit is to mark a request for immediate execution,

    however the operations involved (all or part of them) may be postponed to allow the target to receive all

    relevant tasks.

    iSCSI Overview, 33

  • 8/10/2019 Intro to Iscsi

    35/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    33

    Opcodes

    ! Initiator opcodes

    NOP-Out

    SCSI Command

    SCSI Task Managementrequest

    Login Request

    Text Request SCSI Data-out for write

    operations

    Logout Request

    SNACK Request

    Vendor specific codes

    ! Target opcodes

    NOP-In

    SCSI Response

    SCSI Task Managementresponse

    Login Response

    Text Response SCSI Data-in for read

    operations

    Logout Response

    Ready To Transfer (R2T)

    Asynchronous Message

    Vendor specific codes

    Reject

    The Opcode indicates the type of iSCSI PDU the header encapsulates. The Opcodes are divided into two

    categories: initiator opcodes and target opcodes. Initiator opcodes are in PDUs sent by the initiator (request

    PDUs). Target opcodes are in PDUs sent by the target (response PDUs).

    Examples include the Login commands and Text Requests which assist in the discovery process.

    iSCSI Overview, 34

  • 8/10/2019 Intro to Iscsi

    36/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    34

    Additional Header Segment

    Data-Digest (optional)mData Segment (optional)l

    Header Digest (optional)k

    Additional Header Segment (AHS) (optional)+

    48

    0

    Byte 3Byte 2Byte 1Byte 0

    Basic Header Segment (BHS)

    7 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 0

    The Additional Header Segments (AHS) are optional and when present follow the BHS. The AHS is used for

    extended CDB information and bi-directional Read-Data requests.

    iSCSI Overview, 35

  • 8/10/2019 Intro to Iscsi

    37/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    35

    Data Segment

    Data-Digest (optional)mData Segment (optional)l

    Header Digest (optional)k

    Additional Header Segment (AHS) (optional)+

    48

    0

    Byte 3Byte 2Byte 1Byte 0

    Basic Header Segment (BHS)

    7 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 0

    The (optional) Data Segment contains PDU associated data. Its payload effective length is provided in the

    BHS field - DataSegmentLength. The Data Segment is also padded to an integer number of 4 byte words.

    Some SCSI commands require additional parameter data to accompany the SCSI command. This data may

    be placed beyond the boundary of the iSCSI header in a data segment. Alternatively, user data (e.g., from aWRITE operation) can be placed in the data segment (both cases are referred to as immediate data).

    iSCSI Overview, 36

  • 8/10/2019 Intro to Iscsi

    38/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    36

    Header and Data Digest

    Data-Digest (optional)mData Segment (optional)l

    Header Digest (optional)k

    Additional Header Segment (AHS) (optional)+

    48

    0

    Byte 3Byte 2Byte 1Byte 0

    Basic Header Segment (BHS)

    7 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 0

    Optional header and data digests protect the integrity of the header and data, respectively. The digests, if

    present, are located after the header and PDU-specific data, and cover the data and the padding bytes. The

    decision as to whether there will be digests is negotiated during the Login Phase.

    The separation of the header and data digests is useful in iSCSI routing applications, where only the headerchanges when a message is forwarded. In this case, only the header digest would be recalculated. Digests

    are not included in data or header length fields.

    iSCSI Overview, 37

  • 8/10/2019 Intro to Iscsi

    39/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    37

    SCSI

    Ethernet

    Command Descriptor Blocks

    Builds/receives iSCSI PDUs

    Control messages, SCSI commands,

    parameters, data

    Packet transmission protocol

    Optical and Electrical Interfaces, Cables,Connectors, etc.

    Volume managers, File systems, applications

    IP

    TCP

    iSCSI

    SCSI Device Driver

    Application

    The SCSI layer builds/receives SCSI Command Descriptor Blocks (CDB) and passes/receives them with the

    remaining command execute parameters to/from the iSCSI layer.

    iSCSI Overview, 38

  • 8/10/2019 Intro to Iscsi

    40/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    38

    Command Descriptor Blocks

    Reserved0x01

    x

    4

    0

    Byte 3Byte 2Byte 1Byte 0

    ExtendedCDB...+padding

    AHSLength (CDBLength-15)

    7 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 07 6 5 4 3 2 1 0

    Command Descriptor Blocks (CDB) are the data structures used to contain the command parameters that an

    initiator sends to a target. The CDB content and structure is defined by and device-type specific SCSI

    standards.

    There are 16 bytes in the CDB field to accommodate the commonly used CDBs. Whenever the CDB is largerthan 16 bytes, an Extended CDB AHS MUST be used to contain the CDB spillover.

    iSCSI Overview, 39

  • 8/10/2019 Intro to Iscsi

    41/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    iSCSI Address & Names

    Lesson

    As a result of completing this lesson, students should be able to do the following:

    Identify the parts of the iSCSI name

    List the parts of the iSCSI address

    iSCSI Overview, 40

  • 8/10/2019 Intro to Iscsi

    42/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    40

    iSCSI Names

    ! iSCSI names contain three parts Type designator

    Naming Authority

    String determined by naming authority

    ! iqn. iSCSI Qualified Name

    iqn.2003-04.com.emc.symmetrix.0093 iqn.2003-04.com.emc.symmetrix.0093:diskarray.1

    ! eui. Extended Unique Identifier eui.50060482AEA5574E

    Names enable iSCSI storage resources to be managed regardless of address. An iSCSI node name is also

    the SCSI device name of an iSCSI device. The iSCSI name of a SCSI device is the principal object used in

    authentication of targets to initiators and initiators to targets. It is also used to identify and manage iSCSI

    storage resources. They are associated with iSCSI nodes, and not iSCSI network adapter cards, so the

    replacement of network adapter cards does not require reconfiguration of all SCSI and iSCSI resourceallocation information.

    iSCSI names must be unique within the operational domain of the end user. However, because the

    operational domain of an IP network is potentially worldwide, the iSCSI name formats are worldwide unique.

    To assist naming authorities in the construction of worldwide unique names, iSCSI provides two name

    formats for different types of naming authorities.

    iSCSI Qualified Name

    To generate names of this type, the person or organization generating the name must own a registered

    domain name. This domain name does not have to be active, and does not have to resolve to an address; it

    just needs to be reserved to prevent others from generating iSCSI names using the same domain name.

    Since a domain name can expire, be acquired by another entity, or may be used to generate iSCSI names by

    both owners, the domain name must be additionally qualified by a date during which the naming authority

    iSCSI Overview, 41

  • 8/10/2019 Intro to Iscsi

    43/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    41

    iSCSI Addresses

    ! Address is the path to end point (iSCSI node) which isa combination of IP address (v4 or v6)

    TCP Port

    iSCSI name

    ! The address usually corresponds to the NetworkPortal

    ! Can be changed at any time except for the target TCPPort (3260)

    An iSCSI address is comprised of the iSCSI Name and its Location. The Location is a combination of the

    Host name, the IP address and, in the case of a Target, the TCP port number.

    iSCSI Overview, 42

  • 8/10/2019 Intro to Iscsi

    44/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    iSCSI Login

    Lesson

    As a result of completing this lesson, students should be able to do the following:

    List the steps of the iSCSI login process

    Explain the purposes of the iSCSI login process

    Identify the types of iSCSI security

    iSCSI Overview, 43

  • 8/10/2019 Intro to Iscsi

    45/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    43

    Overview

    ! Login Validate User

    Validate access rights

    ! Negotiate parameters for that session PDU size

    Immediate data support

    ! Initiator (Host) Sends CMD as OPCODE encapsulatedin an iSCSI PDU

    ! Target (Storage) receives command, replies with R2T

    ! For a Write/Data Out (Read/Data In), Host (Target)sends data encapsulated in an iSCSI PDU

    ! Target sends encapsulated Status back to Initiator

    The iSCSI login process includes several stages. During the login the user is authenticated and security

    parameters are exchanged. Once the session is established the Initiator is able to send SCSI commands to

    the Target. Normal SCSI command procedures are followed including Status replies.

    iSCSI Overview, 44

  • 8/10/2019 Intro to Iscsi

    46/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    44

    accept

    login

    Purpose of Login

    ! Enable a TCP connection

    ! Authentication

    ! Negotiate sessionparameters

    ! Marking the connection

    The purpose of the iSCSI login is to enable a TCP connection for iSCSI use, authentication of the parties,

    negotiation of the session's parameters and marking of the connection as belonging to an iSCSI session. A

    session is used to identify to a target all the connections with a given initiator that belong to the same I_T

    nexus. The targets listen on a well-known TCP port or other TCP port for incoming connections. The initiator

    begins the login process by connecting to one of these TCP ports.

    iSCSI Overview, 45

  • 8/10/2019 Intro to Iscsi

    47/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    45

    Login Stages

    Security

    Negotiation

    Operational

    Parameter

    Negotiation

    The Login process proceeds in two stages - the security negotiation stage and the operational parameter

    negotiation stage. Both stages are optional but at least one of them has to be present to enable setting some

    mandatory parameters.

    iSCSI Overview, 46

  • 8/10/2019 Intro to Iscsi

    48/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    46

    Login

    Login Response

    Login Request

    The iSCSI Login Phase is carried through Login requests and responses. Once suitable authentication has

    occurred and operational parameters have been set, the session transitions to Full Feature Phase and the

    initiator may start to send SCSI commands.

    iSCSI Overview, 47

  • 8/10/2019 Intro to Iscsi

    49/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    47

    Login Phase Start

    Protocol version

    iSCSI names

    Negotiation state

    The Login Phase starts with a login request from the initiator to the target. The initial login request includes:

    Protocol version supported by the initiator.

    iSCSI Initiator Name and iSCSI Target Name

    Negotiation stage that the initiator is ready to enter.A login may create a new session or it may add a connection to an existing session. Between a given iSCSI

    Initiator Node selected by an InitiatorName and a given iSCSI target defined by an iSCSI TargetName and a

    Target Portal Group Tag.

    iSCSI Overview, 48

  • 8/10/2019 Intro to Iscsi

    50/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    48

    Login Security Negotiations

    Security Login

    Key Value

    Parameters

    The security exchange sets the security mechanism and authenticates the initiator user and the target to each

    other. The exchange proceeds according to the authentication method chosen in the negotiation phase and is

    conducted using the login requests' and responses' key=value parameters.

    iSCSI Overview, 49

  • 8/10/2019 Intro to Iscsi

    51/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    49

    Types of iSCSI Security

    ! iSCSI supports several different types of security:

    Encryption

    IPSec

    IKE

    Authentication

    Kerberos v5 SRP (Secure Remote Password)

    SPKM1 / 2

    CHAP (possibly using RADIUS servers but not the protocol itself)

    CHAP is the only must-support protocol in the current iSCSI spec, and its the only one EMC supports at

    this time.

    iSCSI Security CHAP basics. CHAP verifies identity using a hashed transmission.Secret key is known by both parties. Periodic re-challenges guard against replay attacks.

    The target (not necessarily the iSCSI target, but the security requestor) initiates the challenge.

    CHAP is a one-way protocol but may be implemented in two directions to provide security for both ends.

    iSCSI Overview, 50

  • 8/10/2019 Intro to Iscsi

    52/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    50

    iSCSI Security CHAP process

    Challenge

    Target compares hashes;

    If they match, passwords

    must be the same.

    Hash

    CHAP target sends out arandom challenge message

    & hashes it with the

    locally-stored key.

    Requestor builds hash

    with its locally-stored

    key and sends it back.

    Keyfhash

    Challenge fhash Key Hash

    Hash Hash

    =

    =

    (Transmit)

    (Transmit)

    Key is never sent over the link. Hash function is one way; key cannot be mathematically derived from hash.

    iSCSI Overview, 51

  • 8/10/2019 Intro to Iscsi

    53/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    51

    Session Establishment

    ISID

    TSIH

    The login PDU includes the ISID part of the session ID (SSID). The target portal group that services the login

    is implied by the selection of the connection endpoint. For a new session, the TSIH is zero. As part of the

    response, the target generates a TSIH.

    iSCSI Overview, 52

  • 8/10/2019 Intro to Iscsi

    54/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    52

    Full Feature Phase

    SCSI

    commands

    Once the initiator is authorized to do so, the iSCSI session is in the iSCSI Full Feature Phase. A session is in

    Full Feature Phase after successfully finishing the Login Phase on the first (leading) connection of a session.

    A connection is in Full Feature Phase if the session is in Full Feature Phase and the connection login has

    completed successfully. An iSCSI connection is not in Full Feature Phase when it does not have an

    established transport connection or when it has a valid transport connection, but a successful login was notperformed or the connection is currently logged out.

    In a normal Full Feature Phase, the initiator may send SCSI commands and data to the various LUNs on the

    target by encapsulating them in iSCSI PDUs that go over the established iSCSI session.

    iSCSI Overview, 53

  • 8/10/2019 Intro to Iscsi

    55/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    53

    Operational Parameter Negotiation

    ! HeaderDigest andDataDigest (CRC32)

    ! MaxConnections,

    ! SendTargets,

    ! TargetName,

    ! InitiatorName,

    !

    TargetAlias,! InitiatorAlias,

    ! TargetAddress

    ! TargetPortalGroupTag

    ! R2T

    ! ImmediateData

    ! MaxRecvDataSegmentLength (PDU data size)

    ! MaxBurstSize

    ! FirstBurstSize

    ! DefaultTime2Wait

    ! DefaultTime2Retain

    !

    MaxOutstandingR2T! DataPDUInOrder

    ! DataSequenceInOrder

    ! ErrorRecoveryLevel

    ! SessionType

    ! Vendor Specific Key Format

    Operational parameter negotiation during the login may occur in two situations. The first is starting with the

    first Login request if the initiator does not propose any security/ integrity option. The other situation is

    immediately after the security negotiation if the initiator and target perform such a negotiation.

    Operational parameter negotiation may involve several Login request-response exchanges started and

    terminated by the initiator. The initiator MUST indicate its intent to terminate the negotiation by setting the Tbit to 1; the target sets the T bit to 1 on the last response.

    iSCSI Overview, 54

  • 8/10/2019 Intro to Iscsi

    56/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    54

    iSCSI Connection Termination

    TCP FIN

    Graceful TCP connection shutdowns are done by sending TCP FINs. A graceful transport connection

    shutdown should only be initiated by either party when the connection is not in iSCSI Full Feature Phase. A

    target may terminate a Full Feature Phase connection on internal exception events, but it should announce

    the fact through an Asynchronous Message PDU.

    iSCSI Overview, 55

  • 8/10/2019 Intro to Iscsi

    57/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    iSCSI Discovery

    Lesson

    As a result of completing this lesson, students should be able to do the following:

    List the iSCSI Discovery methods

    Explain the purposes of the iSNS service

    Describe Discovery using Service Location Protocol

    iSCSI Overview, 56

  • 8/10/2019 Intro to Iscsi

    58/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    56

    iSCSI Discovery

    ! Defines how the Initiator finds the Target

    ! Methods of discovery Manual Configuration (SendTarget)

    The initiator queries an iSNS

    The initiator use SLP

    iSCSI Discovery is the process where the Initiator finds the Target. This process is required before discovery

    of Logical Units and LUNs.

    iSCSI Overview, 57

  • 8/10/2019 Intro to Iscsi

    59/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    57

    Manual Configuration

    ! Initiator is configured with the iSCSI address of theTarget Up to 255 characters long

    iSCSI addresses (IP,TCP port)

    ! Initiator connects to an iSCSI server and initiates an

    iSCSI discovery session! Upon successful login, the initiator issues

    SendTargets command

    ! The Target returns a list of targets with the address,names and aliases

    The ability to define a Target manually places the control into the administrators hands. Each Target must be

    identified by its iSCSI name to each Initiator. This method could be difficult to manage since it requires direct

    changes to each Initiator within the storage network. Additionally the iSCSI name can be up to 255 characters

    long opening the potential to mistypes.

  • 8/10/2019 Intro to Iscsi

    60/80

    iSCSI Overview, 59

    St N S O i

  • 8/10/2019 Intro to Iscsi

    61/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    59

    Storage Name Server Overview

    ! iSNS is a client/server model

    ! The iSNS server is passive May send state change notifications to the registered clients

    in response to an action by an iSNS client

    ! iSNS clients register & manipulate the objects in the

    iSNS server initiators, targets, management stations, switches

    ! An iSNS server can be hosted on a target, switch,initiator, or stand-alone server with specified IPaddress

    The iSNS database is the information repository for the iSNS server(s). It maintains information about iSNS

    client attributes. A directory-enabled implementation of iSNS may store client attributes in an LDAP directory

    infrastructure.

    There are four main functions of the iSNS:

    1) A Name Service Providing Storage Resource Discovery

    2) Discovery Domain (DD) and Login Control Service

    3) State Change Notification Service

    4) Open Mapping of Fibre Channel and iSCSI Devices

    iSCSI Overview, 60

    iSNS D i Di

  • 8/10/2019 Intro to Iscsi

    62/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    60

    iSNS Domain Discovery

    Discovery

    Domains

    Device B

    Host B

    Host A

    Host C

    Device A

    Discovery Domains (DD) are a security and management mechanism used to partition storage resources.

    Discovery Domains limit the discovery process to the administrator-configured subset of relevant storage

    devices, preventing initiators from attempting login to devices that they shouldn't have access to.

    When queried, the iSNS server will provide information only for storage entities that share at least one

    common DD. Initiators will not be able to "see" devices that they do not have at least one common DD.

    iSCSI Overview, 61

    iSNS Example

  • 8/10/2019 Intro to Iscsi

    63/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    61

    iSNS Example

    Security

    Keys

    Management Platform

    iSNS

    Device B

    Host B

    Host A

    Host C

    Device A

    iSNS Protocol registration and query messages are sent by iSNS clients to servers, while notification

    messages are sent by iSNS servers to iSNS clients. Messages originating at the client are sent to the iSNS

    server at the well-known iSNS TCP or UDP port number.

    The iSNS provides a registration function to allow all entities in a storage network to register and query the

    iSNS database. Both targets and initiators can register in the iSNS database, as well as query for informationabout other initiators and targets. This allows, for example, a client initiator to obtain information about target

    devices from the iSNS server. This service is modeled on the Fibre Channel Generic Services Name Server

    described in FC-GS-3, with extensions, operating within the context of an IP network.

    iSCSI Overview, 62

    State Change

  • 8/10/2019 Intro to Iscsi

    64/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    62

    State Change

    iSNS

    Device B

    Host B

    Host A

    Host C

    Device A

    Host

    logs

    out

    SCN

    service

    The State Change Notification (SCN) service allows the iSNS to issue notifications about network events that

    affect the operational state of iSNS clients. The iSNS client has the ability to register for these notifications of

    events detected by the iSNS. The types of events for which SCNs can be sent include change in Discovery

    Domain membership and device registration updates.

    The State Change Notification service utilizes the Discovery Domain Service to control the distribution ofnotification messages. Notifications about changes within a DD are limited to members of that DD.

    iSCSI Overview, 63

    Service Location Protocol (SLP)

  • 8/10/2019 Intro to Iscsi

    65/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    63

    Service Location Protocol (SLP)

    ! A discovery mechanism with minimal configuration A good choice for small or medium networks

    ! The Service Agent advertises the iSCSI address asURL: iSCSI://[:]/

    = IP address = optional and can be the IANA assigned (3260)

    = target iSCSI name

    ! This address is primarily used for discovery

    The Service Locator Protocol (SLP) was standardized in the IETF. It provides automatic client configuration

    for applications and advertisement for network services. The Service Location Protocol eliminates the need

    for a user to know the name of a network host supporting a service. Rather, the user names the service and

    supplies a set of attributes which describe the service. The Service Location Protocol (SLP) allows the user to

    bind this description to the network address of the service. The SLP is comprised of a process working on theclient's behalf to establish contact with some service. The User Agent (UA) retrieves service information from

    the Service Agents or Directory Agents. The Service Agent (SA) is a process working on behalf of one or

    more services to advertise the services and their capabilities. The process that collects service

    advertisements is called the Directory Agent (DA) . There can only be one DA present per given host.

    iSCSI Overview, 64

    SLP Example

  • 8/10/2019 Intro to Iscsi

    66/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    64

    SLP Example

    SLP

    UA

    iSCSI

    Initiator

    TCP/IP

    Management Code

    SLP

    UA

    iSCSI

    Initiator

    TCP/IP

    Management CodeIP Network

    SLP

    Directory

    Agent

    For SLP to work the target would advertise its name:IP address:port either to a DA in the network or on its

    own via its SA. The initiator contacts the DA directly, using its UA, looking for targets or could multicast

    looking for an SA to request targets. All normal login processes follow from here.

    iSCSI Overview, 65

  • 8/10/2019 Intro to Iscsi

    67/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    iSCSI Communications

    Topic

    As a result of completing this lesson, students should be able to do the following:

    Explain the data flow model of iSCSI

    List the error correction methods of iSCSI

    iSCSI Overview, 66

    Ordering & Numbering

  • 8/10/2019 Intro to Iscsi

    68/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    66

    O de g & u be g

    ! Every iSCSI PDU message is numbered

    ! Commands are numbered by CmdSN and are unique per iSCSIsession

    ! Status is numbered by StatSN and are unique per TCPconnection

    ! Data are numbered by DataSN and are unique per command

    CmdSN

    StatSN

    CmdSN

    StatSN StatSN

    PDU #1 PDU #1

    PDU #2

    PDU #3

    PDU #1

    PDU #2

    PDU #3

    PDU #4

    Similar to Fibre Channel and other network protocols, iSCSI uses a numbering system to manage the

    breakup of data into smaller packets. At the highest level the CmdSN (Command Sequence Number) is

    unique within an iSCSI session. The CmdSN is similar in operation to the OXID in Fibre Channel. At the TCP

    connection level, the StatSN is the unique numbering identifier. The StatSN is equivalent to the SEQ_ID. The

    DataSN field is also sequenced per command and is similar to the SEQ_CNT. Unlike command and status,data PDUs and R2Ts are not acknowledged by a field in regular outgoing PDUs.

    iSCSI Overview, 67

    Data Flow

  • 8/10/2019 Intro to Iscsi

    69/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    67

    ! Data transfer on the same path as command andstatus

    ! Data out may be unsolicited or solicited

    ! Unsolicited data can be Sent as part of the command message or

    Separate data messages (as in WRITE command)! Solicited data is sent

    Only in response to a target initiated Ready-to-Transfer(R2T) message

    Connection Allegiances when there are multiple connections are distributed for a single session. Data Out

    means that data in the direction from the initiator to the target.

    iSCSI Overview, 68

    Example of iSCSI Data Flow

  • 8/10/2019 Intro to Iscsi

    70/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    68

    p

    192.168.0.58 192.168.0.100 TCP 1039 > 3260 [SYN] Seq=1771272578 Ack=0192.168.0.100 192.168.0.58 TCP 3260 > 1039 [SYN,ACK] Seq=2980037053 Ack=1771272579192.168.0.58 192.168.0.100 TCP 1039 > 3260 [ACK] Seq=1771272579 Ack=2980037054192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1039 [ACK] Seq=2980037054 Ack=1771272779192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1039 [ACK] Seq=2980037118 Ack=1771272827192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1039 [ACK] Seq=2980037166 Ack=1771272875192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 iSCSI SCSI: Inquiry192.168.0.100 192.168.0.58 TCP 3260 > 1039 [ACK] Seq=2980037238 Ack=1771272923192.168.0.100 192.168.0.58 iSCSI SCSI Data In192.168.0.100 192.168.0.58 iSCSI SCSI Response (Good)192.168.0.58 192.168.0.100 TCP 1039 > 3260 [ACK] Seq=1771272923 Ack=2980037338192.168.0.58 192.168.0.100 iSCSI SCSI: Inquiry192.168.0.100 192.168.0.58 TCP 3260 > 1039 [ACK] Seq=2980037338 Ack=1771272971192.168.0.100 192.168.0.58 iSCSI SCSI Data In192.168.0.100 192.168.0.58 iSCSI SCSI Response (Good)192.168.0.58 192.168.0.100 TCP 1039 > 3260 [ACK] Seq=1771272971 Ack=2980037438192.168.0.58 192.168.0.100 iSCSI SCSI: Inquiry192.168.0.100 192.168.0.58 TCP 3260 > 1039 [ACK] Seq=2980037438 Ack=1771273019192.168.0.100 192.168.0.58 iSCSI SCSI Data In

    192.168.0.100 192.168.0.58 iSCSI SCSI Response (Good)192.168.0.58 192.168.0.100 TCP 1039 > 3260 [ACK] Seq=1771273019 Ack=2980037538

    TCP

    iSCSI

    Login

    SCSI

    Inquiry

    In this example we see the establishment of the TCP session and then the transition to the iSCSI Login

    sequence. For each successful login there is a Login Response issued. After the Full feature phase login, the

    SCSI Inquiry phase begins and we are operating under normal SCSI 3 rules of discovery.

    iSCSI Overview, 69

    iSCSI CmdSN

  • 8/10/2019 Intro to Iscsi

    71/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    69

    iSCSI (SCSI Command)Opcode: SCSI Command (0x01).0.. .... = I: Queued deliveryFlags: 0xc0

    1... .... = F: Final PDU in sequence.1.. .... = R: Data will be read from target..0. .... = W: No data will be written to target.... .000 = Attr: Untagged (0x00)

    TotalAHSLength: 0x00DataSegmentLength: 0x00000000LUN: 0000000000000000

    InitiatorTaskTag: 0x48346681ExpectedDataTransferLength: 0x00001000

    CmdSN: 0x0000015d

    ExpStatSN: 0x00000003SCSI CDB

    Opcode: Read(10) (0x28)DPO = 0, FUA = 0, RelAddr = 0Logical Block Address (LBA): 4572840Transfer Length: 8Vendor Unique = 0, NACA = 0, Link = 0

    Command Sequence Number

    The CmdSN (Command Sequence Number) enables ordered delivery across multiple connections in a single

    session. For task sets, the CmdSN of the Task Management function request helps identify the tasks upon

    which to act, namely all tasks associated with a LUN and having a CmdSN preceding the Task Management

    function request CmdSN.

    For Task Management, the coordination between responses to the tasks affected and the Task Managementfunction response is done by the target.

    iSCSI Overview, 70

    iSCSI StatSN

  • 8/10/2019 Intro to Iscsi

    72/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    70

    iSCSI (SCSI Command)Opcode: SCSI Command (0x01).0.. .... = I: Queued deliveryFlags: 0xa1

    1... .... = F: Final PDU in sequence.0.. .... = R: No data will be read from target..1. .... = W: Data will be written to target.... .001 = Attr: Simple (0x01)

    TotalAHSLength: 0x00DataSegmentLength: 0x00000000LUN: 0038000000000000

    InitiatorTaskTag: 0x00000c21ExpectedDataTransferLength: 0x00000800CmdSN: 0x00000c21

    ExpStatSN: 0x00000c25

    HeaderDigest: 0xdc7346d9 (Good CRC32)SCSI CDB

    Opcode: Write(10) (0x2a)DPO = 0, FUA = 0, RelAddr = 0Logical Block Address (LBA): 1254559Transfer Length: 4Vendor Unique = 0, NACA = 0, Link = 0

    Status Sequence Number

    Responses in transit from the target to the initiator are numbered. The StatSN (Status Sequence Number) is

    used for this purpose. StatSN is a counter maintained per connection. StatSN is a Sequence Number that the

    target iSCSI layer generates per connection and that in turn, enables the initiator to acknowledge status

    reception. StatSN is incremented by 1 for every response/status sent on a connection except for responses

    sent as a result of a retry or SNACK. In the case of responses sent due to a retransmission request, theStatSN MUST be the same as the first time the PDU was sent unless the connection has since been

    restarted.

    Status numbering starts with the Login response to the first Login request of the connection. The Login

    response includes an initial value for status numbering (any initial value is valid).

    iSCSI Overview, 71

    iSCSI R2T

  • 8/10/2019 Intro to Iscsi

    73/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    71

    iSCSI (Ready To Transfer)Opcode: Ready To Transfer (0x31)TotalAHSLength: 0x00DataSegmentLength: 0x00000000LUN: 0038000000000000InitiatorTaskTag: 0x00000c21TargetTransferTag: 0x0000001cStatSN: 0x00000c25ExpCmdSN: 0x00000c22MaxCmdSN: 0x00000d22R2TSN: 0x00000000

    BufferOffset: 0x00000000DesiredDataLength: 0x00000800HeaderDigest: 0xb44fe89f (Good CRC32)

    Ready to Transfer

    R2T is the mechanism by which the SCSI target "requests" the initiator for output data. R2T specifies to the

    initiator the offset of the requested data relative to the buffer address from the execute command procedure

    call and the length of the solicited data.

    To help the SCSI target associate the resulting Data-out with an R2T, the R2T carries a Target Transfer Tag

    that will be copied by the initiator in the solicited SCSI Data-out PDUs. There are no protocol specificrequirements with regard to the value of these tags, but it is assumed that together with the LUN, they will

    enable the target to associate data with an R2T.

    iSCSI Overview, 72

    SCSI Read Transaction

  • 8/10/2019 Intro to Iscsi

    74/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    72

    192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774981054 Ack=1787967638192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774981118 Ack=1787967686192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774981166 Ack=1787967734192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 TCP 1041 > 3260 [ACK] Seq=1787967734 Ack=2774981238192.168.0.58 192.168.0.100 iSCSI SCSI: Read(10)(LBA: 0x0045c6a8, Len: 8)192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774981238 Ack=1787967782192.168.0.100 192.168.0.58 iSCSI SCSI Data In

    192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774982698 Ack=1787967782192.168.0.58 192.168.0.100 TCP 1041 > 3260 [ACK] Seq=1787967782 Ack=2774982698192.168.0.100 192.168.0.58 TCP 3260 > 1041 [PSH,ACK] Seq=2774984158 Ack=178796192.168.0.100 192.168.0.58 iSCSI SCSI Response (Good)192.168.0.58 192.168.0.100 TCP 1041 > 3260 [ACK] Seq=1787967782 Ack=2774985382192.168.0.58 192.168.0.100 TCP 1041 > 3260 [ACK] Seq=1787967782 Ack=2774985430

    iSCSILogin

    SCSIREAD

    SCSI

    Dataand

    Status

    If an initiator issues a READ command, the target must send the requested data followed by the status to the

    initiator over the same TCP connection that was used to deliver the SCSI command.

    iSCSI Overview, 73

    SCSI Write Transaction

  • 8/10/2019 Intro to Iscsi

    75/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    73

    192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774981054 Ack=1787967638192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774981118 Ack=1787967686192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 iSCSI Login Command192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774981166 Ack=1787967734192.168.0.100 192.168.0.58 iSCSI Login Response (Success)192.168.0.58 192.168.0.100 TCP 1041 > 3260 [ACK] Seq=1787967734 Ack=2774981238192.168.0.58 192.168.0.100 iSCSI SCSI: Write(10)(LBA: 0x01117480, Len: 8)192.168.0.58 192.168.0.100 TCP 1041 > 3260 [ACK] Seq=1787969242 Ack=2774985430192.168.0.58 192.168.0.100 iSCSI NOP Out, NOP Out, NOP Out

    192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774985430 Ack=1787970702192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774985430 Ack=1787971926192.168.0.100 192.168.0.58 iSCSI SCSI Response (Good)192.168.0.58 192.168.0.100 iSCSI SCSI: Write(10)(LBA: 0x01117428, Len: 8)192.168.0.58 192.168.0.100 iSCSI SCSI: Write(10)(LBA: 0x01117428, Len: 8)192.168.0.58 192.168.0.100 iSCSI NOP Out, NOP Out, NOP Out, NOP Out, NOP Out,192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774985478 Ack=1787974846192.168.0.100 192.168.0.58 TCP 3260 > 1041 [ACK] Seq=2774985478 Ack=1787976070192.168.0.100 192.168.0.58 iSCSI SCSI Response (Good)

    iSCSILogin

    SCSI

    WRITE

    Status

    SCSI

    Write

    Status

    If an initiator issues a WRITE command, the initiator must send the data for that command over the same

    TCP connection that was used to deliver the SCSI command. The target must return the status over the

    same TCP connection that was used to deliver the SCSI command.

    iSCSI Overview, 74

    Initiator Error Recovery Mechanisms

  • 8/10/2019 Intro to Iscsi

    76/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    74

    The initiator mechanisms defined in connection with error recovery are:

    NOP-OUT to probe sequence numbers of the target

    Command retry

    Recovery R2T support

    Requesting retransmission of status/data/R2T using the SNACK facility

    Acknowledging the receipt of the data

    Reassigning the connection allegiance of a task to a different TCP connection

    Terminating the entire iSCSI session to start afresh

    For outstanding SCSI commands, it is assumed that iSCSI, in conjunction with SCSI at the initiator, is able to

    keep enough information to be able to rebuild the command PDU, and that outgoing data is available in host

    memory for retransmission. At the target, incoming data (read data) may be kept for recovery or it can be

    reread from a device server.

    iSCSI Overview, 75

    Target Error Recovery Mechanisms

  • 8/10/2019 Intro to Iscsi

    77/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    75

    The target mechanisms defined in connection with error recovery are:

    NOP-IN to probe sequence numbers of the initiator

    Requesting retransmission of data using the recovery R2T feature

    SNACK support

    Requesting that parts of read data be acknowledged

    Allegiance reassignment support

    Terminating the entire iSCSI session to force the initiator to start over

    A target will keep the "status & sense for a command it has executed if it supports status retransmission. A

    target that supports data retransmission is expected to be prepared to retransmit the outgoing data (i.e., Data-

    In) on request until either the status for the completed command is acknowledged, or the data has been

    separately acknowledged.

    iSCSI Overview, 76

    Module Summary

  • 8/10/2019 Intro to Iscsi

    78/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    76

    ! iSCSI is an IP based storage protocol allowing existingEthernet equipment to be used for Storage Networking

    ! the iSCSI protocol is broken into layers

    ! The iSCSI login process allows for authentication andhigher level processes to proceed

    !

    Data is placed within iSCSI PDUs for transmission! iSCSI maintains error correction within the session

    iSCSI Overview, 77

  • 8/10/2019 Intro to Iscsi

    79/80

    EMC Global Education 2004 EMC Corporation. All rights reserved.

    77

    Closing Slide

    Link to Knowledgelink to update your transcript and indicate that you have completed the course.

    EMC Global Education IMPACT Course Completion

  • 8/10/2019 Intro to Iscsi

    80/80

    1. Logon to Knowledgelink (EMC Learning management system).

    2. Click on 'My Development'.

    3. Locate the entry for this learning event you wish to complete.

    4. Click on the complete icon [ ].

    Introduction to iSCSI - IMPACTCourse Completion Steps:

    2004 EMC Corporation. All rights reserved.

    For questions or support please contact Global Education

    Back to Home

    Note: The Mark Complete button does not apply to items with the Type: Class, Downloadable (AICC Compliant)

    or Assessment Test. Any item you cancel from your Enrollments will automatically be deleted from your

    Development Plan.

    Click here to link to Knowledgelink

    mailto:[email protected]://origin-knowledge.isus.emc.com/SabaWebhttp://origin-knowledge.isus.emc.com/SabaWebmailto:[email protected]://origin-knowledge.isus.emc.com/SabaWeb