Tuesday, June 11, 2013

Fiber Channel Notes - Welcome to the SAN World (Storage Series Part-1)


After couple of months break now I am back on my CCIE DC preparation track. Since I was pretty much done with Nexus at Initial level and also did couple of Nexus Installations at work along with OTV deployment I thought to lets start with storage now. Since I had no experience with storage at any level earlier so I thought to start with baby steps as of now and catch up the pace later.

When it comes to storage there is no better choice other to start learning one of Storage Core Protocol known as Fibre Channel AKA FC.

So I did some initial FC study yesterday and compiled some notes for reference. Hope you guys will find it helpful to begin with storage.

 ######################################################################

Fibre Channel (FC)
==================

> FC is a Protocol Stack primarily used to send SCSI commands over the SAN. But we can also run IP/ARP over FC

# FC Suppported topologies

1. P2P (FC-P2P)
2. Arbitrated Loop (FC-AL) similar to Token Ring
3. Switched Fabric (FC-SW) similar to Ethernet

# FC Port Types

1. Node Port AKA N Port - End host (Target or initiator) in P2P or Switched Fabric
2. Node Loop Port or NL Port - Similar to N port but in Arbitrated Loop Topology e.g. > JBOD Connectivity
3. Fabric Port or F Port - Switch port connecting to Node Port
4. Fabric Loop or FL Port - Switch port connecting to Node Loop Port
5. Expansion Port or E Port aka ISL = Link between two switches
6. Trunk Expension Port or TE Port = Link between two switches to carry VSANs similar to DOT1Q trunk in LAN


# Fibre Channel Addressing

1. Physical Address = World Wide Names (WWNs) is equal to MAC in Ethernet = 8 Bytes
2. Logical Address = FC Identifier (FC ID) is equal to IP address = 3 Bytes

* WWN is subdivided into two parts

1. World Wide Node Name (WWNN)

- Switch, Server or Disk's Physical Address

2. World Wide Port Name (WWPN)

- Switch, Server or Disk's Port's Physical Address

E.g. > A HBA with multiple interfaces. HBA will have one WWNN and Each HBA port will have it's own WWPN

Note - WWN is not used in Data Plane

* FCID is subdivided into three fields

1. Domain ID

- Each switch gets a separate domain id

2. Area ID

- Group of ports on switch have an area id

3. Port ID

- End station connected to switch gets a Port ID

> Domain ID is automatically assigned by Principal Switch but can also be manually assigned. Principal switch is analogous to STP root bridge in Ethernet world.


# Fabric Shortest Path First (FSPF) is protocol in SAN used to route traffic between 

  Switches based on FCID's Domain ID

FSPF support ECMP and used Dijkstra Algorithm like OSPF & ISIS and by default enabled on SAN Switch as Service

# FC supports SAN Port Channel using Port Channel Protocol (PCP) roghly analogous to 802.3ad

# In Fibre Channel network all end hosts must first register with the control plane of fabric before sending any traffic

# Fabric Registration has three parts

1. Fabric Login (FLOGI)
2. Port Login (PLOGI)
3. Process Login (PLRI)

FLOGI
++++++

> During FLOGI, the N Port tells switch's F port that it wants to register

> Once Switch gets Flogi Request, it learns the WWNN and WWPN of node

> Later switch assigns FCID to node


PLOGI
+++++

> End to End Login between N Ports

> Initiator (End Device such as server) tells target (Storage Array) that it wants to talk

> Used for applications such as End To End flow control


PLRI
+++++

> Upper Layer protocol login negotiation between N ports


# Fiber Channel Name Server (FCNS) is analogous to ARP cache and helps in FLOGI.


> FCNS is used to resolve WWN to FCID


sh fcns database


sh flogi database



ZONING
======

> Zoning controls which initiators talks to which targets and alalogous to ACL in IP World

- Associates WWNs, FCIDs, aliases etc to control who can talk to whom



Virtual SANs (VSANs)
====================

> VSANs are roughly analogous to VLANs in Ethernet world

> VSANs are used to create small SAN separations within large SAN. Also can be used to isolate the management and failure domain of the network

> Creating a VSAN creates a separate/new set of Fabric Services like FLOGI, FCNS, ZONING, Aliases etc

> Normally we don't create more than two VSANs

> With VSANs, E Port now becomes TE port



HTH...
Deepak Arora

Evil CCIE

No comments: