Beruflich Dokumente
Kultur Dokumente
Overview
By providing an overview of the Fibre Channel Protocol, students will be better suited to learn the concepts and functions of the Cisco MDS 9000 Family switches. These switches are used to create a Fibre Channel-based storage area network (SAN) and offer specific tools to manage and troubleshoot Fibre Channel switched fabric networks.
Objectives
This lesson teaches you to identify and describe the characteristics and structure of the Fibre Channel protocol, in order to demonstrate the fundamental knowledge needed to study the installation, configuration, and troubleshooting of Fibre Channel-based systems, given questions related to specific aspects of this protocol. Upon completing this lesson, you will be able to: Describe Fibre Channel protocol basic characteristics and structure Explain the protocol layers of Fibre Channel Explain the Fibre Channel frame format Explain the addressing scheme for Fibre Channel Explain the functions of Fibre Channel services Explain the functions of the Fibre Channel Name Server Explain the Fibre Channel fabric and port login processes Explain the Fibre Channel exchanges and sequences
Explain the Fibre Channel flow control methods Explain the classes of service in an Fibre Channel network
Outline
This lesson includes these sections: Overview Fibre Channel Protocol Basics Fibre Channel Protocol Layers Fibre Channel Frame Format Fibre Channel Addressing Fibre Channel Services Fibre Channel Name Server Fibre Channel Fabric and Port Login Fibre Channel Exchanges and Sequences Fibre Channel Flow Control Fibre Channel Class of Service Summary Lesson Review
1-34
Fibre Channel - An integrated set of ANSI standards developed to combine the best characteristics of both Network I/O and Channel I/O. Additionally, Fibre Channel overcomes the physical and protocol limitations of SCSI. Fibre Channel is a bi-directional, point-to-point, serial data channel. It provides a general transport mechanism for Upper Layer Protocols (ULP); e.g., SCSI, IP, HIPPI, etc.
Fibre Channel is a bi-directional, point-to-point, serial data channel that provides a general transport mechanism for ULPs such as SCSI, IP, and HIPPI. Fibre Channel was introduced in order to overcome the physical and protocol limitations of SCSI, which is limited by distance, speed, number of storage devices per chain, resiliency, lack of device sharing, and management flexibility. Fibre Channel offers a greater sustained data rate (1 or 2 G bps; 10 G bps, future), loop or switched networks for device sharing and low latency, distances of 10 km or greater with extension devices, virtually unlimited devices in a fabric, non-disruptive device addition, and centralized management with local or remote access.
1-35
Networks
Connectionless Logical Circuits Unreliable Transfers High Connectivity Higher Latency Longer Distance Software intense
Fibre Channel
High Data Rates 1 and 2Gbps Circuit and Packet Switched Reliable Transfers BER<10-12
Low Latency Dedicated Bandwidth High Connectivity 24 bit address Media Options Copper or Fiber
A channel provides a direct or switched point-to-point connection between the communicating devices, typically hardware intensive, and transports data at high speed with low overhead. A network is an aggregation of distributed nodes (like workstations, file servers, or peripherals) with its own protocol that supports interaction among these nodes. A network has a relatively high overhead since it is software intensive and, consequently, slower than a channel. Networks can handle a more extensive range of tasks than channels as they operate in an environment of unanticipated connections, while channels operate among only a few devices with predefined addresses. Fibre Channel attempts to combine the best of these two methods of communication in a new I/O interface that meets the needs of both channel and network users. Fibre Channel's purpose is to provide a means for the high-speed transfer of data in a serial link between supercomputers, mainframes, workstations, desktop computers, storage devices, displays, and other peripherals. The Fibre Channel protocol does not have its own command set; it simply manages the data transfer between nodes and thus interoperates with existing upper-level protocols. Fibre Channel (FC) is an ANSI standards-based, layered architecture running at 1.0625 Gbps (100 MBps) or 2.125 Gbps (200 MBps) with a bit error rate of < 10-12. An 8 bit byte to 10 bit character (1 Byte) data encoding process is performed on all data. A BER of 10-12 may seem like an extremely low error rate; it simply corresponds to one error every 16.6 minutes at 1.0625Gbps. FC has a copper distance limit of approximately 13 to 30 meters over twisted pair. The longer distance requires an active interface, which helps smooth the signal. (I.e. DB-9 and HSSDC). FC can be transmitted over fiber optic distances of up to 550 meters using short wave
1-36 MDS 9000 Configuration and Troubleshooting (MDSCT) v1.0 Copyright 2003, Cisco Systems, Inc
multimode fiber (MMF) and 10 km over long wave single-mode fiber (SMF). These distances can be extended with various types of networking devices and transports, which are discussed elsewhere.
1-37
SBCCS Others
Common Services Signaling Protocol Transmission Protocol Interface (Transmitter & Receiver) FC-PI Media
Link Services
Fibre Channel has an ANSI-based layered architecture that can be considered a general transport vehicle for ULPs (such as SCSI command sets, HIPPI data framing, IP and others). The Physical interface (FC-0) consists of transmission media, transmitters, and receivers and their interfaces. FC-1 defines the transmission protocol that includes the serial encoding, decoding, and error control. The signaling protocol (FC-2) specifies the rules, and provides mechanisms needed to transfer blocks of data end-to-end. FC-2 functions include several classes of service, frame format definition, sequence disassembly and reassembly, exchange management, address assignment, alias address definition, protocols for hunt group and multicast management, and stacked connect-requests. FC-3 provides a set of services that are common across multiple Nx_Ports of a node. Specifications exist here but are rarely implemented. FC-4 is the highest level in the Fibre Channel standards set. It defines the mapping between the lower levels of the Fibre Channel and the IPI and SCSI command sets, the HIPPI data framing, IP, and other ULPs. Fibre Channel provides a method for supporting a number of ULPs. The link services represent a mandatory function required by FC-2.
1-38
Transmission Word
Group of four transmission characters
A transmission character is the lowest level in the hierarchy and it uses an 8b/10b encoding scheme for every byte of data transmitted. By using this encoding scheme it helps to improve the characteristics of transmitted information, provides adequate transitions to make clock recovery at the receiver, improves the detection of bit errors, and helps achieve word alignment with the use of special transmission characters. A transmission word is a group of four consecutive transmission characters. Some transmission words have a special transmission character in the beginning that indicates the word is an ordered set. These can be frame delimiters or convey information between frames. Examples are start of frame, end of frame, idle, receiver ready, loop initialization, open, and close. A Fibre Channel frame is variable in length, up to 2,148 bytes, with a payload up to 2,112 bytes. The total frame size must be an even multiple of 4 bytes so that no partial transmission words can be sent out. Pad bytes of between 0 and 3 are added to the end of the payload to ensure this need. Start of frame (SOF) and end of frame (EOF) delimiters mark the beginning and end of the Fibre Channel frame, which also has a 32-bit cyclic redundancy check (CRC) for error detection. A Fibre Channel sequence is a series of one or more related FC frames transmitted unidirectionally between two ports. All frames are part of a sequence and frames within the same sequence contain the same sequence ID (SEQ_ID). A sequence count (SEQ_CNT) field identifies individual frames within a sequence and is incremented by 1 for each frame transmission. This enables proper frame order and verification that all frames have been received.
1-39
A Fibre Channel Exchange is a series of one or more non-concurrent sequences between two ports. Sequences can be in either direction and must be part of an exchange. An OX_ID field is assigned by the exchange originator and the RX_ID field is assigned by the exchange responder. Analogy Transmission characters=letters; transmission words=syllables; Fibre Channel frames=words; Fibre Channel sequences=sentences; and Fibre Channel exchanges=conversations.
1-40
Arbitrated Loop
FC-AL Arbitrated Loop FC-AL-2 2nd Generation AL FC-AL-3 3rd Generation AL FC-PLDA Private Loop Attached
Generic Services
Fabric
FC-SW Switched Fabric FC-SW-2 2nd Generation SF
Fibre Channel is structured by a lengthy list of standards. This illustration names just a few. Like other protocol standards, Fibre Channel builds up from the physical and signaling level. This foundation branches up and out to include different topology structures (i.e. arbitrated loop or switched fabric), specifies formats for generic services, and deals with the mapping of upper layer protocols (UPLs). There are numerous other FC standards that cover other areas of networking and are governed by the Technical Committee T11 at www.t11.org.
1-41
Fibre Channel Standard Port Types Fibre Channel Standard Port Types
N_Port: (Node)* F_Port: (Fabric)* NL_Port: (Node/Loop)* FL_Port: (Fabric/Loop)* E_Port: (Expansion)* B_Port: (Bridge) G_Port: (Generic)
Client
NL_Port
Server
NL_Port
G_Port
F_Port
N_Port
Host
Fabric Switch
B_Port F_Port N_Port Storage
* Cisco supported
F_Port
F_Port
N_Port
Server
N_Port Client
An N_Port (Node) connects to another N_Port for point-to-point operation or to an F_Port in a switched fabric. An F_Port (Fabric) resides on fabric switches and connects to devices configured as an N_Port. An NL_Port (Node/Loop) is an attached arbitrated loop (AL) device configuration when connected to a fabric switch. An FL_Port (Fabric/Loop) is a fabric switch port configuration when an AL device is connected. An E_Port (Expansion) is a connection between fabric switches, typically over extended distances (> 10km) and utilizes an internal service link (ISL) facility for communication. A B_Port (Bridge) is a subset of the E_Port, used on bridge devices that interconnect over backbone WAN like ATM or SONET. A G_Port (Generic) is a port configuration that can be used as either a node attachment or expansion port (not common).
Note Auto Mode on the Cisco MDS 9000 is similar to the G_Port configuration but is not a standard port type.
1-42
Fibre Channel Enhanced Port Types Fibre Channel Enhanced Port Types
Unique to Cisco:
SD_Port (SPAN Destination) TE_Port (Trunking) TL_Port (Translative)
Private Loop F port Host FL port Public Loop EISL TL port E port TE port Port Channel ISL E port JBOD Disk Array
TE port SD port
FC Analyzer
The figure lists FC enhanced port types, which are unique to Cisco. SD_PortSPAN Destination. Fabric port set up to be the capture port for switched port Analyzer (SPAN) traffic. TE_PortTrunking E_Port. An E_Port capable of carrying multiple VSANs. TL_PortTranslative Loop. Attached arbitrated loop device that is not fabric aware but can talk to fabric ports. A TL Port makes a select set of fabric devices appear as private devices on the loop and makes it also appear to devices on the private loop that they are talking to an on-loop device when in fact they are talking to an off-loop device. It makes devices on the private loop appear as public devices to rest of the fabric. Mechanisms independent of nature of fabric device: N_PORT, public NL_PORT or another private NL_PORT made visible through translation.
1-43
Fibre Channel Fabric And Port Login Fibre Channel Fabric And Port Login
Initiator
Target
FC Switch
Login Server FFFFFE Name Server FFFFFC
Port Login
In order for any device or switch in the network to be recognized as part of the SAN fabric it must first login. The first login session is called Fabric_Login or FLOGI. The FLOGI command exchange is initiated between the Node (device) and the Login_Server, which resides in the fabric FC switch that the node is connected to. Once the FLOGI is accepted the node can move on to Port_Login or PLOGI. The PLOGI command exchange is initiated between the node and the Name_Server, which also resides on the FC switch and appears as a N_Port. Port parameters are exchanged at that point. These login processes result in the devices having an established fabric and Fibre Channel sessions. The PLOGI process is repeated between the initiator and target so that the storage device can be seen by the host as a valid and connected entity for sending data to. This requires an additional login called Process_Login or PRLI. When the PRLI command is accepted the two devices can request a process like an FC-4 session so the initiator can start sending SCSI commands. FLOGIN_Port to Fabric login PLOGIN_Port to N_Port login PRLIFC-4 process to FC-4 process login
1-44
Naming is part of the overall addressing structure for Fibre Channel SANs and is needed for device identification within the Fibre Channel fabric. Similar to the 48-bit MAC address used in an Ethernet environment, Fibre Channel IDs (FC_IDs) are used to identify the source and destination device ports. The fabric switch dynamically assigns a 24-bit port address, FC_ID, or N_Port_ID to devices as they login. A destination identifier (D_ID) and source identifier (S_ID) are embedded into the Fibre Channel frame header for routing purposes. However, World_Wide_Names, which are also a form of fibre channel device identification, are not used for transporting frames or routing. A node is a communicating device, typically one physical interface, which is referenced to as a Node Port or N_Port. Each node has a Node_Name, which is assigned by the manufacturer (64-bit or 8-byte). When a Node_Name is formally registered with IEEE it is considered globally unique and referred to as a node World-Wide Name (nWWN). These are eight hexadecimal numbers separated by colons. A Port_Name is a unique name for a node port (N_Port) within a parent Node (64-bit or 8byte), which allows each node and its associated N_Port to be unique. When a Port_Name is formally registered with IEEE it is considered globally unique and referred to as a port WorldWide Name (pWWN). These are also eight hexadecimal numbers separated by colons. A Fabric_Name is the unique identity of the principal fabric switch (64-bit or 8-byte) within a SAN, which is also assigned by the manufacturer and uses the same format.
1-45
A World Wide Name has two components, pWWN and nWWN. WWN is a unique number format assigned by the Name Assignment Authority (NAA). Other name formats, not following these unique formats, are called Fibre Channel Names (FCN).
1-46
Port_Name
Node_Name
Principal Fabric Switch
E_Port F_Port N_Port
Node
Port_Name
2003, Cisco Systems, Inc. All rights reserved.
Port_Name
Deploying MDS 9000 Systems v1.0Module 1, Lesson 2 - 14
Fibre Channel names are used primarily for identification of the fabric, nodes, and ports within the SAN fabric. Independent of any ULP or OS Information logged into Name_Server Port query, logs, and soft zoning Principal Switch WWN is the Fabric_Name. Selection of a unique Principal Switch within a fabric is through Exchange Fabric Parameters (EFPs), based on lowest priority and if same, lowest local switch WWN (VSAN WWN), when there are at least two switches forming a fabric and lasts for 2*FSTOV (= 10) seconds. Domain ID Allocation and Distribution Principal switch allocates unique domains to all switches in the fabric. Allocation of a maximum of 239 domains. Identification of Principal Links (Upstream + Downstream ports), across which domain requests are propagated. Distributing the allocated list of domains by the Principal Switch across the fabric. FC_ID allocation: Allocate and free up FC_IDs based on requests. A single FC_ID (~64k FC_IDs) for F/N ports. An Area (256 FC_IDs) for FL ports (and for some F_Ports because of interoperability issues). Freed FC_IDs can be cached based on the corresponding WWNs. The same FC_ID is allocated for a given WWN on a best-effort basis.
1-47
A World Wide Node Name uniquely identifies each device. A World Wide Port Name uniquely identifies each port in that device. VSIDVendor Specified ID. First four bits identify the Name Assignment Authority (NAA). Remaining 60 bits are determined by the format in NAA ID field. The 48 LSBs are based on IEEE 802.1A Universal LAN MAC Address (ULA) and become the IEEE Organizational Unique ID (OUI). For a complete list of NAA identifiers, refer to pg 113 of FC-PH rev 4.3.
1-48
Point-to-Point
N-port N-port SD-port TE-port F-port N-port
Switched Fabric
NL-port
NL-port
N-port
N-port
N-port
N-port
N-port N-port
Arbitrated loop (AL) networks are based on loop hubs and/or fabric switches that have loop capabilities. Bandwidth is shared equally between all connected devices of which there is a limit of 126. The more active devices connected the less available bandwidth. AL is the most deployed topology of SANs but Fabric deployments are growing and becoming the preferred method because of the equal bandwidth allocation to each connection is at line speed and the flexibility in network topologies. However, fabrics are more complicated to configure and manage. Switched fabrics have a theoretical address support for over 16 million connections, compared to AL at 126, but that exceeds the practical and physical limitations of the switches that make up a fabric. Nonetheless, switched fabric networks have more flexibility in their topologies and can be configured to support zoning, which is a form of VLAN in the Fibre Channel world.
1-49
bandwidth but does require acknowledgement of frame delivery Mission critical applications (data integrity) or small data transactions (bursty traffic) Similar to UDP/IP datagram, which relies on upper-level protocols Most commonly used
Various classes of service are set up between end points in order to ensure proper data transport, based on application. Class of service is established between connecting devices during the initial call setup. Class of ServiceApplication examples: Class 1Streaming data for tape backup or video requires dedicated connection with sustained full bandwidth. Class 2Online Transaction Processing (OLTP) or relational database transactions require acknowledgments of frames but not dedicated bandwidth. Commonly used behind Class 3. Class 3Sacrificed reliability for reduced overhead and better performance. Widely used in arbitrated loop networks because of temporary dedicated connections and in-order delivery with this topology. Class 4Time-sensitive applications with support for multiple virtual circuits (VCs) between connections and variable QoS requirements for each VC (example: Real-time video broadcasts). Class 6Video Broadcast applications from central video server and multiple video recipients. (Multicast)
Note Class (5) exists but is not defined.
1-50
Fibre Channel Protocol (FCP) layers are similar to those of the OSI model where it starts with the lower level physical connections and runs up through the upper layer protocol. FC-0 and FC-1 can be thought of as the physical layer, where FC-2 is similar to the Media Access Control (MAC) layer or the lower part of the data link layer in the OSI model. FC-3 is under development for devices that have more than one port such as for striping, where data is transmitted out all ports at the same time in order to increase bandwidth. FC-4 defines how upper-layer protocols are mapped onto and transmitted over Fibre Channel, similar to the transport layer in the OSI model. ANSI standards-based, layered architecture: FC-0Physical interface (copper or optical), signaling, and media and transmitter/receiver specs. FC-1Link level control and data encoding, 8 bit byte to 10 bit character (1 Byte), and Link maintenance. FC-2Format, segmentation, reassembly of frames, flow control, and class of service (frame format, sequence and exchange management, login/logout, flow control and class of service, and segmentation and reassembly of frames). FC-3Common services and services for multiple ports on the same node.
1-51
FC-4Upper-layer protocol interface between FC and other protocols (SCSI-3, IP, HIPPI, ATM-AAL5, etc.) SCSI-FCP (Fibre Channel Protocol for SCSI-3).
1-52
LCF
Rx Inbound Link
2003, Cisco Systems, Inc. All rights reserved.
LCF
Inbound Rx
The FC-PI standard describes the physical link, the lowest level in a Fiber Channel system. A link is composed of two unidirectional optical fibers or four electrical wires. The link never stops carrying the data. When two ports are not communicating data they send idles to each other, making sure that the link stays active. LCF = link control facility. FC-0 does not detect transmit code violations, invalid ordered sets or any alteration of encoded bit stream. A hardware facility that attaches to an end of a link and manages transmission and reception of data. It is contained within each FC_Port. Before a link comes up, Port A must send to Port B AND Port B must send to Port A, PLUS additional link initialization steps. Cable Types: Electrical (varieties of shielded and unshielded Twisted Pair) Optical fibers (single or multiple mode) Single mode is 9 microns with loss budget of 14db, over a distance of 10KM Multimode is 50 or 62.5 microns with a loss budget of 6db, over a distance of 500m Media Converters: MIA (Media Interface Adapter) Hot or non-hot pluggable External converters
1-53
GBICS: Electrical or optical General laser transmitter characteristics are specified in the form of transmitter eye diagram mask. These includes rise time, fall time, pulse overshoot, undershoot and ringing. All of them shall be controlled to prevent signal degradation. If its electrical, there will be two RX and two TX wires.
1-54
Fibre Channel layer FC-1 provides three primary functions: Encoding and decoding the 8b/10b data transmission code scheme patented by IBM Ordered sets, which provide unique transmission words for signaling and control functions Implementing link level protocols
1-55
Driver/Transmitter
Parallel Input
Serial Output
Media Output
8-bit data bytes are encoded into 10 bit transmission words. Bit synchronization is easier to achieve Receiver and transmitter design is simplified Provides error detection at layer 1 Distinguish control and data characters The primary reason to encode is to improve the transmission characteristic of information. Ensures that sufficient transitions are present in serial bit stream so clock recovery is possible. Increases the likelihood of detecting single or multiple bit errors that may occur. Some of the special character patterns assist in word alignment. Maintain a balance between ones and zeros transmitted, ensuring that the receiving signal is free of any DC-component (running disparity) To prevent excessive DC-component and run length problems, only characters containing six ones and four zeros, five ones and five zeros and four ones and six zeros are allowed. The rest are invalid characters. Transmission characters always have either:
1-56 MDS 9000 Configuration and Troubleshooting (MDSCT) v1.0 Copyright 2003, Cisco Systems, Inc
6 ones and 4 zeros = Positive disparity 4 ones and 6 zeros = Negative disparity 5 ones and 5 zeros = Neutral disparity The CRD is fed back to the encoder to select appropriate encoding of the next character to balance number of ones and zeros. Normally a word consists of four 8 bit bytes (32 bits). When each 8 bit is encoded prior to the transmission, the resulting word consists of 40 bits representing four 10 bit transmission characters.
1-57
Primitive Signals
Frame Delimiter Start-of-Frame End-of-Frame
Fill Word
IDLE ARB(x) ARB(F0) ARB(FF)
Non-Fill Word
R_RDY VC_RDY CLS OPN DHD MRK(Tx) SYN x,y,z
Primitive Sequence
Not Operational (NOS) Offline (OLS) Link Reset (LR) Link Reset Resp (LRR) Loop Init (LIP) Loop Port Bypass (LPB) Loop Port Enable (LPE)
A Fibre Channel transmission word consist of an ordered set of four transmission characters. Ordered sets are used to distinguish between Fibre Channel control information from data. They also provide bit and word synchronization. An ordered set is a transmission word starting with a K28.5 special character. This is a 10-bit character that doesnt have a corresponding 8-bit value. It has a 7-bit value and is the only transmission character to have (5) 1s or (5) 0s in a row. Frame DelimiterUsed to mark the beginning and end of the frame. It also marks the first and last frame along with the Class of Service. Primitive SignalsWhen there is no data on the wire, fill words are used to maintain synchronization. Also indicates events or actions. Primitive SequenceUsed to establish and maintain the link. Indicates state changes.
1-58
SOF is used to: Mark the beginning of the frame Indicate whether it is the first frame of the sequence Indicate the class of service EOF is used to: Mark the end of frame Indicate the last frame of sequence Indicate the class of service EOF has both negative and positive running disparity, ensuring that every frame ends with negative running disparity. CRD is forced negative by EOF and remains negative after each ordered set.
1-59
Primitive signals indicate events at the sending port and are entities that can be Fill words like ARB (Attribute) or IDLE (Idle), or Control words like R_RDY (Receiver Ready), OPN (Open), or CLS (Close). The FC-AL, FC-PH, and follow-on standard enhancements define these signals for the different port events.
1-60
Job Aid: List of Primitive Signals Job Aid: List of Primitive Signals
Primitive Signal Abbr. Document
ARB(x) ARB(F0) ARB(FF) SYNx SYNy SYNz CLS DHD IDLE MRK(tx) OPN(yx) OPN(yy) OPN(fr) OPN(yr) R_RDY VC_RDY
FC-AL FC-AL FC-AL2 FC-PH3 FC-PH3 FC-PH3 FC-AL FC-AL2 FC-PH FC-AL FC-AL FC-AL FC-AL FC-AL FC-PH FC-PH2
Clock Sync X Clock Sync Y Clock Sync Z CLOSE Dynamic Half Duplex Idle Mark Open Full Duplex (pt-pt) Open Half Duplex (pt-pt) Open Broadcast Replicate Open Selective Replicate Receiver Ready Virtual Circuit Ready
2003, Cisco Systems, Inc. All rights reserved.
This job aid provides a list of the primitive signals, their abbreviations, and the FC standard document that defines them.
1-61
Primitive sequences are used to establish and maintain a link between two fibre channel ports. These sequences continue to be transmitted until a response has been received and the link becomes active.
1-62
Example: Primitive Sequences Link Recovery Example: Primitive Sequences Link Recovery
Currently Transmitting NOS OLS Non Operational State Link Failure Offline State Internal Port Failure Transmitter Power Down, Perform Diags, or Perform Initialization Receiver shall ignore Link Error or Link Failure LR Link Reset Remove Class_1 Connection Reset F_Port OLS Recognized LRR IDLE Link Reset Response Link Reset Recognized Operational Link Idles and R_RDY Recognized IDLE IDLE LRR LR Meaning Transmit in Response OLS
This example illustrates the primitive sequences for a link recovery between two fibre channel ports after a link failure.
1-63
Fibre ChannelLink Failure, Recovery, and Initialization Fibre Channel Link Failure, Recovery, And Initialization
Port A Port B
AC
NOS
Initialize Offline
LF1 OL1
LR
OLS
LR2
Idle
LRR
LR3
Idle
AC
Active
AC
An N_port or F_Port might be in one of four primary operational states and associated substate depending on the state of the port. 1. Active state 2. Link recovery state LR transmit substate (LR1) LR receive substate (LR2) LRR receive substate (LR3) 3. Offline state OLS transmit substate (OL1) OLS receive substate (OL2) Wait for OLS substate (OL3) 4. Link failure state NOS receive substate (LF1) NOS transmit substate (LF2)
1-64
Fibre Channel layer FC-2 provides six primary functions; frame format and structure, login/logout sessions between ports, sequence management, exchange management, flow control, and class of service.
1-65
Data Field
Optional Header
CRC (4B)
EOF (4B)
Idles
(24B)
Word 0 1 2 3 4 5
Byte 2
Byte 0
DF_CTL
SEQ_CNT RX_ID
OX_ID Parameter
Start of Frame (SOF)Single 4-byte word that describes the class of service used and if it is one frame only or the first of a series of frames. Frame Header (24-bytes)CLT (Control Field) Frame Content/Control Information, S_ID (Source) and D_ID (Destination) Addressing, Type: Data Type (Command, Control or Content), and Seq_Cnt, Seq_ID, Exchange_ID (Position within a series) Data Field(0 to 2,112 bytes or 0 528 words) Optional 64-byte Header and Variable data length framing format allows for various application requirements while balancing overhead and payload. Frame padding occurs here when data is not divisible evenly by 4-bytes. Fill bytes are added for proper frame assembly. Cyclic Redundancy Check or CRC Error Check (4-bytes or 32-bit)Verifies data integrity within the frame. Note that CRC is run before data goes through the 8bit to 10bit encoder and the CRC is itself encoded later as part of all the frame contents. End of Frame (EOF)Notification that the frame is complete. Specific EOF is determined by the Class of Service and sequence with other frames. Minimum size of an FC frame is 36 bytes. Maximum size is 2,148 bytes or 1 Buffer Credit. Link utilization is maximized by the use of frame sequences and exchanges between communicating devices. This also reduces the overhead needed for setting up and tearing down
1-66
of logical connections. Error correction is limited to the sequence level in Fibre Channel. A failed CRC means an entire sequence of frames are retransmitted rather than track for an individual frame, thus further minimizing overhead during frame transport. All FC-2 frames follow the frame format shown above. An FC-2 frame is composed of a SOF delimiter, frame content, and an EOF delimiter. The frame content is composed of a Frame_Header, Data_Field, and CRC. Unless otherwise specified, the term frame refers to a FC-2 frame. The FC Standard refers to transmitting at least two consecutive IDLE words after the End of Frame (EOF) and also a port must transmit six primitive signals between each EOF and next SOF, at least four of them must be IDLE words. FC does not recognize any unit of data less than a word. Hence if the payload does not end on the word boundary, fill bytes are used. The maximum number of fill bytes used is 3 to comply with the Fibre Channel requirements.
1-67
Byte 2
16 15
Byte 1
8 7 D_ID 24bits Destination_ID S_ID 24 bits Source_ID F_CTL 24 bits
Byte 0
0
0 1 2 3 4 5
R_CTL Routing CS_CTL 8 bits Class Spec. TYPE 8 bits Data Structure SEQ_ID 8 bits Sequence_ID
Frame_Control
Routing Control (R_CTL) is a one byte field that contains two four-bit sub fields. Routing (bits 31 28) 0000Device_Data frame 0010Extended Link_Data Frame 0011FC-4 Link_Data Frame 0100Video_Data Frame 1000Basic Link_Data Frame 1100Link_Control Frame OthersReserved Information (bits 27 24) 0000Uncategorized information 0001Solicited Data 0010Unsolicited Control 0011Solicited Control 0100Unsolicited Data 0101Data Descriptor 0111Command Status
1-68
OthersUnspecified Routing Bits differentiate frames based on function or service within an N_Port or F_Port. Video data frames contain payload information, while the Link_Data frames contain request and reply commands. The information field is dependant on the Routing field value. TYPE is a one byte field that identifies the protocol that is being carried by the frame when the frame is Data Frame (FT-1). For Link Control Frame (FT-0), the TYPE field is reserved. Type values assigned to a number of FC documents to implement document specific protocol: x00Basic Link Services, x01Extended Link Services, x05IP over FC (RFC-2625), x08SCSI FCP, x20FC-GS, x25SNMP Each N_Port has a native N_Port Identifier, which is unique within the address domain of a Fabric. An N_Port determines its address FC_identifier during the login process. Address Identifiers in the range of xFFFFF0 xFFFFFF are well known addresses and reserved for the following functions. FFFFF0 FFFFF9Reserved; FFFFFAManagement Server; FFFFFBTime Server; FFFFFCDirectory Server; FFFFFDFabric Controller; FFFFFEFabric Login Server; FFFFFFBroadcast. S_ID, D_ID, SEQ_ID, and SEQ_CNT together uniquely identify the frame.
1-69
If present the, Network_Header is the first 16 bytes of the data field and is only present in the first data frame of the first sequence. The Network_Header may be used for routing between Fibre Channel networks of different Fabric address spaces, or Fibre Channel and non-Fibre Channel networks. The Association_Header is provided to support system architectures that require more than two levels of identifiers, (i.e., X_ID and SEQ_ID) and is only present in the first data frame of the first sequence. The contents of the Device_Header are controlled by the ULP. If the Device_Header is present, it will be either in the first Data frame or in all Data frames of a Sequence. If a Device_Header is present for a ULP that does not require it, the related FC-4 may reject the frame with the reason code of TYPE not supported.
1-70
8 bits
8 bits
Area 00 Area 00
24-bit addressing scheme enables us to a maximum of more than 16 million addresses. However, some of the addresses are reserved for specific services. In point-to-point topology the address is assigned by the N port with Higher MAC address In case of private arbitrated loop topology, only the lowest 8 bits are used, which limits us to have only 127 devices. The FC_ID is acquired during loop initialization. The switch fabric topology uses all 24 bits for addressing and the address is assigned by the fabric when Nx_port login. When two ports communicate, the destination and source ID are contained in the header and routing decision are made based on the destination ID field. A Fibre Channel ID is logically broken into three elements: Domain, Area and Port. The Domain field represents one or more switch in a single domain but in most of the current manufacturers implementation, the domain field represents a single switch and hence each switch has its own domain. Domain Controllers are assigned the reserved N_Port address FF FC xx (xx = Domain_ID) The Area_ID field represents N_Ports, within and attached to a single switch or an Arbitrated loop of NL_Ports attached to a single FL_Port. A single Arbitrated loop shall have exactly one single Area ID.
Copyright 2003, Cisco Systems, Inc Network Storage Technology Overview 1-71
A Port_ID represents: a single N_Port within a Domain/Area; the valid AL_PA of a single NL_Port or FL_Port on an arbitrated loop.
00-FF 00-FF 00-FF 00-FF 00-FF 00 01-EF F0-FF 00-FF 00-EF F0-FC,FF FD FE
Description Used during FLOGI Private Loop NL_Port Reserved Reserved N_Port & E_Port. Port_ID=00 for FL port for public devices 255 address Reserved Reserved Multicast & Broadcast Reserved N_Port of domain controller. Port_ID is the Domain_ID Reserved Reserved Reserved Well Known Address N_Port of fabric controller Fabric F_Port, Fabric Login database
Deploying MDS 9000 Systems v1.0Module 1, Lesson 2 - 37
N_ports and E_ports get one port ID. F ports dont get any IDs. FL ports in public AL gets 0x00 port ID. The FC Well Known Addresses are reserved for special functions. Each of these functions reside within the switch.
1-72
Fibre Channel Level 2 Frame Structure FC-2 Fibre Channel Level 1 Ordered Sets FC-1
Exchange & Sequence Mgmt. Class of Service & Flow Control 8b/10b Encode/Decode Link Control Protocols Physical Interface
Basic link service commands support low level functions like aborting a sequence (ABTS) and passing control bit information. Login is not required prior to a Basic Link Services command. Basic link service timeout is 2 * R_A_TOV (Resource Allocation Time Out Value). The ABTS frame shall be used by the Sequence Initiator a) to request that the Sequence Recipient abort one or more Sequences. b) or Sequence Recipient to request that the ABTS Recipient abort the entire Exchange. Extended Link Services (ELS) are performed in a single exchange. Most of ELSs are performed as a two sequence exchange. A request from the originator and a response from the responder. ELS service requests are not permitted prior to a port login except the fabric login or FLOGI. A sequence initiator shall transmit an ELS sequence in order to solicit the destination Nx_Port to perform a link-level function or service. Unless otherwise noted, Extended Link Service requests shall not be issued prior to completion of N_Port Login. ELS Command Examples: N_Port Login (PLOGI), F_Port Login (FLOGI), Logout (LOGO), Process Login (PRLI ), Process Logout (PRLO), State Change Notification (SCN), Registered State Change Notification (RSCN ), State Change Registration (SCR), Loop Initialize (LINIT).
1-73
Generic Services include: Directory Service, Management Services, Alias Services, Time Services, and Key Distribution Services. FC-CT (Fiber Channel Common Transport) protocol is used as a transport media for these services. FC-GS shares a Common Transport (CT) at the FC-4 level and the CT provides access to the services. Port login is required for generic services.
1-74
Logout
Login sessions are long-lived and last for multiple exchanges depending on the application
2003, Cisco Systems, Inc. All rights reserved. Deploying MDS 9000 Systems v1.0Module 1, Lesson 2 - 40
Two Extended Link Services (ELS) are Login and Logout. The login procedure is a method by which an Nx_Port establishes its operating environment with a Fabric, if present, and other destination Nx_Ports with which it communicates. Once login has occurred the port can begin exchange of parameters. Fabric Login and Port Login are both accomplished with a similar procedure using different D_IDs and possibly different S_IDs. Process login used to connect to Upper Layer Protocol (ULP). After the login session a port may originate or respond to exchanges. A Port that originates an exchange is the Exchange Originator and a port that replies to an exchange is the Exchange Responder. A port may have multiple open Exchanges to one or multiple other ports. One or more Information Units are transported during an exchange. The First_Sequence bit in F_CTL field of the frame header alerts the receiving port that a new exchange is being originated. A port must establish a login session before performing upper-level operations. The login session may be established implicitly or explicitly by using port login ELS. After the login process, all information is transferred within the context of an open exchange. Exchanges are never created unless there is information unit to send. Logout/login sessions are long-lived and last for multiple exchanges, depending on the application.
1-75
FC-CT IUs also keep track of sequence management, error detection, and recovery
2003, Cisco Systems, Inc. All rights reserved. Deploying MDS 9000 Systems v1.0Module 1, Lesson 2 - 41
Fibre Channel generic services share a common transport (CT) at the FC-4 level. The CT provides access to a service (e.g., Directory Service) with a set of service parameters. It also provides another level of multiplexing that simplifies the server-to-server communication for a distributed service. Fibre Channel generic services do not require a high performance communication channel as do high performance I/O protocols such as SCSI, IP, VI, etc. Generic services facilitate the transfer of status and configuration info between FC devices. FCCT IU (Fibre Channel Common Transport Information Unit) is the common FC sequence used to transfer information between a client and a server. CT-IU also keep tracks of sequence management & error detection and recovery. Information that a FC-CT IU delivers: Type of ServiceName Service (FC), Alias Service (F8), Management Service (FA), Time Service (FB), Key Service (F7), and Vendor Unique (00-1F) Type of TransactionRequest for Service by a ClientFirst Seq of a exchange, Response from server for a servicelast Seq of an exchange, and Unsolicited IU about an event Mode of TransactionSynchronous or asynchronous for multiple request. (asynchronous mode is always used for unsolicited IU) Class of ServiceClass 1, Class 2, Class 3, Class 4, or Class 6 and Maximum Size of an IU FC-CT is a protocol used exclusively for use with Fibre Channel generic services defined in FC-GS. It has its own FC-4 mapping. Query is used by the host to get information about other nodes in the fabric from the name server. Register allows a host to put its own information in
1-76
the name server. De-Register removes a hosts entries form the name server. Accept gives requested info back. Reject gives reason (not found, busy, etc.).
Directory ServiceDistributed database service for all nodes and ports connected to the fabric. Name server login information. This service is provided through well-known address hex FFFFFC. Management ServiceAccess to discovered configuration info, including inventory and zone info. Fabric configuration server, fabric zone server, and un-zoned name server fall under this service. All three are separate databases that help with topology discovery, zone configuration, and name server information across the fabric. This service is provided at WKA identifier, hex FFFFFA. Fabric Configuration Server is currently supported by Cisco, Brocade, McData, QLogic, and Inrange. Fabric Zone Server is currently supported by all vendors except Brocade. Alias ServiceManages the registration and deregistration of Alias IDs for both hunt groups and multicast groups. The Alias Service is not involved in the routing of frames for any group. This service may be internal or external to the fabric, but, in either case, it is addressed by means of the well-known address identifier, hexFFFFF8. Time ServiceProvided to serve time information that is sufficient for managing expiration time. This service is provided at the well-known address identifier, hex FFFFFB. Key Distribution ServiceOffers a mechanism for the secure distribution of secret encryption and/or authentication keys. Secure distribution is accomplished through the use of a Key Server that utilizes data encryption techniques and verification protocols. The underlying assumption of this service is that the client contains no keys at start-up other than a distribution key that is unique to the client. This service is provided at WKA identifier, hex FFFFF7. Support of all generic services allows for the discovery and understanding of other attached devices supporting FC-GS-3. (Switches, HBAs, etc.).
Copyright 2003, Cisco Systems, Inc Network Storage Technology Overview 1-77
Fibre Channel name server is used by Nx_Ports to register port attributes or query for directory information on other fabric connected ports. Once registered, other ports attributes are available to that Nx_Port. Each switch contains its own resident Name Server, called a distributed name server (dNS) and each dNS is responsible for the name entries associated with the domain(s) assigned to the switch. A client Nx_Port communicates its Name Service request (as defined in FC-GS-3) to the entry switch via the well-known address (xFFFFFC). The dNS within the local Switch services the request by making any needed requests of other dNSs contained by the other switches, if the required information is not available locally; A dNS may maintain local data copies. Integrity of locally copied data is maintained via Registered State Change Notification (RSCN). This implies that all switches shall distribute RSCN throughout the fabric whenever a change takes place in their local dNS database; The communication between dNSs to acquire the requested information is transparent to the original requesting client; Partial responses to dNS queries are allowed. If an Entry Switch sends a partial response back to an Nx_Port it shall set the partial response bit in the CT (common transport) header.
1-78
Directory Service is used to discover information about Nodes & ports attached to fabric. There are three types of requests defined for the Name Server: Get Object (Query) Register Object (Only one object at a time) Deregister Object (One global de-registration request)
The name server appears as an N_Port located at Well Known Address (WKA) xFFFFFC. The name server is available to other N_Ports and NL_Ports, once they have completed Fabric and Port Login. The port attributes will be registered with the name server after FLOGI. (Node_Name, Port_ID, Port_Name, Port Type, Fabric_Name, and Class of Service) Port attributes: Port Identifier (24 bit Address Assigned by Switch Fabric) Switch Port_Name (World Wide Name) Class of Service (2,3) Port Type (N, NL) Node attributes: Node_Name (World Wide Name)
Copyright 2003, Cisco Systems, Inc Network Storage Technology Overview 1-79
IP Address FC-4 Protocol Support (SCSI,IP) Initial Process Associator Vendor-specific information Registered State Change Notification (RSCN) is used to update any changes to all name servers within a zone. If zone exist, the Name Server restricts access to information within that zone. All name server requests are managed through Request CT_IUs and Response CT_IUs. When a port logout occurs, the Name Server (fabric) deregisters all port objects (attributes) associated with that port.
1-80
Indexed Fields
IP Address (Node)
Initial Process Assoc Symbolic Node Name*
FC-4 Type
Symbolic Port Name*
Port Type
IP Address (Port) Fabric Port Name
Hard Address
FC-4 Descriptor*
FC-4 Features
2003, Cisco Systems, Inc. All rights reserved. Deploying MDS 9000 Systems v1.0Module 1, Lesson 2 - 46
Each N_Port & NL_Port has a primary and secondary key. Port Identifier (primary key) is the FC address identifier dynamically assigned to the port during Fabric Login Clients register with the name server database by sending a registration request containing Port Identifier or Node_Name (FC-GS-3) * implies that the contents of these bytes are not defined and not restricted by the name server. Port type is N_Port, NL_Port. B_Port, E_Port, FL_Port etc. Hard Address is defined in FC-PH-2 in Discovery Address (ADISC) extended link service Separate Query is done for each Name Server Object.
1-81
Fabric Login is used by the N_Port to discover, if a fabric is present. If fabric is present, it provides operating characteristics associated with the fabric. (service parameters like max. frame size) The fabric also assigns or confirms (if trying to reuse an old ID), the N_Port Identifier of the port initiating the login and initializes the BB_Credit value. N_Ports perform fabric login by transmitting the FLOGI extended link service command to the well known address of xFFFFFE of the Fabric F_Port and exchanges service parameters such as; BB_Credit, Maximum Payload Size, and Class of Service supported. The FLOGI Manager supports Fabric Login(FLOGI) and other F, FL mode services as defined in FC-FS, FC-AL-2, FC-MI. FLOGI processing involves the allocation of a FC_ID through the Domain Manager, configuring routes for this FC_ID through the RIB Manager, configuring the zone server and ACL Managers, configuring the firmware with negotiated BB_Credit, registration with the Name Server, and interaction with the Port Manager to update port state. The Response to FLOGI is ACCept which indicates a fabric is present. When an ACC with a S_ID of xFFFFFE is received and OX_ID is same then that means: If the common service parameters indicate that the response came from Fabric, then the FLOGI is complete and the ACC contains the fabrics service parameter. The D_ID contains the N_Port address assigned by the fabric. If the common service parameters indicate that the response came from a N_Port, that means no fabric is present and the Port Login (PLOGI)
1-82 MDS 9000 Configuration and Troubleshooting (MDSCT) v1.0 Copyright 2003, Cisco Systems, Inc
should be performed. If F_BSY or P_BSY is received, the FLOGI originator should retry later. If F_RJT or P_RJT then examine the error code and take appropriate action: Class of Service not supported or Invalid S_ID. If a fabric is not present, it indicates to the requesting N_Port that it is connected to a point-to-point topology.
1-83
Nx_Port Device
S_ID = x000000 or x0000AL_PA D_ID = xFFFFFE FLOGI (Service Parameters) Command = x02 S_ID = xFFFFFE D_ID = xXXXXXX
A new N Port Fabric Login source address 00 00 00, destination address FF FF FE. An existing N_Port Fabric Login source address XX YY ZZ, destination address FF FF FE where XX YY ZZ is the address requesting. Following the link initialization, during FLOGI, the Nx_Port uses the source ID (S_ID) of x000000 or x0000AL_PA, meaning that the port is unidentified. The F_Port responds from Fabric Login Server (xFFFFFE) with assigned N_Port Identifier (xXXXXXX). FLOGI commands contains the Nx_Ports service parameters which includes BB_Credit and the maximum size of the frame. Login with the fabric is required for all Nx_Ports, regardless of the class supported. communication with other Nx_Ports shall not be attempted until the Fabric Login procedure is complete.
1-84
Job Aid: FLOGI Commands And Service Parameters Job Aid: FLOGI Commands And Service Parameters
Bits 31-24
Command 04
Bits 23-16 Bits 15-8 Bits 7-0 00 00 00 Common Service parameters (16 bytes) N_Port Name (8 bytes) Node Name (8 bytes) Class 1 Service Parameters (16 bytes) Class 2 Service Parameters (16 bytes) Class 3 Service Parameters (16 bytes) Class 4 Service Parameters (16 bytes) Vendor Version Level (16 bytes)
This job aid shows the word count in a sequence and bit order within those words for the Fabric Login (FLOGI) commands and service parameters.
1-85
Zone Server
1. Host sends an FLOGI. 2. Port manager gets an FC-ID from Domain manager. 3. Name server adds an entry<FC-ID, PWWN, NWWN>. 4. Zone server programs the permitted list. 5. Switch responds with an ACC. 6. An RSCN (Registered State Change Notification) is generated. Database of attributes of devices: Commonly usedPWWN, FC-ID, FC4-TYPE, Port type. Dynamically updates database as devices join/leave the SAN. Fully compliant with FC-GS3 , FC-SW2 and FC-MI. Maintains a database per VSAN. Maintains all the attributes of the directly connected devices. Maintains most frequently used attributes of the remote devices. Dynamically discovers the initiator/target characteristics. Implements Soft Zoning. The name server should provide non-disruptive service. Upgrading software should not affect the service. The service should be available continuously across restart and switchover. Name server stores its local database entries in a persistent storage. Upon restart/switchover, it queries other switches to get all the remote entries. Recovers FC-4 type and FC-4 features registrations that were in progress during restart/switchover.
1-86
After completing the Fabric Login, the N_port does a Port Login to the name server. The name server appears as an N_Port, located at well-known address FFFFFC, to other ports. The name server is used by N_ports and NL_Ports to register and discover Fibre Channel attributes. Attributes that can be registered with the name server include port identifier, port name, node name, IP address of the port, port type and FC-4 types supported by the port. The Nx_Port can register, deregister or query the name server database after the Port Login. N_Port Login allows two N_Ports to establish a session and exchange service parameters and proceeds following the Fabric Login. N_Port login is required before performing an ULP operations. N_Port login performs three functions: It provides service parameters of the destination N_Port. It initializes End-End Credit, and in point-to-point topologies BB_Credits are initialized. The port manager supports configuration and initialization of FC interfaces, coordinates with various services like FLOGI Mgr, Domain Mgr, VSAN Mgr, WWN Mgr, Port Channel Mgr, Zone Server, ACL Mgr, SPAN, TL Port Mgr, Module firmware etc., generates interface state change notifications and SNMP Traps, provides APIs to access various runtime and configuration data, implements SW_ILS services: ELP, ESC and EPP on E-ports, and implements Trunking and provides support for Port Channels. EPP (Exchange of Peer Parameters) is a SW_ILS service used mainly for Trunking. Four extended link services that support port login: N_Port Login (PLOGI)Two N_Ports establish a session and exchange service parameters. N_Port Logout (LOGO)To end a session between two end ports.
1-87
N_Port Discover (PDISC)To verify existing service parameters between two end ports. Address Discover (ADISC)To discover the mechanism used to define the other ports address (by switches, jumper or hard coded).
1-88
N_Port Login allows two N_Ports to establish a session and exchange service parameters and proceeds following the Fabric Login. N_Port login is required before performing an ULP operations. It provides service parameters of the destination N_Port and initializes flow control credits. TLVs (Type Length Value). BB_Credit (Point-to-Point) primarily used in Class 3 connections. End-End Credit (Fabric only) primarily used in Class 1 connections.
1-89
The Process Login (PRLI) ELS request shall be used to establish the operating environment between a group of related processes at the originating Nx_Port and a group of related processes at the responding Nx_Port. Establishing the operating environment may include the establishment of image pairs and the exchange of service parameters. PRLI is used to communicate process service parameters from originator to responder N_Port. PRLI is dependant on the FC-4 Protocol mapping for a specific upper-level protocol and is defined during the FC-4 mapping process. A process login remains in affect until a process logout occurs. The number of concurrent process logins in effect at an Nx_Port is a function of the Nx_Port facilities available. Process login is separate from N_Port Login.
1-90
Fibre Channel Fabric And Port Login/Logout And Query To Switch Fibre Channel Fabric And Port Login/Logout And Query To Switch
Fabric and Port Login/Logout and Query Fabric and Port Login/Logout
Initiator
1 - FLOGI 2 - ACCEPT 3 - PLOGI 4 - ACCEPT 5 - GA_NXT 6 - ACCEPT 7 - LOGO 8 - ACCEPT 1 - FLOGI 2 - ACCEPT 3 - PLOGI 4 - ACCEPT
Target
Generic Services
Login Server FFFFFE Name Server FFFFFC
7 - LOGO 8 - ACCEPT
1. FLOGI Extended Link Service (ELS)Initiator/target to login server WKA (FFFFFE) for switch fabric login. 2. ACCEPT (ELS reply)Login server to initiator/target for fabric login acceptance. Fibre Channel ID (Port_Identifier) is assigned by login server to initiator/target Initiator/Target port attributes are registered into Name Server by Login Server 3. PLOGI (ELS)Initiator/target to name server (FFFFFC) for port login and to establish a Fibre Channel session. 4. ACCEPT (ELS reply)Name server to initiator/target using Port_Identifier as D_ID for port login acceptance. 5. GA_NXT (Query)Initiator to name server (FFFFFC) requesting attributes about a specific port. 6. ACCEPT (Query reply)Name server to initiator with list of attributes of the requested port. 7. LOGO (ELS)Initiator/target to name server (FFFFFC) to tear down (Logout) the Fibre Channel session. 8. ACCEPT (ELS reply)Name server to initiator/target acknowledging tear down of the Fibre Channel session.
1-91
Fibre ChannelState Change Registration And Port/Process Login To Target Fibre Channel State Change Registration And Port/Process Login To Target
State Change Registration State Change Registration
Initiator
Target
9 - SCR 10 - ACCEPT
9 - SCR 10 - ACCEPT
Generic Service
Fabric Cont. FFFFFD
9. SCR (ELS)Initiator/target issues State Change Registration Command (SCRC) to fabric controller (FFFFFD) for notification when a change in the switch fabric occurs. 10. ACCEPT (ELS reply)Fabric controller to initiator/target acknowledging registration command. 11. PLOGI (ELS)Initiator to target in order to establish an end-to-end Fibre Channel session. 12. ACCEPT (ELS reply)Target to initiator acknowledging initiators port login and Fibre Channel session. 13. PRLI (ELS)Initiator to target process login requesting a FC-4 session. (Protocol type 8, SCSI) 14. ACCEPT (ELS reply)Target to initiator acknowledging session establishment. Initiator may now issue SCSI commands to the target.
1-92
Exchange Responder
The N_Port that responds to an exchange Creates its own RX_ID when the first frame of the first sequence is received from Exchange Originator ULP may not require an OX_ID or RX_ID. A value of xFFFF indicates that exchange IDs have not been assigned
2003, Cisco Systems, Inc. All rights reserved. Deploying MDS 9000 Systems v1.0Module 1, Lesson 2 - 58
Originator Exchange ID (OX_ID) Port that originates an exchange is called Exchange Originator. Originating an Exchange does not involve explicit communication with the other port. The originator simply assigns an OX_ID and sends the first sequence of the exchange to the Exchange Responder. When the originator transmits the first frame of the first sequence of a exchange, it sets the RX_ID value to be xFFFF, indicating that the RX_ID is unassigned. Responder Exchange ID (RX_ID) When an Exchange Responder receives the first frame, it has to create its own RX_ID. The standard does not require an OX_ID and RX_ID, if the upper layer protocol does not require it. To indicate OX_ID and RX_ID has not been assigned, a value of xFFFF is used. Exchange ID Interlock (X_ID) Some applications require that the responder assign an RX_ID before the exchange is allowed to proceed. This condition is called Exchange ID Interlock (X_ID). When X_ID interlock is being used, the originator sends the first frame of first sequence and then waits for the response. After receiving the response of the first frame, every frame of the exchange has both OX_ID and RX_ID.
1-93
Exchange Termination Exchange can be terminated by either the originator or responder by setting the last sequence bit in the last frame (can be sent in earlier frames for advance notification). OX_ID and RX_ID are freed for reuse.
1-94
EXCHANGE IU #2 Sequence #2
Frame #n
IU #n Sequence #n
Frame #1 Frame #n
Frame #n Frame #1
An exchange is the fundamental mechanism for coordinating the interchange of information and data between two Nx_Ports. All data transmission is part of an exchange. An exchange is a set of one or more related sequences. Within a single exchange only one sequence can be active at any given time for a single initiating Nx_Port. (i.e., a Sequence Initiator shall complete transmission of data frames for a sequence before initiating another sequence for the same exchange.) When ULP protocol wish to send info, an exchange is created. One or more information units is transported during a single exchange. IU then makes a sequence delivery request to FC-2. FC-2 process the sequence request and segment the information in to one or more frames. Each information unit is delivered using a single sequence of frames. There could be multiple sequences in an exchange depending upon the number of information units. IU within an exchange can be one direction (uni-directional) or both directions (bi-directional). Sequence Initiative Exchange originator has the initiative to send the first sequence. Once completed exchange originator can transfer the control over to the exchange responder. This control transfer is referred to as transferring the sequence initiative.
1-95
The basic unit of error recovery in Fibre Channel is the sequence, NOT the frame. All error recovery is performed at the sequence or exchange level; however, some ULPs might specify that error recovery is to take place at the exchange level only Exchange Error Policies The basic unit of error recovery in Fibre Channel is the sequence, NOT the frame. All error recovery is performed at sequence or exchange level. Some ULP may specify that error recovery takes place at exchange level. There are four exchange error policies that specify how a sequence delivery failure should be handled. Abort Discard Multiple Sequences Abort Discard Single Sequence Process Policy with Infinite Buffers Discard Multiple Sequences with Immediate Retransmission
1-96
E X C H A N G E
S E Q U E N C E S E Q U E N C E
FRAME FRAME
S O F
Frame Header
Payload
Optional Header
Payload
C E R O C F
FRAME
OX_ID
Frame Header (24-bytes) : CLT (Control Field) Frame Content/Control Information S_ID (Source) and D_ID (Destination) Addressing Type: Data Type (Command, Control or Content) Seq_Cnt, Seq_ID, Exchange_ID (Position within a series) Link utilization is maximized by the use of frame sequences and exchanges between communicating devices. This also reduces the overhead needed for setting up and tearing down of logical connections. Error correction is limited to the sequence level in Fibre Channel. A failed CRC means an entire sequence of frames are retransmitted rather than track for an individual frame, thus further minimizing overhead during frame transport.
1-97
Sequence Initiator (SI) = Sending N_Port Sequence Recipient (SR) = Receiving N_Port
SEQ Initiator assigns the Sequence a Sequence_Identifier (SEQ_ID), independent of the other communicating N_Port. SEQ Recipient uses the same SEQ_ID in its response frames. SEQ Initiator sequentially numbers each frame (SEQ_CNT). The first sequence frame must have an SEQ_CNT of x0000, incremented by 1 with each subsequent frame. SEQ Initiator identifies the last frame of a sequence by setting the End_Sequence bit in the F_CTL field of the frame header.
An originating port accomplishes a delivery request, of an information unit from the ULP, by using a sequence of one or more Fibre Channel frames (up to 2112 bytes each). Large IUs are packaged into a sequence containing multiple frames. These frames containing the segmented IU are transmitted out and then reassembled into the original information unit at the receiving port. The segmentation and reassembly is done by the FC-2 layer and therefore remains transparent to the ULP. The originating end places the IU in buffer and requests the N_Port (sequence initiator) to deliver it. The N_Port takes the data out of the buffer, segments it and packages it into individual frames for transmission. The fabric may deliver the frames out of order. The receiving N_Port (sequence recipient) reassembles the frames in a reassembly buffer and the ULPs are notified that the data is available for processing. The sequence initiator assigns the sequence a Sequence_Identifier (SEQ_ID). The sequence recipient uses the same SEQ_ID in its response frames. The sequence initiator at each of the communicating N_Port pairs assigns SEQ_ID independent of the other. The first frame is required to have a SEQ_CNT of x0000 and each subsequent frame is incremented by +1. In case of streamed sequence (initiate next sequence, prior to confirmation of first sequence), the SEQ_CNT continue to increase. Within a sequence each frame is sequentially numbered by the initiator (SEQ_CNT). The sequence initiator identifies the last frame of a sequence by setting the End_Sequence bit in the F_CTL field of the frame header. A Sequence_ID is an eight bit field to identify all the frames within a sequence. SEQ_ID value can be assigned in any order by the Sequence Initiator.
1-98 MDS 9000 Configuration and Troubleshooting (MDSCT) v1.0 Copyright 2003, Cisco Systems, Inc
Each data frame within a sequence shall be transmitted within an E_D_TOV timeout period to avoid timeout errors at destination N_Port.
1-99
(SI) N_Port
(22 Frames in the sequence) Last Data Frame, End_Sequence set: SEQ_CNT = x0021
(SR) N_Port
The first frame is required to have a SEQ_CNT of x0000 and each subsequent frame is incremented by +1. In case of streamed sequence (Initiate next sequence, prior to confirmation of first sequence), the SEQ_CNT continue to increase. Within a sequence each frame is sequentially numbered by the Initiator (SEQ_CNT) When the frame with start-of-frame delimiter initiating the sequence is received, the SEQ_CNT of the first frame is known and with the End_Sequence, the last SEQ_CNT is known. The entire sequence consists of all the frames with that SEQ_ID and SEQ_CNT of the first and last frame. SEQ_CNT can not be reused for a SEQ_ID unless the frame with specific SEQ_CNT is inactive (enough time has elapsed or acknowledgement is received) A Sequence Count is a 16 bit value to indicate the sequential order of frame transmission within a sequence. A SEQ_CNT value is incremented when a frame is transmitted with same SEQ_ID, unless sequencing streaming occurs. In case of Streaming Sequence, the SEQ_CNT continues to increase which helps to ensure that the streamed sequence can be properly reassembled under error conditions. A Sequence Status Block (SSB) is used to track the progress of a Sequence Recipient at an N_Port on a frame by frame basis. The contents of a SSB can be retrieved by the Initiator through Read SSB extended Link Services. Each Sequence has and active and open state. Sequence Initiator (SI)A Sequence is ACTIVE from the time the first frame of the sequence is transmitted until the frame with the End Sequence Flag is sent. A Sequence is OPEN from the time the first frame is transmitted until the reception of the ACK to the last
1-100
frame for Class 1,2 and 4. For Class 3, the sequence is no longer OPEN when the last frame with EOFt is sent. Sequence Recipient (SR) A Sequence is ACTIVE and OPEN from the time of the first Frame of the sequence is received until the transmission of the ACK to the last frame of that sequence for Class 1,2 and 4. For Class 3, it remains open and active until EOFt delimiter have been received.
1-101
1-102
Flow control ensures frames only transmit when there is a receive buffer to store them Receiving port indicates to the transmitting port that it can accept more frames Fibre Channel implements two different levels of flow control Source-to-Destination (End-to-End) Port-to-Port (Buffer-to-Buffer)
Flow control is used to indicate to the transmitting port that it can accept the next frame, when the buffer is available again. The transmitting port will not transmit the next frame until it knows that the receiving port has a buffer available to accept the frame. During the login process, each node shares information about the flow control. At login each port exchanges parameters with every other port in the fabric. One of the exchange parameter is the size of the receive buffer (Buffer_Buffer Credit or Login Credit) or how many frames a receiving port buffer can handle. The transmitting port takes that information and keeps keeps track of it by maintaining CREDIT_CNT. When the transmitting port credit becomes equal to the CREDIT_CNT, it stops sending frames. R_RDY (Receiver Ready) is a receivers notification that the frame has been processed and a buffer is available for the next frame. The transmitting port decrements the BB_Credit value. In order to pace the rate at which a source is allowed to transmit frames, Fibre Channel implements two different levels of flow control: Source-to-Destination (End-to-End or EE_Credits) Port-to-Port (Buffer-to-Buffer or BB_Credit), which is a Link Level protocol.
1-103
FC flow control is critical to the efficiency of the SAN fabric. Flow Control management occurs between two connected Fibre Channel ports in order to prevent a target device from being overwhelmed with frames from the initiator device and the less unnecessary data on the network the better. Flow control protocols use a credit count concept. Credit is the permission granted by the receiving port to the sending port to send a specified number of frames. Suspend transmission when credit = # Buffers. Buffer-to-buffer (BB_Credits) are used in Class 2 and Class 3 services between a node and a switch. Initial credit levels are established with the fabric at login and then replenished upon receipt of receiver-ready (R_RDY) from the target. The sender decrements 1 BB_Credit for each frame sent and increments 1 for each R_RDY received. BB_Credits are the more practical application and are very important for switches that are communicating across a extension (E_Port) because of the inherent delays present with transport over LAN/WAN/MAN. End-to-End Credits (EE_Credits) are used in Class 1 and Class 2 services between two end nodes, regardless of the number of switches in the network. After the initial credit level is set, the sender decrements 1 EE_Credit for each frame sent and increments 1 when an acknowledgement (ACK) is received.
1-104
10km
E_Port
E_Port
BB_Credit flow control is topology and distance dependant. In a point-to-point topology, BB flow control manages the flow of frames between two N_Ports. Prior to Login BB_Credit is set to one for login request and reply. In a switched fabric topology, BB flow control manages the flow of frames between an N_Port and an F_Port. Prior to Login BB_Credit is set to one for login request and reply. In an arbitrated loop topology, BB flow control manages the flow of frames between two N_Ports. AL uses the alternate BB_Credit management model. In all cases, BB_Credits must be sufficient enough to manage frames over extended distances between switch E_Ports. This helps keep the fiber optic link full without running out of BB_Credits. The optimal buffer credit value can be calculated by determining the transmit time per FC frame and dividing that into the total round trip time per frame. This helps keep the fiber optic link full without running out of BB_Credits. The speed of light over a fiber optic link is ~ 5sec per km. A Fibre Channel (FC) frame size is ~ 2 Kbytes (2,148 bytes maximum). For a 10km link, the time it takes for a frame to travel from a sender to receiver and response to the sender is 100sec. (Speed of light over fiber optic links ~ 5sec/km, 50sec x 2 = 100sec). If the sender waits for a response before sending the next frame, then the maximum number of frames in a second is 10,000. (1 sec. / .0001 = 10,000) This implies that the effective data rate is ~ 20MBps (2000 bytes x 10,000 frames per sec.). The transmit time for 2,000 characters (2 KB frame) is approximately 20sec. (2,000 / 1Gbps or 100MBps FC data rate). If the round trip time is 100sec then BB_Credit > 5. (100sec / 20sec = 5)
Copyright 2003, Cisco Systems, Inc Network Storage Technology Overview 1-105
Class of service is established between connecting devices during the initial call setup. (Class 1)Streaming data for tape backup or video requires a dedicated connection with sustained full bandwidth. Class 1 offers dedicated circuit switched connections, where two nodes have exclusive use of bandwidth. Provides reliable acknowledged delivery with guaranteed latency and in-order frame delivery. (Class 2)Online Transaction Processing (OLTP) or relational database transactions require acknowledgments of frames but not dedicated bandwidth. Class 2 offers a reliable packetized service, with acknowledgement. The fabric can not discard frames without notifying the originator. ACK 0 Once every sequence, ACK 1 Once every frame, ACK N Once every N frame. (Class 3)Sacrificed reliability for reduced overhead and better performance. Widely used in arbitrated loop networks because of temporary dedicated connections and in-order delivery with this topology. Class 3 provides an unreliable packetized service, where the fabric can discard frames without notifying the originator. The sending device doesnt get an acknowledgement for delivery or non delivery. (Class 4)Time-sensitive applications with support for multiple virtual circuits (VCs) between connections and variable QoS requirements for each VC (Real-time video broadcasts). Class 4
1-106
offers guaranteed fractional bandwidth and frame delivery, where the fabric sets up virtual connections between N_ports. (Class 5) Not Defined. (Class 6) Video broadcast applications from central video server and multiple (multicast) video recipients. Class 6 is the same as Class 1 except that devices can multicast to multiple destinations. The multicast server coordinates responses to deliver a single acknowledgement to the originator.
1-107
Class 3 is the most widely used mode of operation and is supported by all Fibre Channel switches. It is the default mode for most of the switches. In this class the receiving device do not return acknowledgement frames to the transmitter. It is the responsibility of the upper layer protocol to recover the lost frames. However, with a missing Class 3 data frame, the sequence recipient is capable of detecting the error of nonreceipt of the frame, but has no method to communicate it to the sequence initiator due to absence of ACK in Class 3. However, using Abort Sequence protocol the sequence initiator may verify if one or more transmitted sequences were received without any Sequence error. This usage of Abort Sequence protocol makes it possible to verify the integrity of Class 3 sequences delivered. If a sending ULP relies on the receiving ULP for ensuring sequence integrity, the sequence initiator may not use the Abort Sequence protocol to confirm sequence delivery. Sequences are initiated by transmitting a frame started by a SOFi3. A SOFn3 starts subsequent frames within a sequence. A sequence is terminated with a data frame ended by EOFt. An EOFn terminates all frames other than the last frame within the sequence. Class 3 uses only buffer-to-buffer flow control with R_RDY. End-to-end flow control is not supported.
1-108
Class of Service Attribute Connection Oriented Bandwidth Reserved Guaranteed Latency Guaranteed Delivery Order Delivery Confirmation - ACK Frame Multiplexing w/ ports End-End Flow Control Link Level Flow Control
The figure gives a Fibre Channel Class of Service attribute and support comparison.
1-109
Lesson Summary
This section summarizes the key points discussed in this lesson.
Lesson Summary
Fibre Channel is a bi-directional, point-to-point, serial data channel that provides a general transport mechanism for upper layer protocols over network topology configurations including point-to-point, arbitrated loop, and switched fabric. Fibre Channel has five protocol layers: FC-0, 1, 2, 3, and 4. They handle everything from physical connections to the ULP mapping. FC frames are a maximum of 2,148 bytes in length with a data payload up to 2,112 bytes or 528 transmission words. Name identifiers are 64-bit values used to register ports, nodes, and fabrics on name servers within a Fibre Channel network, and Source (S_ID) and Destination (D_ID) IDs are 24-bit values dynamically assigned during fabric login and used for routing. Generic Services facilitate the transfer of status and configuration info between FC devices, and FC-CT IU is the common transport protocol used for Generic Services between client and server.
2003, Cisco Systems, Inc. All rights reserved. Deploying MDS 9000 Systems v1.0Module 1, Lesson 2 - 72
1-110
Summary (Cont.)
Fibre Channel Name Server registers and deregisters fabric devices as they login and logout of the network as well as respond to queries about registered devices on the fabric. Fabric (FLOGI) and Port (PLOGI) Logins are required before a fabric device can begin end to end transmissions and other fabric services. A Fibre Channel Sequence is a series of one or more related FC frames transmitted unidirectionally between two ports and a Fibre Channel Exchange is a series of one or more nonconcurrent sequences between two ports. There are two forms of Fibre Channel flow control; BB_Credits for buffer-to-buffer and EE_Credits for end-toend. There are five classes of service in Fibre Channel networks and they are used based on the connection and application requirements. Class 3 is the most widely implemented.
2003, Cisco Systems, Inc. All rights reserved. Deploying MDS 9000 Systems v1.0Module 1, Lesson 2 - 73
1-111
1-112