fiber channel arbitrated loop

51
Fiber Channel Arbitrated Loop Department of Computer Science, CUSAT 1 Seminar Report On FIBER CHANNEL ARBITRATED LOOP Submitted by VIMAL V.B. In partial fulfillment of the requirements for M-Tech Degree in Software Engineering DEPARTMENT OF COMPUTER SCIENCE COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY COCHIN – 682022 2005

Upload: itzmitit

Post on 10-Mar-2015

350 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 1

Seminar Report

On

FIBER CHANNEL ARBITRATED LOOP

Submitted by

VIMAL V.B.

In partial fulfillment of the requirements for

M-Tech Degree in

Software Engineering

DEPARTMENT OF COMPUTER SCIENCE

COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY

COCHIN – 682022

2005

Page 2: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 2

DEPARTMENT OF COMPUTER SCIENCE

COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY

CERTIFICATE

This is to certify that the contents of the Seminar entitled

FIBER CHANNEL ARBITRATED LOOP

Is a bonafide report of the Seminar presented by

VIMAL V.B

In the partial fulfillment of the requirements for the award of the

M-Tech Degree course in Software Engineering of Cochin University of

Science and Technology during the academic year 2005.

Guided by: Dr. Poulose Jacob

Dr. Sumam Mary Idicula Head of the Department

Cochin –22

18/11/2005

Page 3: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 3

ACKNOWLEDGEMENT

I am greatly indebted to Dr. Poulose Jacob, head of Department,

Computer Science, CUSAT for permitting me to undertake this work.

I express my heartfelt gratitude to my respected Seminar guide

Dr. Sumam Mary Idicula for her kind and inspiring advise which helped

me a lot.

I am extremely thankful to respected Lecturer in computer science Mr.

G. Santhosh Kumar who have me valid suggestions.

I am also very thankful to my colleagues who helped and co-operated

with me in conducting the seminar by their active participation.

Mr. Vimal V.B.

Page 4: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 4

ABSTRACT

Fiber Channel is an ANSI interface that acts as like a general

transport vehicle to simultaneously deliver the command sets of

several existing interface protocols. Fiber Channel Arbitrated Loop is

one topology used to connect two or more devices within the

guidelines set by the ANSI standards. It supports both large and small

data transfers, and can be used in systems ranging from

supercomputers to individual workstations.

Fiber Channel Arbitrated Loop is designed for high-bandwidth

high-end systems and transfers data in the serial mode. FC-AL uses

fiber optic cabling to produce a maximum data transfer rate of more

than 200 MB/second. FC-AL is capable of supporting up to 127

devices as far as 10 kilometers apart, thus opening new perspective for

remote data storage. FC-AL allows hot swapping of the connected

drives without interfering with the work of the entire system. Also, FC-

AL devices can be designed with two ports to double the data transfer

rates. This interface is more expensive than the SCSI interface.

Fiber Channel isn’t a channel or a network, but allows for an

active intelligent interconnection scheme, called a Fabric, to connect

heterogeneous computer systems and peripherals with all the benefits

of the existing methods. In fact, fiber channel supports its own

protocol plus some other higher-level protocols such as the SCSI,

FDDI, HIPPI (High Performance Parallel Interface) and IPI. Peripherals

can include storage devices such as disk or tape arrays. Nowadays,

Fiber channel option is mandatory for high-end mass storage

products, such as disk or tape arrays.

Page 5: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 5

TABLE OF CONTENTS

1. INTRODUCTION…………………………………………………………….3

2. FIBER CHANNEL TOPOLOGIES…………………………………………..7

2.1 POINT-TO-POINT………………………………………………………..7

2.2 SWITCHED FABRIC……………………………………………………..8

2.3 ARBITRATED LOOP…………………………………………………….9

3. FIBER CHANNEL PORTS………………………………………………….13

4. FIBRE CHANNEL LAYERS………………………………………………..15

4.1 PHYSICAL INTERFACE……………………………………………….16

4.2 TRANSMISSION PROTOCOL………………………………………...19

4.3 ARBITRATED LOOP PROTOCOL……………………………………20

4.4 SIGNALLING PROTOCOL…………………………………………….21

4.5 COMMON SERVICES…………………………………………………..30

4.6 APPLICATION INTERFACE…………………………………………..30

5. TRANSMISSION HIERARCHY…………………………………………...32

6. FC ARBITRATED LOOP CONCEPTS…………………………………….37

6.1 ARBITRATED LOOP PHYSICAL ADDRESS………………………...37

6.2 LOOP INITIALIZATION………………………………………………38

6.3 PRIMITIVE SIGNALS CUSTOM MADE FOR FC-AL……………....43

7. CONCLUTION……………………………………………………………...47

8. REFERENCES ……………………………………………………………….48

Page 6: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 6

1. INTRODUCTION

There are basically two different ways to transfer data between

computers or between computers and peripheral devices. They are channels

and Networks

1.1 CHANNELS

An approach based on channels provides a direct or switched point –to-

point connection between communicating devices. Usually this method is

implemented as parallel transmission and is designed to be hardware

intensive. Any needed error detection and correction is handled in hardware.

It provides high speed block based data transfer with low overhead. This

method stress on high performance and the hardware is optimized to meet

the need. The protocol used is very simple and it minimizes the software

involvement in data transfer operations. This method also provides in-

sequence data delivery and highly reliable data transmission.

But by using this method we can only transfer data to a very small

distance from several centimeters to few meters.

A SCSI interface is a good example of a fast and effective channel. It is

ideally suited for high-speed point-to-point transfer of large data blocks data

in parallel way over relatively short distances.

1.2 NETWORKS

This method is based on connecting distributed elements like

workstations, file servers and peripherals using serial protocol. Networks are

software intensive and it is slower than a channel, and has high overhead. In

Page 7: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 7

this approach the burden of ensuring reliable data delivery is transferred from

hardware to software. Transmission of data is not reliable as on channels.

Networks are usually used for long distance communication. Because of they

are unstructured; they can support large number of devices of different types.

They provides file based data transfer using a wide variety of protocols.

Networks are used for transferring data with “error-free delivery” and voice

and video where “delivery on time” is the primary requirement with error-

free delivery being a secondary consideration.

Ethernet based IP network is an example of network. This method is

typically used for transferring small data files over relatively longer distances.

1.3 FIBER CHANNEL

Both channel and network topologies fall short when it comes to

reliable, high-speed transfer of vast quantities of data over longer distances.

Fiber channel combines the best features form these two protocols. It has high

data transfer rate, low error rate, multiple connection topologies, longer

distance, scalability and more.

In recent years several technical developments have converged to a

bigger than ever need for extremely fast data links. High performance

computers have become the focus of much attention in the data

communications industry. Performance improvements have spawned

increasingly data-intensive and high-speed networking applications, such as

multimedia and scientific visualization. However, the existing network

interconnects between computers and I/O devices are unable to run at the

speeds needed.

Page 8: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 8

The intention of the Fiber Channel is to develop practical, inexpensive,

yet expendable means of quickly transferring data between workstations,

mainframes, supercomputers, desktop computers, storage devices, displays

and other peripherals. Fiber Channel is the general name of an integrated set

of standards being developed by the American National Standards Institute

(ANSI).

Fiber channel is not a channel or a network. It has an active intelligent

interconnection scheme called. We can use optical fiber as well as copper wire

as a communication media and its architecture does represents neither a

channel nor a network. Fiber channel is first implemented using optical fiber

as a transmission media and is used for transferring data between high-speed

storage devices, so it gets this name. Fiber channel is a new superior I/O

interface with the following features.

1.3.1 SERIAL DATA TRANSFER

Serial data transfer provides greater distance and simplicity. By using

shielded twisted pair we can get up to 10M between each device. If we are

using coaxial cable we will get up to 30M.Upto 2Km can be achievable using

multi mode optical fiber, and can get up to 10 KM if we are using single mode

optical fiber. This 10KM is not the total span of the network, its only the

maximum possible distance between two devices.

1.3.2 COMPATABILITY WITH OTHER PROTOCOLS

Fiber channel supports its own protocol plus some other higher-level

protocols such as SCSI, IPI, FDDI, HIPPI, IP, SBCCS and more.

Page 9: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 9

1.3.3 RELIABLE DATA TRANSFER

This is the most reliable form of communication, transmission protocol

ensures that packets are not lost or damaged during data transmission. It has

low error rates and error handling is implemented in hardware, and uses

separate cables for transmitting and receiving data.

1.3.4 PACKETIZING DATA

During a fiber channel data transfer hardware in the sending device

segments each data block into a sequence of data structures called frames.

Each frame can contain up to 2112 bytes of data plus addressing and error

correction information. If the information unit fits within a single frame, a

single frame sequence is used to transport the information to the recipient.

When the information unit is very large, the fiber channel hardware combines

multiple frames to a sequence. Up to 216 frames can be concatenated into a

single sequence. Use of sequences reduces the amount of processor overhead

during the transfer of any large file by minimizing the time required to

process individual frames. The sequenced data is transmitted over a serial

cable to the recipient. The recipient breaks each sequence into frames and

reassembles the information units into the frames to reconstruct the original

data. Which is then delivered to the recipient CPU for higher level processing.

Hardware in the sending and receiving devices handles the segmentation and

reassembly of frames into data blocks.

1.3.5 SUPPORT FOR LARGE NUMBER OF DEVICES

You can connect a large number of devices that is over 16 million. There

is a unique identifier for each device; devices can be storage devices such as

disk drives, tape units, high bandwidth graphics terminals, and laser printers.

Page 10: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 10

2. FIBER CHANNEL TOPOLOGIES

Just like a network topology, there are accepted layouts that are used to

define how Fiber Channel devices are connected together. Fiber Channel

defines three topologies, namely Point-to-Point, switched fabric and

Arbitrated Loop.

2.1 POINT-TO-POINT

A point-to-point topology is the simplest of all the three topologies. It

consists of two and only two Fiber Channel devices connected directly

together. The transmit fiber of one device goes to the receive fiber of the other

device, and vice versa. There is no sharing of the media, which allows the

devices to enjoy the total bandwidth of the link. A simple link initialization is

required of the two devices before communication can begin. The simplicity

of the point-to-point configuration makes it the cheapest way to implement

Fiber Channel.

Fig: Point-to-point Topology

An example of such a configuration would be a server connected

directly to a storage array.

HOST STORAGE N N

Page 11: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 11

2.2 SWITCHED FABRIC

This topology is similar to the star topology used on networks that use

twisted pair cabling. In this case, a Fiber Channel switch provides a central

connectivity point for all of the devices in the fabric. This allows each node to

access all other nodes that are connected to the fabric.

Fig: Switched Fabric

The configuration of a fabric topology can be either cascaded or non-

cascaded. In a cascaded configuration, all switches are interconnected to form

a larger mesh. This allows a device connected to one switch to access any

other node connected to a switch within the fabric. In a non-cascaded

configuration, the switches are not interconnected, making this design easier

to implement than the cascaded; however, the performance of the fabric will

significantly degrade should a switch fail. Also, the mesh design of the

cascaded fabric allows for greater fault tolerance.

SWITCH SWITCH SWITCH

STORAGE STORAGE

HOST HOST

E E

F F

N

N

Page 12: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 12

There are several benefits of this fabric topology, including support for a

large number of nodes (over 16 million (224) in fact), increased fault tolerance

when implementing a cascaded configuration, and improved scalability. The

major benefit of this topology is that many devices can communicate at the

same time; the media is not shared. Of course, it also requires the purchase of

a switch.

When the N_Ports log into the Fabric, the Fabric will assign Native

Address Identifiers (S_ID). Other functions of the Fabric include a multicast

server, broadcast server, alias server, quality of service facilitator, and

directory server. Some Fabrics have FL_Ports, allowing Arbitrated Loops to be

connected to the Fabric.

2.3 ARBITRATED LOOP

The Fiber Channel Arbitrated Loop, or FC-AL as it is known, is a Fiber

Channel topology that combines the advantages of the fabric topology

(support for multiple devices) with the cost savings of the point-to-point

topology (where there's no need for a central switch). In a FC-AL

implementation, devices are connected to a central hub, which is typically

cheaper than a switch. As with Ethernet networks, the hub offers no

additional functionality to the connected devices beyond serving as a

centralized connection point.

Arbitrated Loop has become the most dominant Fiber Channel

topology, but it is also the most complex. Unlike the other two topologies, the

media is shared among the devices, limiting each device's access. Not all

devices are required to operate on an Arbitrated Loop; the added

Page 13: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 13

functionality is optional. Thus, for a Loop to operate, all devices must be Loop

devices. There are two types of configurations.

2.3.1 PUBLIC LOOP

Fig: Public Loop

An Arbitrated loop with a fabric port is considered as a public port. In

this configuration devices are connected to a central hub, and to one optional

switch port.

2.3.2 PRIVATE LOOP

In a private loop, nodes are connected in a daisy-chained fashion. This

will raise problems if one of the devices in the chain failed to operate. This is

not to be a problem in the case of public loop. Private loop uses multiple ports

for redundancy, if one port fails it switches its operation to the next port.

SWITCH HUB STORAGE

HOST

HOST

NL FL

NL

NL

Page 14: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 14

Fig: Private Loop

Arbitrated Loop is not a token-passing scheme. When a device is ready

to transmit data, it first must arbitrate and gain control of the Loop. It does

this by transmitting the Arbitrate (ARBx) Primitive Signal, where x = the

Arbitrated Loop Physical Address (AL-PA) of the device. Once a device

receives its own ARBx Primitive Signal, it has gained control of the Loop and

can now communicate with other devices by transmitting an Open (OPN)

Primitive Signal to a destination device. Once this happens, there essentially

exists point-to-point communication between the two devices. All other

devices in between simply repeat the data.

NODE A

NODE D

NODE C

NODE E

NODE F

NODE B

NL-P 0

NL-P 0

NL-P 5

NL-P 5

NL-P 4

NL-P 4

NL-P 3

NL-P 3

NL-P 2

NL-P 2

NL-P 1

NL-P 1

Page 15: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 15

If more than one device on the Loop is arbitrating at the same time, the x

values of the ARB Primitive Signals are compared. When an arbitrating device

receives another device's ARBx, the ARBx with the numerically lower AL_PA

is forwarded, while the ARBx with the numerically higher AL_PA is blocked.

Thus, the device with the lower AL_PA will gain control of the Loop first.

Once that device relinquishes control of the Loop, the other device can have a

chance.

Unlike token-passing schemes, there is no limit on how long a device

may retain control of the Loop. This demonstrates the "channel" aspect of

Fiber Channel. There is, however, an Access Fairness Algorithm, which

prohibits a device from arbitrating again until all other devices have had a

chance to arbitrate. The catch is that the Access Fairness Algorithm is optional.

There can be up to 126 nodes connected to a loop, but when the number

of nodes increases, the performance will decrease. If only 2 devices are left in

the loop, the topology becomes point-to-point.

Page 16: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 16

3. FIBER CHANNEL PORTS

Fibre Channel port is the entity on a node or switch within a storage

area network that performs data communication and transfer over Fibre

Channel connections. Ports are the link to the outside world for a Fiber

Channel node. Each node has at least one port to provide access to other

nodes; usually each port has two ports. Each port uses a pair of fibers; one to

carry information into the port and one to carry information out of the port.

This pair of fibers (actually copper wire) is called a “link” and is part of each

topology. The Fiber Channel ANSI specification also supports fibers made of

optical strands as a medium for data transfer.

The ports are categorized into different types.

NL_port : NL_port is the node connection pertaining to hosts or storage

devices in an arbitrated loop topology. Also known as Node Loop port.

FL_port : FL_port is the fabric connection in a public loop for an arbitrated

loop topology. It is connected to a switch. Also known as Fabric Loop port.

An F_Port uses the address identifier 0xFFFFFE

L_port : L_port is the loose term used for NL_port and FL_port in an

arbitrated loop. Also known as Loop port.

N_port : N_port is the node connection pertaining to hosts or storage

devices in a point-to-point or switched fabric topology. Also known as

Node port.

Page 17: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 17

F_port : F_port is the fabric connection on the switch side of a switched

fabric topology. Also known as Fabric port.

E_port : E_port is the connection between 2 fibre channel switches. Also

known as Expansion port. When 2 E_ports between 2 switches form a link,

that link is referred to as ISL.

TE_port : TE_port is the term used for multiple E_ports trunked together

to create high bandwidth between switches. Also known as Trunking

Expansion port.

G_port : G_port is the connection that can be classified or emulated as F

port or E port. It has no function until it has logged into a fabric. Also

known as Generic port.

GL_port: GL_port is a G_port with Loop capabilities. Also known as

Generic Loop port.

Page 18: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 18

4. FIBRE CHANNEL LAYERS

It is often easier to understand a communications protocol if it is first

broken down into parts or layers. Some people are familiar with the

International Standards Organization (ISO) - Open Systems Interconnect (OSI)

model, which breaks the communications puzzle into seven layers: Physical,

Data Link, Network, Transport, Session, Presentation, and Application. Fiber

Channel does not follow this model, but instead, the protocol has been broken

into six layers: FC-0, FC-1, FC-AL, FC-2, FC-3, and FC-4. FC-0 to FC-2 contains

the physical description of Fiber Channel defined in the FC-PH standard,

while FC-3 and FC-4 describe the interface with other applications, as well as

some protocol specific information. Each is described below along with the

main functions it defines.

FC-0 and FC-1 can be thought of as defining the Physical Layer of the

OSI model. FC-AL is actually a sub layer of FC-2, we can call it as FC-1.5, and

this layer is further added to the protocol stack. FC-2 is similar to what other

protocols define as a Media Access Control (MAC) layer, which is typically

the lower half of the Data Link layer. Fiber Channel, however, does not define

the concept of a MAC. FC-3 is not really a layer at all. It is still a largely

undefined set of services for devices having more than one port. An example

is striping, where data is transmitted out of all ports at the same time in order

to increase bandwidth. FC-4 defines how other well-known higher layer

protocols are mapped onto and transmitted over Fiber Channel. Thus, one can

roughly think of the Fiber Channel layers defining up through the Transport

layer of the OSI model.

Page 19: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 19

4.1 FC-0: PHYSICAL INTERFACE

FC-0 is called the Physical interface Layer. This Fiber Channel layer

defines the physical media used to link two Fiber Channel ports, including

transmitters, receivers, connecters, and cabling types used. It also describes

the optical and electrical parameters for a variety of data rates, maximum

transfer distances, and noise limits.

4.1.1 TRANSMISSION SPEED

Fiber Channel offers a very wide range of media speeds. One of the

goals of Fiber Channel is to allow HIPPI to map to it. HIPPI is a 100MB/s

technology, thus Fiber Channel's primary data rate allows for data to travel

100MB/s. After factoring in 8B/10B encoding, frame headers, and other

overhead, the transmission speed is 1063 Mb/s. This speed is referred to as

full speed. There also exists half speed, quarter speed, and eighth speed. In

addition, double and quadruple speeds are defined. The following table

illustrates. By far, the most common speed is full speed, with some quarter

speed devices also in existence.

4.1.2 TRANSMISSION MEDIA

Despite the name, Fiber Channel can run over both copper and fiber

media. The main tradeoffs are that although longer distances can be achieved

with fiber, it is more expensive. Speeds up to 100MB/s can run on both

copper and fiber; 200MB/s and 400MB/s require fiber media.

For copper, the following cable types are used: video cable, miniature

cable, and shielded twisted pair. The most common by far is shielded twisted

pair, using a DB-9 connector. For fiber, the choices are: 62.5mm multi-mode,

50mm multi-mode, and single-mode. The SC connector is used. Also for fiber,

Page 20: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 20

both long wave and short wave lasers can be used. Short wave seems to be

most popular now. The short wave transmitters have the option to implement

the Open Fiber Control (OFC).

The data rates on these media ranges from 100 MB/S to 400MB/S.

Depending on the data rate and media used, the point-to-point distance for a

link can range from 50 meters to 100 Kilometers.

4.1.3 OPEN FIBER CONTROL

We are using short wave laser for communication. The FC-0 specifies a

safety system - the Open Fiber Control system (OFC) - for short wave laser

data links, since the optical power levels exceed the limits defined by the laser

safety standards. This is a scheme designed to prevent disconnected fibers

from continuously transmitting light, as a safety precaution. There is a simple

protocol where each transmitter on a link periodically transmits short pulses

of light to the other receiver. When the receivers detect this, the transmitters

can operate normally.

Fig: Open Fiber Control

Fiber Channel Controlle

r

Fiber Channel Controlle

r

TX

RX TX

RX

Open Fiber

Control

Open Fiber

Control

Driver

Driver Amplifier

Amplifier

Page 21: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 21

If an open fiber condition occurs in the link, the receiver of the Port the

fiber is connected detects it and pulses its laser at a low duty cycle that meets

the safety requirements. The receiver of the other port (at the other end of the

fiber) detects this pulsing signal and also pulses it's transmitter at a low duty

cycle. When the open fiber path is restored both ports receive the pulsing

signals, and after a double handshaking procedure the connection is

automatically restored within a few seconds.

4.1.4 PORT BYPASS CIRCUIT

Fiber Channel provides port bypass circuitry which bypasses the drive if

it is removed, incapable of providing loop services, unable to obtain a valid

address, or otherwise incapable of providing loop services. These port bypass

circuits (PBCs) are located external to the drive or other FC-AL device. When

a device is disconnected from the loop it doesn’t break the loop.

Fig: Relationship between the PBC and drive.

Select

Drive N

Serial in Serial out

MU X

To Next Drive

From Previous Drive

Port Bypass Circuit

Page 22: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 22

4.2 FC-1: TRANSMISSION PROTOCOL

FC-1 defines the transmission protocol including serial encoding and

decoding rules, special characters and error control. The information

transmitted over a fiber is encoded 8 bits at a time into a 10-bit Transmission

Character (IBM 8B/10B encoding). The primary rationale for use of a

transmission code is to improve the transmission characteristic of information

across a fiber. The layer also controls the media access, defining the receiving

and transmitting ports and their operations. This layer is also responsible for

synchronization, error recovery and retransmission mechanism.

4.2.1 FC-1 CHARACTER CONVERSION

An unencoded information byte is composed of eight information bits

A, B, C, D, E, F, G, H and the control variable Z. This information is encoded

by FC-1 into the bits a, b, c, d, e, i, f, g, h, j of a 10-bit Transmission Character.

The control variable has either the value D (D-type) for Data characters or the

value K (K-type) for special characters. Each valid Transmission Character has

been given a name using the following convention: Zxx.y, where Z is the

control variable of the unencoded FC-1 information byte, xx is the decimal

value of the binary number composed of the bits E, D, C, B, and A, and y is

the decimal value of the binary number composed of the bits H,G of the

unencoded FC-1 information byte in that order. For example the name of the

FC-1 Transmission Character composed of the hexadecimal "BC" special (K-

type) code is K28.5.

The information received is recovered 10 bits at a time and those

Transmission Characters used for data (D-type) are decoded into the one of

Page 23: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 23

the 256 8-bit combinations. Some of the remaining Transmission Characters

(K-type) referred to as special characters, are used for protocol management

functions. Codes detected at the receiver that are not D- or K- type are

signaled as code violation errors.

4.2.2 CODING RULES

Each data byte or special character has two (not necessarily different)

transmission codes. The data bytes and special characters are encoded into

these codes respectively, depending on the initial Running Disparity (RD).

The RD is a binary parameter, which is calculated upon the balance of ones

and zeros in the sub-blocks (the first six bits and the last four bits) of a

transmission character. A new RD is calculated from the transmitted character

at both the transmitter and the receiver. If the detected character has opposite

RD the transmitter should have sent, (depending on the RD of the previous bit

stream) the receiver indicates a disparity violation condition. A Transmission

Word is composed of four contiguous transmission characters.

4.3 FC-AL: ARBITRATED LOOP PROTOCOL

FC-AL is the Fiber Channel Arbitrated Loop protocol. Here point-to-

point unidirectional serial links interconnect neighboring ports to form a loop.

The protocol allows up to 126 devices plus an optional fabric element attached

to the loop. FC-AL protocol defines the procedures for acquiring loop access

and for establishing a connection with the receiving port. Once a point-to-

point connection is established between the sender and the receiver, the

framing protocol defined in the FC-PH standard governs the transfer of data

frames. Dual loop technology is typical in FC-AL storage networks.

Page 24: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 24

4.4 FC-2: SIGNALLING PROTOCOL

The Signaling Protocol (FC-2) layer serves as the transport mechanism of

Fibre Channel. The framing rules of the data to be transferred between ports,

the different mechanisms for controlling the three service classes and the

means of managing the sequence of a data transfer are defined by FC-2. The

layer defines most of the Fibre Channel specific handling like flow control,

encapsulation of data into frames and sequence exchanges. The layer provides

Fibre Channel classes of service information, which allows a variety of

different connection types and connection management options. The layer

also defines the physical models for the Fibre Channel components, including

the definition of nodes, ports, segmentation and reassembly, Login/Logout

and Fibre Channel topologies.

4.4.1 ORDERED SET

The Ordered Sets are four byte transmission words containing data and

special characters, which have a special meaning. Ordered Sets provide the

availability to obtain bit and word synchronization, which also establishes

word boundary alignment. An Ordered Set always begins with the special

character K28.5. Three major types of Ordered Sets are defined by the

signaling protocol.

The Frame delimiters (the Start-of-Frame (SOF) and End-of-Frame (EOF)

Ordered Sets) are Ordered Sets, which immediately precede or follow the

contents of a Frame. There are multiple SOF and EOF delimiters defined for

the Fabric and N_Port Sequence control.

Page 25: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 25

The two Primitive Signals: Idle and Receiver Ready (R_RDY) are

Ordered Sets designated by the standard to have a special meaning. An Idle is

a Primitive Signal transmitted on the link to indicate an operational Port

facility ready for Frame transmission and reception. The R_RDY Primitive

Signal indicates that the interface buffer is available for receiving further

Frames.

A Primitive Sequence is an Ordered Set that is transmitted and repeated

continuously to indicate specific conditions within a Port or conditions

encountered by the receiver logic of a Port. When a Primitive Sequence is

received and recognized, a corresponding Primitive Sequence or Idle is

transmitted in response. Recognition of a Primitive Sequence requires

consecutive detection of 3 instances of the same Ordered Set. The Primitive

Sequences supported by the standard are Offline (OLS), Not Operational

(NOS), Link Reset (LR) and Link Reset Response (LRR).

4.4.2 FLOW CONTROL

The concept of flow control deals with the problem where a device

receives frames faster than it can process them. When this happens, the result

is that the device is forced to drop some of the frames. Fibre Channel has a

built-in flow control solution to this problem.

The idea is simple enough. A device can transmit frames to another

device only when the other device is ready to accept them. Before the devices

can send data to each other, they must login to each other. One of the things

accomplished in login is establishing credit. Credit refers to the number of

frames a device can receive at a time. This value is exchanged with another

Page 26: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 26

device during login, so each knows how many frames the other can receive.

After enough frames have been transmitted and credit runs out, no more

frames can be transmitted until the destination device indicates it has

processed one or more frames and is ready to receive new ones. Thus, no

device should ever be overrun with frames. Fibre Channel uses two types of

flow control, buffer-to-buffer and end-to-end.

4.4.2.1 BUFFER-TO-BUFFER

This type of flow control deals only with the link between an N_Port

and an F_Port or between two N_Ports. Both ports on the link exchange

values of how many frames it is willing to receive at a time from the other

port. This value becomes the other port's BB_Credit value and remains

constant as long as the ports are logged in. For example, when ports A and B

log into each other, A may report that it is willing to handle 4 frames from B; B

might report that it will accept 8 frames from A. Thus, B's BB_Credit is set to

4, and A's is set to 8.

Each port also keeps track of BB_Credit_CNT, which is initialized to 0.

For each frame transmitted, BB_Credit_CNT is incremented by 1. The value is

decremented by 1 for each R_RDY Primitive Signal received from the other

port. Transmission of an R_RDY indicates the port has processed a frame,

freed a receive buffer, and is ready for one more. If BB_Credit_CNT reaches

BB_Credit, the port cannot transmit another frame until it receives an R_RDY.

4.4.2.2 END-TO-END

End-to-End flow control is not concerned with individual links, but

rather the source and destination N_Ports. The concept is very similar to

Page 27: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 27

buffer-to-buffer flow control. When the two N_Ports log into each other, they

report how many receive buffers are available for the other port. This value

becomes EE_Credit. EE_Credit_CNT is set to 0 after login and increments by 1

for each frame transmitted to the other port. It is decremented upon reception

of an ACK Link Control frame from that port. ACK frames can indicate the

port has received and processed 1 frame, N frames, or an entire Sequence of

frames.

4.4.3 CLASSES OF SERVICE

Fibre Channel defines several communication strategies called Classes

of service. The Class used greatly depends on the type of data to be

transmitted. The major difference between the Classes is the types of flow

control used. If two N_Ports are to communicate or if an N_Port is to

successfully log into a Fabric, there must be at least 1 common Class of service

supported between them, since Sequences and Exchanges must take place

using a single Class of service. This information is exchanged during Fabric

Login and N_Port Login.

4.4.3.1 CLASS 1

In Class 1, a dedicated connection is established between two N_Ports.

Once established, the two N_Ports may communicate using the full

bandwidth of the connection; no other network traffic affects this

communication. Due to this, frames are guaranteed to arrive in the order in

which they were transmitted. In addition, the media speeds must be the same

for all links, which make up the dedicated connection. Because of the nature

of the dedicated connection, there is no need for buffer-to-buffer flow control;

Page 28: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 28

the Fabric does not need to buffer the frames as they are routed. Thus, only

end-to-end flow control is used in Class 1. Class 1 would be used when the

data needs to be continuous and time critical, such as voice or video.

Intermix

Intermix is an option of Class 1 whereby Class 2 and Class 3 frames may

be transmitted at times when Class 1 frames are not being transmitted. The

Class 2 and Class 3 frames may or may not be destined to the same N_Port as

the Class 1 frames. Both N_Ports as well as the Fabric must support Intermix

for it to be used.

4.4.3.2 CLASS 2

Class 2 is referred to as multiplex due to the fact that it is a

connectionless Class of service with notification of delivery and non-delivery

of frames. Since no dedicated connection needs to be established, a port can

transmit frames to and receive frames from more than one N_Port. As a result,

the N_Ports share the bandwidth of the links with other network traffic.

Frames are not guaranteed to arrive in the order in which they were

transmitted, except in the point-to-point or Loop topologies. Also, the media

speeds may vary for different links, which make up the path. Both buffer-to-

buffer and end-to-end flow control are used in Class 2. Class 2 is more like

typical LAN traffic, such as IP or FTP, where the order and timeliness of

delivery is not so important.

4.4.3.3 CLASS 3

Class 3 is very similar to Class 2. The only exception is that it only uses

buffer-to-buffer flow control. It is referred to a datagram service. Class 3

Page 29: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 29

would be used when order and timeliness is not so important, and when the

ULP itself handles lost frames efficiently. Class 3 is the choice for SCSI.

4.4.3.4 CLASS 4

Class 4 provides fractional bandwidth allocation of the resources of a

path through a Fabric that connects two N_Ports. Class 4 can be used only

with the pure Fabric topology. One N_Port will set up a Virtual Circuit (VC)

by sending a request to the Fabric indicating the remote N_Port as well as

quality of service parameters. The resulting Class 4 circuit will consist of two

unidirectional VCs between the two N_Ports. The VCs need not be the same

speed.

Like a Class 1 dedicated connection, Class 4 circuits will guarantee that

frames arrive in the order they were transmitted and will provide

acknowledgement of delivered frames (Class 4 end-to-end credit). The main

difference is that an N_Port may have more than one Class 4 circuit, possibly

with more than one other N_Port at the same time. In a Class 1 connection, all

resources are dedicated to the two N_Ports. In Class 4, the resources are

divided up into potentially many circuits. The Fabric regulates traffic and

manages buffer-to-buffer flow control for each VC separately using the

FC_RDY Primitive Signal. Intermixing of Class 2 and 3 frames is mandatory

for devices supporting Class 4.

4.4.3.5 CLASS 5

The idea for Class 5 involved isochronous, just-in-time service.

However, it is still undefined, and possibly scrapped altogether. It is not

mentioned in any of the FC-PH documents.

Page 30: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 30

4.4.3.6 CLASS 6

Class 6 provides support for multicast service through a Fabric.

Basically, a device wishing to transmit frames to more than one N_Port at a

time sets up a Class 1 dedicated connection with the multicast server within

the Fabric at the well-known address of hex'FFFFF5'. The multicast server sets

up individual dedicated connections between the original N_Port and all the

destination N_Ports. The multicast server is responsible for replicating and

forwarding the frame to all other N_Ports in the multicast group. N_Ports

become members of a multicast group by registering with the Alias Server at

the well-know address of hex'FFFFF8'. The Class 6 is very similar to Class 1;

Class 6 SOF delimiters are the same as used in Class 1. Also, end-to end flow

control is used between the N_Ports and the multicast server.

4.4.4 ADDRESSING

Unlike many LAN technologies that use a fixed six-byte Media Access

Control (MAC) address, Fibre Channel uses a three-byte address identifier,

which is dynamically assigned during Login. N_Ports transmit frames from

their own Source_ID (S_ID) to a Destination_ID (D_ID). Addresses in the

range of hex'FFFFF0' to hex'FFFFFE' are special, well-known addresses uses

for such things as the Fabric, Alias Server, or the Multicast Server. Before

Fabric Login, the N_Port's S_ID is undefined: hex'000000'. Hex'FFFFFF' is

reserved for broadcast. In a point-to-point topology, Fabric Login will fail of

course, and the two ports will simply chose two unique addresses.

Arbitrated Loop devices still use the three byte address identifiers, but also

use an Arbitrated Loop Physical Address (AL_PA). AL_PAs are one-byte

Page 31: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 31

values dynamically assigned each time the Loop is initialized. Once the Loop

is initialized and (hopefully) each L_Port has selected an AL_PA, public

NL_Ports will attempt Fabric Login. If there is an FL_Port, the Fabric will

assign the upper two bytes of the NL_Port's address identifier and usually

allow the low byte to be the NL_Port's AL_PA. (If not, the Loop will need to

be re-initialized so the NL_Port can select the Fabric assigned AL_PA). If no

Fabric exists or if an NL_Port is a private NL_Port (does not login with the

Fabric), the upper two bytes of the address identifier will remain '0000', and

the lower byte will simply be the NL_Port's AL_PA.

But there still needs to be a way of uniquely identifying a port - even for

much of the above initialization to take place. This is accomplished using

Name_Identifiers, a fixed 64-bit value. Name_Identifiers are used to uniquely

identify nodes (Node_Name), a Port (Port_Name), and a Fabric

(Fabric_Name). Name Identifiers are not used to route frames, but are used in

mapping to upper layer protocols.

4.4.5 LOGIN

Fibre Channel defines two types of login procedures, Fabric and N_Port.

With the exception of private NL_Ports, all other node ports must attempt to

log in with the Fabric. This is typically done right after the link or the Loop

has been initialized. It consists of the node port transmitting an Fabric Login

(FLOGI) frame to the well-known Fabric address hex'FFFFFE'. The normal

response is an Accept (ACC) frame from the Fabric back to the node port.

Fabric Login accomplishes the following things:

Page 32: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 32

It determines the presence or absence of a Fabric.

If a Fabric is present, it provides a specific set of operating

characteristics associated with the entire Fabric, including which Classes

of service are supported.

If a Fabric is present, it shall optionally assign or shall confirm the native

N_Port Identifier of the N_Port that initiated the Login.

If a Fabric is not present, an ACC from an N_Port indicates that the

requesting N_Port is attached in a point-to-point topology.

If a Fabric is present, it initializes the buffer-to-buffer credit.

Before a node port can communicate with another node port, it must

first perform N_Port Login with that node port. Similar to Fabric Login, the

process entails transmitting a PLOGI frame to the destination node port.

Again, the normal response is an ACC frame. N_Port Login accomplishes the

following things:

It provides a specific set of operating characteristics associated with the

destination N_Port, including which Classes of service are supported.

Initializes the destination end-to-end credit.

In point-to-point topology, buffer-to-buffer credit is initialized.

Both Fabric Login and N_Port Login are intended to be long-lived. Once

logged in, a device can stay logged in indefinitely, even if it has no further

data to transmit at that time.

Page 33: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 33

4.5 FC-3: COMMON SERVICES

The FC-3 layer is intended to provide the common services required for

advanced features such as:

4.5.1 STRIPING

Stripping multiplies bandwidth using multiple N_Ports in parallel to

transmit a single information unit across multiple links.

4.5.2 HUNT GROUPS

Hunt grouping is the ability for more than one Port to respond to the

same alias address. This improves efficiency by decreasing the chance of

reaching a busy N_Port.

4.5.3 MULTICAST

Multicast delivers a single transmission to multiple destination ports.

This includes sending to all N_Ports on a Fabric (broadcast) or to only a subset

of the N_Ports on a Fabric.

4.6 FC-4: APPLICATION INTERFACE

FC-4, the highest level in the FC structure defines the application

interfaces that can execute over Fiber Channel. It specifies the mapping of

upper layer protocols using the FC levels below. Fiber Channel is equally

adept at transporting both network and channel information and allows both

protocol types to be concurrently transported over the same physical

interface.

Page 34: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 34

Fig: Supported Application Layer Protocols

The following network and channel Upper Layer Protocols (ULP)

mapping are currently specified or proposed as FC-4s.

Small Computer System Interface (SCSI)

Internet Protocol (IP)

High Performance Parallel Interface (HIPPI) Framing Protocol

Link Encapsulation (FC-LE)

IEEE 802.2 (Logical Link Control)

Asynchronous Transfer Mode - Adaption Layer 5 (ATM-AAL5)

Intelligent Peripheral Interface - 3 (IPI-3) (disk and tape)

Single Byte Command Code Sets (SBCCS)

Future ULPs...

IPI SCSI HIPPI SBCCS 802.2 IP AAL5

Channels Networks

Page 35: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 35

5. TRANSMISSION HIERARCHY

The easiest way to understand the methods by which information is

transmitted over Fiber Channel is by looking at the problem in the form of a

hierarchy.

5.1 8B/10B TRANSMISSION CHARACTER

At the lowest level, Fiber Channel uses the IBM 8B/10B-encoding

scheme. Prior to encoding the data is converted to an internal FC-1 format.

The hexadecimal to FC-1 decimal value translation is accomplished as shown

below.

Fig: Hexadecimal to FC-1 decimal conversion

5 28

K.xx.y

K.28.5

y = The decimal value of the 3 MSB bits

xx = The decimal value of the 5 LSB bits

Eg: BCh = 10111100 = 101 11100

Page 36: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 36

A decimal value is assigned to each bit combination with the range of 0

to 31 for xx and 0 to 7 for y. This means the range of valid data characters

using the FC-1 naming conversion is D00.0 to D31.7

Basically, every byte of data that is to be transmitted is first converted

into a 10-bit value called a Transmission Character. Using this encoding

scheme has the following benefits:

Improvement of the transmission characteristics of information to be

transferred

Provides enough transitions to make clock recovery possible at the receiver

Improves the detection of single and multiple bit errors

Some Transmission Characters contain a unique bit pattern (comma) to aid

in achieving word alignment.

Fiber Channel defines a "1" to simply be the state with more optical

power (for optical links), or the state where the "+" pin is more positive than

the "-" pin (in the case of copper). The 8B/10B encoding uses the idea of

running disparity, which is concerned with the number of 1s and 0s in each

Transmission Character. Running disparity is evaluated after the first 6 bits of

each Transmission Character and again after the last 4 bits and can be either

positive (more 1s than 0s) or negative (more 0s than 1s). It is desirable to try

and equalize the number of 1s and 0s over time. Thus, every byte to be

transmitted is encoded into one of two 10-bit representations depending on

the current running disparity.

As stated, every byte to be transmitted is first converted into a 10-bit

Transmission Character. But there are many more possible 10-bit

Page 37: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 37

Transmission Characters than are needed to map to particular bytes. Most of

the remaining 10-bit encoding are not defined, and only one is used. This is

the special K28.5 Transmission Character, which contains the "comma", a 7-bit

string that cannot occur in any Data Transmission Character. Because of this,

the K28.5 is used as a special control character.

5.2 TRANSMISSION WORD

All information in Fiber Channel is transmitted in groups of four

Transmission Characters called Transmission Words.

Fig: Formation of a transmission word

Some Transmission Words have K28.5 as the first Transmission

Character. These are special Transmission Characters called Ordered Sets.

Some Ordered Sets mark the beginning and end of frames (frame delimiters).

Others convey information in between frames in the form of Primitive Signals

(a single Ordered Set) and Primitive Sequences (a stream of the same Ordered

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Bit

Transmission Word (40 Bits – 4 10-Bit Encoded Bytes

8B/10B Encoded byte 1 (10) 8B/10B Encoded byte 4 (10)

Byte (8 bits) Byte (8 bits)

Page 38: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 38

Set). Examples of Ordered Sets are: Start of Frame (SOF), End of Frame (EOF),

Idle, Receiver_Ready (R_RDY), Loop Initialization Primitive (LIP), Arbitrate

(ARB), Open (OPN), Close (CLS), and several others.

5.3 FRAME

Fiber Channel defines a variable length frame consisting of 36 bytes of

overhead and up to 2112 bytes of payload for a total maximum size of 2148

bytes. The total size of the frame must be an even multiple of four bytes so

that partial Transmission Words are not sent. Between 0 and 3 pad bytes are

appended to the end of the payload to satisfy this rule. A Start of Frame (SOF)

delimiter and End of Frame (EOF) delimiter mark the beginning and end of

each Fiber Channel frame. The Cyclic Redundancy Check (CRC) is the same

32-bit CRC used in FDDI.

Fig: Frame Format

Fig: Organization of Frames

SOF EOF CRC Fill

Bytes Payload Data Field Frame Header

Bytes

Transmission Words

4 4 4 12 to 2112 24

1 1 1 6 3 to 528 1

<=3

Fill Words

Fill Words

Sequence 1 Sequence n

Frame1 Frame.. Frame n Frame1Frame.. Frame n

Exchange 1 Exchange 2

Page 39: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 39

5.4 SEQUENCE

A Fiber Channel Sequence is a series of one or more related frames

transmitted unidirectionally from one port to another. All frames must be part

of a Sequence. Frames within the same Sequence have the same SEQ_ID field

in the header. The SEQ_CNT field identifies individual frames within a

Sequence. For each frame transmitted in a Sequence, SEQ_CNT is

incremented by 1. This provides a means for the recipient to arrange the

frames in the order in which they were transmitted and to verify that all

expected frames have been received. Multiple Sequences to multiple ports

may be active at a time.

5.5 EXCHANGE

A Fiber Channel Exchange is a series or one or more nonconcurrent

Sequences between two ports. The Sequences may be in either direction. All

Sequences (and therefore all frames) must be part of an Exchange. The

originator of the Exchange assigns the OX_ID field. The responder assigns the

RX_ID field. As another perspective, one can use the following analogy:

Frame ~ Word

Sequence ~ Sentence

Exchange ~ Conversation

Of course, one main difference is that a Fibre Channel device can

"speak" more than one sentence and hold more than one "conversation" at a

time.

Page 40: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 40

6. FC ARBITRATED LOOP CONCEPTS

This section describes some basic Fibre Channel Arbitrated Loop (FC-

AL) concepts. FC-AL is a topology for connecting devices in Fibre Channel

environments. Fibre Channel is a serial data channel that provides logical

point-to-point service to two communicating devices. With FC-AL, you can

have a maximum of one point-to-point circuit at any one time. When this

circuit is active, only two L_Ports are communicating, but up to 127 devices

may be attached to and participating on the same loop. All of the L_Ports that

are on the loop but that are not one of the two communicating L_Ports “see”

all data transferred across the loop and retransmit this information so that the

data reaches its intended destination.

6.1 ARBITRATED LOOP PHYSICAL ADDRESS (AL_PA)

Each device communicating on an arbitrated loop must have an

Arbitrated Loop Physical Address (AL_PA). The AL_PA is an 8-bit (1-byte)

8B/10B encoded value that is a valid data character. This 8-bit character, when

encoded to 10 bits, must have an equal number of 1’s and 0’s in the address to

maintain neutral running disparity. Neutral-running disparity is required so

that the AL_PA data character does not change the current running disparity

of the current transmission word. There are 134 characters that result in

neutral disparity. Seven of the 134 neutral disparity characters are reserved.

This leaves 127 valid addresses.

Page 41: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 41

6.2 LOOP INITIALIZATION

Loop initialization is the process used to obtain or verify AL_PAs. Loop

initialization occurs at power-up, when a new node is inserted in the loop, or

for error recovery. During loop initialization, each NL_Port discovers that it is

connected in an arbitrated loop topology and that there may be multiple

NL_Ports on the arbitrated loop. The procedure used for this discovery is

called the loop port state machine (LPSM). The FC-2 protocol is also used.

A buffer on the drive receives each of the following loop initialization frames:

LISM, LIFA, LIPA, LIHA, LISA, LIRP, and LILP. All other frames may be

discarded if the L_Port’s buffer is full. If the NL_Ports finds that there are not

any more NL_Ports attached, but that there is only an F_Port or N_Port

attached, the NL_Port configures itself to operate as an N_Port by going into

N_Port mode. An L_Port begins the loop initialization procedure in the

initializing state at the request of the node. In most cases, the back panel will

be set to provide a hard assigned physical address which will not be changed

by the initialization process, unless duplicate hard assigned physical

addresses are found. The AL_PA of the one FL_Port (if present) is always 00h.

All other AL_PA values will range from 01h - EFh.

The loop initialization process begins when any NL_Port forces the loop into

the INITIALIZING state. This initializing port begins transmitting loop

initialization primitive sequences (LIPs). Any NL_Port can cause this by

sending any of the LIPS. All LIPs cause the 4-step initialization process to

occur. A loss of signal will also force the loop to initialize.

There are five Loop Initialization Primitive (LIP) sequences:

Page 42: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 42

6.2.1 LOOP INITIALIZATION SEQUENCES (LIP)

1. No valid AL_PA : BC 15 F7 F7

Used when a port wants to acquire an AL_PA (Initializing LIP)

2. Loop failure, No valid AL_PA : BC 15 F8 F7

The originating port has detected an input failure but the port does

not have an AL_PA (Loop Failure)

3. Valid AL_PA : BC 15 F7 AL_PS

The originating port has detected poor loop performance, Example:

The port is unable to win the arbitration. (Performance degradation)

4. Loop failure, Valid AL_PA : BC 15 F8 AL_PS

The originating port has detected an input failure. The AL_PS is the

AL_PA of the port. (Loop Failure)

5. Loop Initialization Reset : BC 15 AL_PD AL_PS

The source port (AL_PS) wants to reset the destination port (AL_PD).

All ports complete loop initialization. The selected port performs a

reset after loop initialization. (Selective Reset)

The next port in the loop receives the LIPs and transitions to the

OPEN_INIT state and transmits LIPs to the next port on the loop. This cycle

continues until the port that started the initialization process receives the LIPs.

It then also transitions to the OPEN_INIT state. This means all ports on the

loop are in the OPEN_INIT state at this point.

Each port transmits a minimum of 12 LIPs and then transmits Idles for

the AL_TIME (15 ms). The ports then transmit Loop Initialization Select

Master (LISM) frames to select a loop master who will then control the

initialization process.

Page 43: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 43

6.2.2 LOOP INITIALIZATION STEPS

There are four primary steps involved in initializing the loop.

1. Select a loop master based on the 8-byte port name (Loop Initialization

Select Master—LISM).

2. Assign each port an arbitrated loop physical address (AL_PA). There are

four ways a port can acquire an AL_PA. These are listed below.

• Fabric assigned (Loop Initialization Fabric Assigned—LIFA).

• Previously acquired (Loop Initialization Previously Acquired—LIPA).

• Hard assigned (Loop Initialization Hardware Assigned—LIHA).

• Soft assigned (Loop Initialization Soft Assigned—LISA).

3. Generate AL_PA position map (Loop Initialization Report Position—LIRP).

4. Transmit completed AL_PA position map around the loop (Loop

Initialization Loop Position—LILP).

6.2.3. LOOP INITIALIZATION SELECT MASTER (LISM)

12-byte payload (with 8-byte port name)

The loop master is determined as follows:

• Each NL_Port selects an initial AL_PA of ‘EF’. The FL_Port (if present)

selects an AL_PA of ‘0’.

• Each port transmits LISM with the D_ID and S_ID fields of the header set

to its AL_PA. The payload is set to the port name, which includes the

world wide name (WWN).

• Each port examines the payload in the inbound LISM. If it is greater than

its own, the port transmits a new LISM with its own port name in the

Page 44: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 44

payload. If it is less than its own, the port retransmits the received LISM.

If it is the same as its own, it becomes the loop master.

• The loop master sends ARB (F0) to purge the loop and to inform all other

ports that a master has been selected. When the master receives ARB(F0)

on the inbound fiber, initialization proceeds to LIFA.

6.2.4 LOOP INITIALIZATION FABRIC ASSIGNED (LIFA)

20-byte payload (with 16-byte bit map of AL_PAs)

The loop master primes the bit map with zeroes (0) then sends the bit

map around the loop in the LIFA payload.

Any port which has an AL_PA assigned by the fabric will set a ‘1’ in the

bit map at the position corresponding to its AL_PA. If a ‘1’ already exists, no

map entry is made.

6.2.5.LOOP INITIALIZATION PREVIOUSLY ASSIGNED (LIPA)

20-byte payload (16-byte bit map of AL_PAs)

The loop master transmits the bit map resulting from the LIFA. The

L_Port checks to see if the bit that corresponds to its previously acquired

AL_PA is set. If not, the L_Port sets it to ‘1’. If the L_Port’s bit has already

been set by another port, it will attempt to assume a soft-assigned AL_PA.

The L_Port then retransmits the LIPA frame.

6.2.6 LOOP INITIALIZATION HARD ASSIGNED (LIHA)

20-byte payload (16-byte bit map of AL_PAs)

The loop master transmits the bit map resulting from the LIPA. The

L_Port checks to see if the bit that corresponds to its hard address is set

Page 45: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 45

(usually using switches or jumpers). If not, the L_Port sets it to ‘1’. If the

L_Port’s bit has already been set by another port, it will attempt to assume a

soft-assigned AL_PA (LISA).

The L_Port then retransmits the LIHA frame.

6.2.7 LOOP INITIALIZATION SOFT ASSIGNED (LISA)

20-byte payload

The loop master transmits the bit map resulting from the LIHA. The

L_Port checks to see if there are any free addresses left in the bit map by

checking for the first available ‘0’. The L_Port sets it to ‘1’. If there are no

zeroes in the bit map, all 126 NL_Port addresses have been taken and the port

is not allowed to actively participate in the loop.

The L_Port then retransmits the LISA frame.

6.2.8 LOOP INITIALIZATION REPORT POSITION (LIRP)

132-byte payload

The LIRP and LILP sequences build a mapping between AL_PA values

and participating L_Port positions. This allows all L_Ports to know where all

of the other AL_PA addresses are physically located on the loop. To build this

address map, the loop master primes the 128-byte position map with ‘FF’ in

each position. The loop master then sets byte 0 (the “counter” byte) of the

position map to ‘01’ and places its own AL_PA in byte 1 and then sends the

position map around the loop. Each port increments the position counter (byte

0) by one and places its AL_PA at the map position indicated by the counter.

For example, the second device on the loop (with the loop master counted as

the first device) increments byte 0 by one to make byte 0 has a value of ‘2’ and

Page 46: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 46

then places its AL_PA in position 2 of the position map. Each port retransmits

the LIPA frame until the map completes its journey to each of the devices on

the loop and gets back to the loop master. At this point, the LIRP process

results in a position map containing the physical location and AL_PA of every

device on the loop.

6.2.9 LOOP INITIALIZATION LOOP POSITION (LILP)

132-byte payload

When the loop master gets the LIRP frame back from the loop, it

contains the AL_PAs and physical location of each participating port on the

loop. The loop master retransmits the completed position map (now called the

LILP) to the next port on the loop. This informs all ports of the loop’s physical

make-up and also makes it possible for each port to make a copy of the map

before retransmitting it to the next port.

When the loop master gets the LILP back from the loop, it sends a CLS

followed by Idles. All of the other ports retransmit the CLS and transition to

the Monitoring state. When the loop master gets the CLS back from the loop,

it removes it and then transitions to the Monitoring state. This signals the end

of the initialization process.

6.3 PRIMITIVE SIGNALS CUSTOM MADE FOR FC-AL

There are eight primitive signals used exclusively within arbitrated loop

(FC-AL) topologies. These primitives are listed below.

6.3.1 ARBITRATE (ARBx)

ARBx is transmitted to request access to the loop. Each ARBx contains

the Physical (port) Address (AL_PA) of the requestor.

Page 47: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 47

6.3.2 ARBITRATE (ARB (F0))

ARB (F0) is transmitted to manage access fairness. It is also used to

assign a loop master during initialization.

6.3.2.1 ACCESS FAIRNESS

We need the mechanism of access fairness when two or more ports happen to

request access to the loop at exactly the same time or when one port has

already won access to the loop and others then want to arbitrate to win access.

The access fairness algorithm ensures that all participating NL_Ports will have

equal access to the loop. NL_Ports that use the access fairness algorithm are

called “fair” NL_Ports. Remember that each L_Port can continuously

arbitrate to access the loop. Each L_Port has a priority assigned to it based on

its’ Arbitrated Loop Physical Address (AL_PA). AL_PA “01” has the highest

priority for an NL_Port and AL_PA “EF” has the lowest priority (except for

the special arbitration primitive signal ARB (F0). The access fairness algorithm

creates an access window in which all L_Ports are given an opportunity to

arbitrate and win access to the loop regardless of its’ assigned priority. After

all L_Ports have had an opportunity to win access to the loop, a new access

window is started; however, all L_Ports don’t have to actually choose to win

access, they just have to be given the opportunity to win access in each access

window.

When a fair L_Port has arbitrated for and won access to the loop, that

L_Port will not arbitrate again until it receives at least one Idle. The time

between the first L_Port to win arbitration and transmitting an Idle is an

access window. A special arbitration Primitive Signal (ARB (F0)) prevents the

access window from being reset too early.

Page 48: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 48

When a fair NL_Port has arbitrated for and won access to the loop and

does not detect that another L_Port is arbitrating, it may keep the existing

circuit open indefinitely or close the circuit and retain control of the loop

(without rearbitrating) to open another L_Port on the loop.

An open NL_Port know that another port is arbitrating, by detecting the

open NL_Port’s ARB (F0) primitive sequences and monitors to see if its’

ARB(F0) is replaced by a higher priority address. Since xF0 is the lowest-

priority address, any other NL_Port that is arbitrating will replace the ARB

(F0) with its’ own ARBx (which will always be higher-priority than ARB (F0))

and the highest priority arbitrating L_Port will win arbitration. If the OPEN

L_port receives the ARB (F0) back it knows that no other NL_Port is

arbitrating for the loop.

Once an L_Port has won access to the loop, it may retain control of the loop

indefinitely; however, if access is denied longer than the Error Detect Time

Out Value (E_D_TOV), the offended L_Port can reset the access window to

force arbitration.

When a fair NL_Port has arbitrated for and won access to the loop and

does detect that another L_Port is arbitrating, the NL_Port closes the loop at

the earliest possible time and arbitrates again in the next access window

before opening a different L_Port.

6.3.3 OPEN FULL-DUPLEX (OPNYX)

After successful arbitration, the transmitting port (x) opens the receiving

port (y) for control and data frame transmission and reception. Any FC port

can transmit or receive an OPN.

Page 49: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 49

6.3.4 OPEN HALF-DUPLEX (OPNYY)

After successful arbitration, the initiator opens the target (y) for control

and data frame transmission and reception of control frames. Data frame

transmission from the target is not allowed. Immediately after being opened,

the target does not know where the OPNyy came from and therefore cannot

transmit back specifically to the initiator.

6.3.5 OPEN BROADCAST REPLICATE (OPNfr)

OPNfr is used by the open port (the initiator) to communicate with all

ports in the loop. When received by the targets (the opened ports), they are

not allowed to generate any transmission words (except fill words). They

must replicate and retransmit all received words until a CLS is detected. Both

‘ f ’ and ‘ r ’ are FFh (D31.7 in FC-1 transmission code).

6.3.6 OPEN SELECTIVE REPLICATE (OPNyr)

Similar to OPNfr (see definition above), with the exception that the

initiator can communicate with a subset of the targets on the loop. The target

at AL_PA ‘ y ’ is a member of the subset.

6.3.7 CLOSE (CLS)

Close indicates that the initiator is about to relinquish control of the loop

for the current circuit.

6.3.8 MARK (MRKtx)

Mark may be used for synchronization within the loop (for example,

spindle sync in a RAID application). The third character of the ordered set ‘ t ’

(MK_TP) is a vendor-unique sync code. Seagate drives pass through this

primitive signal without responding to it.

Page 50: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 50

7. CONCLUSION

Fiber channel is the next storage interface. Fiber channel has been

adopted by the major computer systems and storage manufactures as the next

technology. It eliminates distance, bandwidth, scalability, and reliability

issues of SCSI. Fiber Channel equally works well for storage, networks, video,

data acquisition, and many other applications.. It offers higher speed: the base

speed is 100MB/sec, with 200, 400, and 800 planned. FC-AL enables self-

configuring and hot swapping and the maximum number of devices on a

single port, it also provides compatibility with SCSI.

Fiber channel is just the underlying transport layer that SANs uses to

transmit data. This is the language used by the HBAs, hubs, switches and

storage controllers in a SAN to talk to each other. The fiber channel protocol

is a low-level language meaning that it’s just used as a language between the

actual hardware, not the applications running on it.

A number of vendors, including Cisco, Nortel, and Lucent have

introduced FCIP-based products. A hybrid technology called Internet Fiber

Channel Protocol (iFCP) is an adaptation of FCIP that is an adaptation of FCIP

that is used to move Fiber Channel data over IP networks using the iSCSI

protocols. Today, 2 Gps Fiber Channel is the dominant interconnection used

in SANs, but Fiber Channel keeps evolving as SAN adoption grows.

Very recently, Hitachi global storage technologies have announced a

successful 4 Gbps FC-AL data transfer and FC-SATA is under development.

Although some technologies like iSCSI threatens to loosen its stranglehold on

the storage environment. Fiber Channel is so widely implemented that it is

likely to endure all technology for the foreseeable future.

Page 51: Fiber Channel Arbitrated Loop

Fiber Channel Arbitrated Loop

Department of Computer Science, CUSAT 51

8. REFERENCES

Local Area Networks by Gerd Keiser (2003,Tata McGraw-Hill)

http://www.seagate.com/support/disc/manuals/fc/67496a.pdf

http://www.seagate.com/doc/pdf/Fiber Channel.pdf

http://www.USByte.com/common/white%20papers/

http://en.wikipedia.org/wiki/Fiber_Channel/

http://www.snia.org/education/dictionary/f/

http://www.redbooks.ibm.com/redbooks.nsf/

http://his.web.cern.ch/HIS/fcs/