Fabric Shortest Path First
The FC Protocol uses Fabric Shortest Path First (FSPF) to provide the routing functions. This protocol establishes communication with the other switches in the switched fabric using a Hello protocol. The Hello protocol is also used for the FC switches to exchange the FSPF parameters and capabilities.
The FSPF protocol maintains a distributed topology database with the needed functionality to keep it synchronized among the switches in the fabric, including the routing updates.
The FSPF protocol implements a path computation mechanism to calculate and build the routing topology in a way in which the fastest route will be used to avoid the occurrence of loops. It bases the calculation on the following:
- Link cost: Depending on the speed of the link, a cost value is assigned. It ranges from 1 to 65535. For example, a link operating at 1Gbps will have a link cost of 1000. If a link operates at 2Gbps, the link cost will be 500.
- Number of hops between the destination and the source switch: Each hop represents a node on the path of the Fibre Channel frame.
- Link state: Either up or down. A link in down state is excluded from the topology. The FSPF maintains a Link State Database that is populated with Link State Records (LSRs). The standard defines one type of LSR—the Switch Link Record. This record contains the information for the connectivity of each switch in the fabric.
- Path cost: The path cost is calculated based on the link cost and the number of hops for the available routes with active state links. The route with the lowest path cost is considered the fastest, although it might not be the route with the least number of hops and is selected by the FSPF for use in the communication between the two specific switches.
- Avoidance of the occurrence of communication loops: Runs only on Inter-Switch Links (ISLs) formed from E_Ports and TE_Ports.
- Per-VSAN instance: The FSPF runs per VSAN, which means that there is a separate instance of the protocol for each VSAN, and there is also a separate FSPF database set maintained for each VSAN.
Basically, the FSPF is a routing protocol that calculates the routes between the Domain_IDs in a fabric. Each switch has a unique Domain_ID in a switched fabric. In this way, the FSPF gains knowledge for building a database of how each pair of domain IDs, or each pair of switches, can reach each other in the fastest and most secure way. If you remember, the first field of the FCID is the Domain_ID of the switch, which is connected to an N_Port. The FC frame also contains the SID and DID fields, which contain the Source FCID of the N_Port sending the frames as well as the Destination FCID of the destination N_Port, which is the target of that communication. When the source switch receives the FC frame, it looks in the frame header—more specifically, in the DID. From the destination FCID, it looks at the Domain_ID part. Once it knows the destination of the switch, it needs to find a way to reach it (or a route to it), which it can look up in the routing database created by the FSPF protocol. It selects the route with the lowest path cost, calculated by FSPF, and forwards the FC frame to the next hop switch on the path. The FSPF path selection is based on the cost, as illustrated in Figure 11-20.
Figure 11-20 FSPF Path Cost