How Fibre Channel Frames are populated and traverse a Fabric?

Solution 1:

At the beginning host knows WWNN and WWPN.

Well, forget WWNN. WWNN, theoretically, should be the same on all ports of all HBAs of a computer, but this is rarely the case. Usually it is the same on one HBA, but I've seen a case of multiport HBA with multiple WWNNs. So it's a bit of a mess.

Upon logging to fabric (FLOGI/PLOGI), host gets to know its P_ID from the switch. And switch learns WWPN/WWNN from the host. Hence switches know which WWPN is assigned one-to-one to which 24-bit P_ID.

Host during the normal operation queries the switch, for example:

  • which WWPNs am I allowed to communicate to?
  • what is the current P_ID of WWPN that I remember as my block device (my hard disk)?

Many people think that WWPN works similarly to MAC address, because the numbers look "similar". They have almost nothing in common and play different roles.

WWPN or WWNN is never used as an address; P_ID is. In DNS and IP analogy, WWPN is sort of like my.node.com: it identifies the address (111.112.113.114), but does not serve as an address during the actual communication; 111.112.113.114 does. In FC, P_ID would be the actual address used in the frames.

This is not a perfect analogy. WWPN is not quite as human-readable as DNS name. And P_ID is a bit more useful than IP, as its very format helps the FC switches to quickly find out how to handle the frame. Anyway this is the large picture.

By the way, there is nothing similar to MAC address in FC (good for us!) - there is no low-level addressing beneath P_ID addressing.