Saturday 22 November 2008

Fibre Channel Layers

Fibre channel has a layered architecture like TCP/IP and has distinct functions. Following are the fibre channel layers.


FC-0 layer
FC-1 layer
FC-2 layer
FC-3 layer
FC-4 layer
Upper Layer Protocol


FC-0 layer: This layer describes physical  interface including transmission media, transmitters and receivers, and their interfaces. This layer defines data rates provided by the Fibre Channel standard, optical and electrical media that can be used at each rate, connectors associated with each media type, maximum distance capabilities and other characteristic such as wavelength of light and light levels.
FC-1 layer: This layer defines how data is encoded while transmission and decoded on receipt. Below are  the primary function of FC-1 layer
  • Encoding/decoding
  • Ordered sets
  • Link initialization
Encoding/decoding: Before transmitting data over fibre channel the data is encoded to 10 bits and decoded back to 8 bits at receipt. Encoding the data improves the transmission characteristics of the serial bit stream and facilitates successful recovery of the data at the receiver.


8b/10b encoding and decoding:  Refer http://en.wikipedia.org/wiki/8b/10b_encoding
FC-2 layer: FC-2 layer deals with exchange and sequence management, frame structure, class of service and flow control.
FC-2 layer has four different level to control and manage the FC frame delivery.
  • Login session
  • Exchange
  • Sequence
  • Frame
Login Session: Before any transmission takes place in fibre channel, the two ports communicating establishes a session. Once the login session becomes active and then further the information is passed through the established link. If session gets terminating, any subsequent IO is terminated


Exchange: The exchange is the mechanism that allows two Fibre Channel ports to identify and manage a set of information units. These information units may represent an entire operation (Command, Data, Status) or just part of an operation. Each protocol whether it be TCP/IP, UDP or fibre channel, it has its own pieces of information that must be send between ports that are communicating. These protocol specific information are called information units. In Fibre channel protocol, the structure of these information unit is described in FC-4 layer. Now in any layered architecture, information from one layer is passed to other, so in the fibre channel world, the information units from Fc-4 layer is passed to Fc-3 layer. Since FC-3 layer is reserved for furture purpose (that could eventually be implemented for functions like encryption or RAID) the information unit is converted into a sequence which is handled at the FC-2 layer. In effect the information unit corresponds to an FC-2 Sequence.
An exchange is composed of one or more sequences (information units) and within the exchange information units can be sent in either of two ways:
  • Unidirectional exchange — Information units are sent in one direction only from exchange originator to exchange responder.
  • Bidirectional exchange — Information units are sent in both directions during the course of the exchange.
When the exchange is created the originator has the initiative to send the first sequence but once that sequence has completed the originator may transfer control (initiative) to the responder so the responder can send a sequence in return. This is known as transferring sequence initiative.


Sequence: A Sequence is formed by a set of one or more related Frames transmitted unidirectionally from one N_Port to an other. Each Frame within a sequence is uniquely numbered with a Sequence Count. Error recovery, controlled by an upper protocol layer is usually performed at Sequence boundaries.


Frame: Frames are basic building block of an FC connections. Frames are structured according to a defined format and consists of a fixed length header, a variable lenght data field, know as payload and fixed length CRC. The begining of frame consists of a start of frame delimeter and at the end there is a End of frame delimeter


Below figure depicts Frame structure



FC-3 layer: The FC-3 layer provides for future functions that may be
compression and encryption prior to delivery to the FC-2 layer. implemented in Fibre Channel. These functions are known as Common Services.


FC-4 layer: This layer defines mapping between protocols that is transported by Fibre channel and lower transport layers of fibre channel ie, FC0, FC1 and FC2.
Each Upper Layer Protocol has its own specific command, data, status or packet information that needs to be communicated with other nodes in order for the protocol to operate.
The FC-4 layer defines the format and structure of the protocol specific information that needs to be communicated with other nodes inorder for the protocol to operate.
Some of the protocols that are mapped to fibre channel are: SCI-FCP and mapping of TCP/IP protocols with FC.

No comments:

Post a Comment