The Fibre Channel Login process is a simple mechanism of an N_Port (node port) discovering the entity it is attached to and sequentially requesting the owner of each entity to pass thru till it has established a session with another N_Port.
1. The Initiator Sends our an FLOGI (Fabric Login Request)
2. If the FLOGI response is LS_RJT, the initiator resends FLOGI (till the max retry count expires).
3. If the FLOGI response is ACCEPT, that indicates that the initiator has a link to a fabric/target. Initiator issues a PLOGI (Port Login Request).
4. If the PLOGI response is LS_RJT, the initiator resends PLOGI (till the max retry count expires).
5. If the PLOGI response is ACCEPT, this indicates that the initiator is now permitted to talk to the process (or service) that is being hosted on this port. So the initiator sends out a PRLI (Process Login Request).
6. If the PRLI response is LS_RJT, the initiator resends PRLI (till the max retry count expires).
7. If the PRLI response is ACCEPT, that indicates that the initiator is successfully connected to the target, and now SCSI FCP operations can be performed. This is like the full feature phase where the initiator can issue SCSI commands, send and receive data, and receive SCSI command response & status issued by the target device.
Once the initiator is done, it can gracefully perform a logout as follows:
8. The initiator sends a PRLO (Process Logout Request) to the target.
9. If the PRLO response is LS_RJT, the initiator retries the Logout.
10. If the PRLO response is ACCEPT, the initiator sends our LOGO (Port logout Request).
11. If the LOGO response is LS_RJT, the initiator retries the Logout.
12. If the LOGO response is ACCEPT, the session ends.
This is a simplified version of the login logout process, and doesn’t take into consideration the operations that happen when the initiator is typically connected in a fabric environment (in which case the initiator logs into different fabric services like the management server, directory server and queries the fabric to get target information).
I’ll try to put up the login sequence of such an environment with details on all the associated process soon.