CodingBox Documentation

FC protocol basics: layers, ports, logins, zoning

Fibre Channel looks like Ethernet at the SFP — same cages, similar optics — and behaves nothing like it above. It is a lossless, connection-oriented transport built for storage: every frame is expected to arrive, in order, and the fabric knows every device by a burned-in name. This page covers the protocol layers, port types, addressing, the login sequence and zoning — the vocabulary needed to read a SAN switch and to understand why its optics are policed so strictly.

Layers

LayerNameContentsOptics relevance
FC-0physicalmedia, connectors, transmitters, receivers, speedsthe SFP: FC optics, speeds
FC-1transmission8B/10B encoding up to 8GFC, 64B/66B from 16GFC; ordered sets; FEC at 16GFC (optional) and 32GFC+ (mandatory)encoding byte, FEC counters
FC-2framing & flow controlframes (up to 2112-byte payload), sequences, exchanges, classes of service, buffer-to-buffer creditscredits set distance — SAN design
FC-3common servicesmulticast, hunt groups (rarely used)
FC-4protocol mappingSCSI (FCP), NVMe (FC-NVMe), FICON, IP over FCNVMe over fabrics

Port types

PortRole
N_Portnode port — an HBA or a storage array port
F_Portfabric port on a switch, connected to an N_Port
E_Portexpansion port — inter-switch link (ISL) between switches
NL_Port / FL_Portarbitrated-loop variants (legacy)
G_Port / U_Portgeneric/universal — a switch port that becomes F or E when it learns what is attached
TE_Port / EX_Porttrunking E_Port (Cisco VSAN trunk) / router port between fabrics
D_Portdiagnostic port — runs optical and electrical loopback tests on a link (Brocade)

Names and addresses

IdentifierSizeMeaning
WWNN — World Wide Node Name64-bitthe device (HBA, array controller)
WWPN — World Wide Port Name64-biteach port; the identity used for zoning and masking
FCID (N_Port ID)24-bitfabric-assigned address: Domain (switch) / Area / Port; changes if the device moves
Well-known addressesFFFFFC name server, FFFFFD fabric controller, FFFFFE fabric login server, FFFFFA management serverfabric services

WWNs are burned into HBAs and array ports; they do not change with cabling — which is why zoning by WWPN survives re-cabling and zoning by port does not.

Login sequence

  1. Link initialisation — speed negotiation (each side tries its speeds from the highest down; a mismatch or a marginal optic shows here), then primitive sequences until both ends are in sync.
  2. FLOGI (fabric login) — the N_Port asks the switch for an FCID and negotiates buffer credits, class of service and frame size.
  3. PLOGI (port login) — N_Port to N_Port (or to the name server) to establish a session.
  4. PRLI (process login) — negotiates the FC-4 protocol (SCSI or NVMe) and its parameters.
  5. Name server registration and query — the device registers its WWPN/FCID and learns which zoned targets exist; RSCN notifications announce later changes.

A port stuck before FLOGI is a physical-layer problem (optics, cable, speed); stuck after FLOGI it is a fabric/zoning problem (Port diagnostics).

Classes of service and flow control

ClassBehaviourUse
Class 1dedicated connectionobsolete
Class 2acknowledged, connectionlessrare
Class 3connectionless, unacknowledged datagram — but never dropped by the fabric thanks to creditspractically all storage traffic
Class Fswitch-to-switch controlfabric services

Buffer-to-buffer credits (BB_Credit): the receiver grants a number of frame buffers; the sender may only transmit that many frames before receiving R_RDY acknowledgements. Nothing is dropped; when credits run out the sender waits — the mechanism behind lossless behaviour, distance limits and slow-drain congestion (SAN design).

Zoning and masking

  • Zoning on the switch limits which WWPNs may see each other; single-initiator zoning (one HBA port with its targets) is the norm. Zone by WWPN, not by port.
  • LUN masking on the array limits which WWPNs may access which volumes.
  • VSANs (Cisco) / Virtual Fabrics (Brocade) partition a switch into independent fabrics; NPIV lets one N_Port present many WWPNs (virtual machines, blade enclosures).
  • Zoning problems look like "no devices" after a good login — check the name server and the active zone set before touching optics.

Speed negotiation and optics

FC ports negotiate the highest common speed automatically (e.g. 32/16/8GFC). The SFP must support the negotiated rate: a 16G SFP in a 32G port limits the port to 16G; a fixed-speed port with an optic of another generation does not link at all. FC SFPs are coded with FC speed and media bits rather than Ethernet codes (Compliance codes), and SAN switches enforce vendor branding strictly (FC optics).

In CodingBox

For an FC SFP the Check transceiver screen decodes the FC speed, media and distance bits (bytes 7–10, 62) so you can see which generations a module claims before it goes into a fabric that will negotiate them.