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
| Layer | Name | Contents | Optics relevance |
|---|---|---|---|
| FC-0 | physical | media, connectors, transmitters, receivers, speeds | the SFP: FC optics, speeds |
| FC-1 | transmission | 8B/10B encoding up to 8GFC, 64B/66B from 16GFC; ordered sets; FEC at 16GFC (optional) and 32GFC+ (mandatory) | encoding byte, FEC counters |
| FC-2 | framing & flow control | frames (up to 2112-byte payload), sequences, exchanges, classes of service, buffer-to-buffer credits | credits set distance — SAN design |
| FC-3 | common services | multicast, hunt groups (rarely used) | — |
| FC-4 | protocol mapping | SCSI (FCP), NVMe (FC-NVMe), FICON, IP over FC | NVMe over fabrics |
Port types
| Port | Role |
|---|---|
| N_Port | node port — an HBA or a storage array port |
| F_Port | fabric port on a switch, connected to an N_Port |
| E_Port | expansion port — inter-switch link (ISL) between switches |
| NL_Port / FL_Port | arbitrated-loop variants (legacy) |
| G_Port / U_Port | generic/universal — a switch port that becomes F or E when it learns what is attached |
| TE_Port / EX_Port | trunking E_Port (Cisco VSAN trunk) / router port between fabrics |
| D_Port | diagnostic port — runs optical and electrical loopback tests on a link (Brocade) |
Names and addresses
| Identifier | Size | Meaning |
|---|---|---|
| WWNN — World Wide Node Name | 64-bit | the device (HBA, array controller) |
| WWPN — World Wide Port Name | 64-bit | each port; the identity used for zoning and masking |
| FCID (N_Port ID) | 24-bit | fabric-assigned address: Domain (switch) / Area / Port; changes if the device moves |
| Well-known addresses | FFFFFC name server, FFFFFD fabric controller, FFFFFE fabric login server, FFFFFA management server | fabric 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
- 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.
- FLOGI (fabric login) — the N_Port asks the switch for an FCID and negotiates buffer credits, class of service and frame size.
- PLOGI (port login) — N_Port to N_Port (or to the name server) to establish a session.
- PRLI (process login) — negotiates the FC-4 protocol (SCSI or NVMe) and its parameters.
- 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
| Class | Behaviour | Use |
|---|---|---|
| Class 1 | dedicated connection | obsolete |
| Class 2 | acknowledged, connectionless | rare |
| Class 3 | connectionless, unacknowledged datagram — but never dropped by the fabric thanks to credits | practically all storage traffic |
| Class F | switch-to-switch control | fabric 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.