FCIP

  1. FCIP
  2. IPFC
  3. Exchange B_port parameters (EBP)
  4. FCIP special frame (FSF)
  5. Link keepalive (LKA)
  6. Authenticate special frame (ASF)
  7. Format
    1. FC frame encapsulation
      1. FC-FE header
        1. Encapsulating protocol specific
      2. FC-FE SOF/EOF
    2. FCIP FSF
    3. LKA, LKA LS_ACC
    4. EBP, EBP SW_ACC
    5. ASF

FCIP

  • RFC 3821
  • SCSI → FCP → TCP → IP
  • TCP 3225, IP DF = 1
    • 2 sessions by default: one for data, another for switch-to-switch (class F)
    • MTU = 2300 for IPsec
  • load-balancing
    • over several TCP connections within same FCIP link
    • based on src + dst FCID
    • if several FCIP links are available – FSPF or port-channel
  • interfaces
    • VE_port, VTE_port: FCIP within switch
    • B_port: FCIP separate from switch (e.g., FCIP bridge)
  • usecase: replication between DCs, not applicable for mount
  • high availability
    • port-channel
    • FSPS recalc: disruptive
  • SLPv2 for dynamic discovery
  • does not transport primitive signals and sequences
  • entity mappings:
    • VE/B to FCIP link endpoint (LEP) mapping: 1-1
    • TCP session to FCIP data engine (DE) mapping: 1-1
    • LEP to DE mapping: 1-n
  • QoS:
    • cannot perform IP QoS based on FC header
    • class F support is mandatory, timestamp for it may be 0
    • coordinates FC and TCP flow control: local BB_credit depends on TCP window size from peer
  • FCIP transit time (FTT)
    • measured unidirectionally
    • if > 0.5×E_D_TOV – discard frame
    • FTT value = clock – timestamp
    • requires FC time service or SNTP
(config)# feature fcip

(config)# fcip profile <N>
(config-profile)# ip address <SRC>
(config)# interface fcip <M>
(config-if)# use-profile <N>
(config-if)# peer-info ipaddr <DST>

IPFC

  • IP and ARP over FC
  • RFC 2625
  • IP → pWWN → FCID

Exchange B_port parameters (EBP)

  • SW_ILS
  • replaces ELP after link init for B ports

FCIP special frame (FSF)

  • first packet after TCP session setup
  • carries WWN, FC/FCIP WWN, operational parameters
  • discover peer WWN (no SLP): Acceptor sends correct Destination FC Fabric Entity WWN, Ch = 1, SF = 1
    • Originator cannot send data unless Acceptor responds
    • Acceptor cannot send data unless it sends FSF as well
  • authC

Link keepalive (LKA)

  • ELS, not SW_ILS → valid responses – LS_ACC, LS_RJT (≡ response as well, not error)
  • between VE or B peers
  • any class, F is not mandatory
  • optional
  • connectivity loss ≡ no response for 2 consecutive LKA ⇒ at least 1 LKA per K_A_TOV
  • TCP keepalives should be disabled: shorter interval, do not check FC stack

Authenticate special frame (ASF)

  • SW_ILS
  • authC new TCP session before adding it to FCIP link
  • target sends ASF as response to FSF, over existing TCP session, in order to clarify parameters
  • SCSI can be sent only after receiving SW_ACC

Format

FC frame encapsulation

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
|                                                               |
|                          FC-FE header                         |
|                                                               |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           FC-FE SOF                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
|                           FC header                           |
|                                                               |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/                                                               /
\                          FC payload                           \
/                                                               /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            FC CRC                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           FC-FE EOF                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

FC-FE header

   0     1     2     3     4     5     6     7
+-----+-----+-----+-----+-----+-----+-----+-----+
|                    Protocol                   |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                    Version                    |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                   -Protocol                   |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                   -Version                    |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                                               |
≈   Encapsulating protocol specific (8 bytes)   ≈
|                                               |
+-----+-----+-----+-----+-----+-----+-----+-----+
|      Reserved (0000b)       |CRCV |           |
+-----+-----+-----+-----+-----+-----+           +
|                 Frame length                  |
+-----+-----+-----+-----+-----+-----+-----+-----+
|      -Reserved (1111b)      |-CRCV|           |
+-----+-----+-----+-----+-----+-----+           +
|                 -Frame length                  |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                                               |
|                   Timestamp                   |
|                   (seconds)                   |
|                                               |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                                               |
|              Timestamp fraction               |
|                   (seconds)                   |
|                                               |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                                               |
|                      CRC                      |
|                                               |
|                                               |
+-----+-----+-----+-----+-----+-----+-----+-----+

Protocol: 1 ≡ FCIP
Version: = 1
CRCV: CRC valid, 0 ≡ ignore CRC (always 0 for FCIP, because it uses FC CRC)
Frame length: 4-byte words, whole packet
Timestamp (seconds): time since 00:00 1st January 1900
Timestamp (second fraction): 200 ps units
CRC: = 0 for FCIP

Encapsulating protocol specific

   0     1     2     3     4     5     6     7
+-----+-----+-----+-----+-----+-----+-----+-----+--+
|                    Protocol                   |  |
+-----+-----+-----+-----+-----+-----+-----+-----+  |
|                    Version                    |   \
+-----+-----+-----+-----+-----+-----+-----+-----+    > FC-FE
|                   -Protocol                   |   /  copy
+-----+-----+-----+-----+-----+-----+-----+-----+  |
|                   -Version                    |  |
+-----+-----+-----+-----+-----+-----+-----+-----+--+
| Ch  |         Reserved (000000b)        | SF  |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                Reserved (0x00)                |
+-----+-----+-----+-----+-----+-----+-----+-----+
| -Ch |        -Reserved (111111b)        | -SF |
+-----+-----+-----+-----+-----+-----+-----+-----+
|               -Reserved (0xff)                |
+-----+-----+-----+-----+-----+-----+-----+-----+

SF: special frame, 1 ≡ FSF, 0 ≡ FC frame
Ch: changed, 1 ≡ FSF was changed by FCIP link acceptor (SF = 1), close connection

FC-FE SOF/EOF

   0     1     2     3     4     5     6     7
+-----+-----+-----+-----+-----+-----+-----+-----+
|                    SOF/EOF                    |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                    SOF/EOF                    |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                   -SOF/EOF                    |
+-----+-----+-----+-----+-----+-----+-----+-----+
|                   -SOF/EOF                    |
+-----+-----+-----+-----+-----+-----+-----+-----+

SOF/EOF: ordered set code (OS-code)

FCIP FSF

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                                                               |
|                                                               |
|                          FC-FE header                         |
|                                                               |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        Reserved (0x00)        |       -Reserved (0xff)        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                    Source FC Fabric Entity                    |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Source FC/FCIP Entity Identifier                |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Connection nonce                       |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|F|2|3|4|    Reserved (0x000)   |     Connection usage code     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Destination FC Entity Identifier                |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            K_A_TOV                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       Reserved (0x0000)       |      -Reserved (0xffff)       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Source FC Fabric Entity WWN: sWWN (VE_port) or PS sWWN (B_port)
F,2,3,4: class * frames are intended
Connection usage code: reserved
K_A_TOV: keepalive timeout, max interval between LKA ELS, 0.5×E_D_TOV

LKA, LKA LS_ACC

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Command code  |                   Reserved                    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Command code: 0x80 (LKA), 0x02 (LKA LS_ACC)

EBP, EBP SW_ACC

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      SW_ILS Command code                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            R_A_TOV                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            E_D_TOV                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            K_A_TOV                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Requester/Responder B_Access_Name               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                               |
|                  Class F Service Parameters                   |
|                                                               |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Command code: 0x28010000 (EBP), 0x02000000 (EBP SW_ACC)
R_A_TOV, E_D_TOV, K_A_TOV: ms
EBP SW_RLJ Reason codes:

  • 0x00: no additional explanation
  • 0x01: class F service parameter error
  • 0x02: invalid B_Access_Name
  • 0x03: K_A_TOV mismatch
  • 0x04: E_D_TOV mismatch
  • 0x05: R_A_TOV mismatch

ASF

 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      SW_ILS Command code                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               Destination FC Fabric Entity WWN                |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                        Connection nonce                       |
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Usage flags  |   Reserved    |     Connection usage code     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            Reserved                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Command code: 0x28030000 (ASF)
If all fields match fields from FSF ≡ accepted
ASF SW_ILS has just SW_ILS Command code (0x02000000)