The cisco fabric commands explained in this article are used to perform administration of fibre channel fabric switches including managing VSANs, administration of zonesets using Cisco MDS 9000 series fabric switches.
Two Command Modes
Switches in the Cisco MDS 9000 family have two main command modes:
- User EXEC mode – To change the terminal settings, Display system information. Changes made in this mode are not saved across system reboot.
- Configuration mode – This mode is used to configure features that affect the system as a whole. Changes made in this mode are saved across system resets. By default when you login to the switch, you will be in EXEC mode. You can change to configuration mode using “config t” on the EXEC shell prompt.
The commands available to you at anytime depends on the mode you are in. To obtain a list of available commands in either mode, type a question mark (?) at the system prompt.
A VSAN is a virtual storage area network (SAN). A SAN is a dedicated network that interconnects hosts and storage devices primarily to exchange SCSI traffic. In SANs you use the physical links to make these interconnections. A set of protocols run over the SAN to handle routing, naming, and zoning. You can design multiple SANs with different topologies.
VSAN is used to create a multiple logical SANs over a common physical infrastructure. Each VSAN can contain up to 239 switches and has an independent address space that allows identical Fibre channel ID’s (FC Ids) to be used simultaneously in different VSANs.
VSAN 1 also known as default SAN is used for communication, management and testing purposes. Hence do not use VSAN1 as your production SAN.
For example, in a company you may have Application servers, Database servers, Print servers, etc. Each classification may need to access storage and it can be on the separate VSAN on the switches. Application team’s servers can be on VSAN10, Database teams servers can be on VSAN20 & Print servers can be on VSAN30.
The physical switches are grouped together while creating a VSAN. You can group SwitchA and SwitchB on VSAN10 and the same switches can be grouped on VSAN20 and so on but remember each FC port can be on only one VSAN.
The geographic location of the switches and the attached devices is independent of their segmentation into logical VSANs. No communication between VSANs is possible. Within each VSAN, all members can talk to one another.
The following are few essential VSAN advantages:
- Traffic isolation —Traffic is contained within VSAN boundaries and devices reside only in one VSAN ensuring absolute separation between user groups, if desired.
- Scalability —VSANs are overlaid on top of a single physical fabric. The ability to create several logical VSAN layers increases the scalability of the SAN.
- Per VSAN fabric services —Replication of fabric services on a per VSAN basis provides increased scalability and availability.
- Redundancy —Several VSANs created on the same physical SAN ensure redundancy. If one VSAN fails, redundant protection (to another VSAN in the same physical SAN) is configured using a backup path between the host and the device.
- Ease of configuration —Users can be added, moved, or changed between VSANs without changing the physical structure of a SAN. Moving a device from one VSAN to another only requires configuration at the port level, not at a physical level.
Up to 256 VSANs can be configured in a switch. Of these, one is a default VSAN (VSAN 1), and another is an isolated VSAN (VSAN 4094). User-specified VSAN IDs range from 2 to 4093.
All the commands that are available and its description from the EXEC mode on the switch can be obtained by typing “?” at the EXEC prompt. Since the command list is large, I am posting only some of the useful commands that may need to handle daily tasks.
1. Display VSANs
To show the VSANs you can use the below command,
SwitchA# show vsan vsan 1 information name:VSAN0001 state:active interoperability mode:default loadbalancing:src-id/dst-id/oxid operational state:up vsan 10 information name:VSAN10 state:active interoperability mode:default loadbalancing:src-id/dst-id/oxid operational state:up vsan 20 information name:VSAN20 state:active interoperability mode:default loadbalancing:src-id/dst-id/oxid operational state:up vsan 4094:isolated_vsan
2. Create new VSAN
You can use the below commands to create the new VSAN and add the FC interfaces to the VSANs.
SwitchA# config t SwitchA(config)# vsan database SwitchA(config-vsan-db)# vsan 20 (Creates the new VSAN with VSAN ID 20) SwitchA(config-vsan-db)# vsan 20 name VSAN20 updated vsan 20 SwitchA(config-vsan-db)# end SwitchA# config t SwitchA(config)# vsan database SwitchA(config-vsan-db)# vsan 20 interface fc1/32 (add the interface fc1/32 to VSAN20) SwitchA(config-vsan-db)# end
3. Show FCS Commands
Below is the list of show commands available to display the port and FCS database information and to find the interfaces statistics on the switch.
SwitchA# show fcs ? database Show local database of FCS ie Show Interconnect Element Objects Information internal Show FCS internals platform Show Platform Objects Information port Show Port Objects Information statistics Show statistics for FCS packets. vsan Show list of all the VSANs and plat-check-mode for each
4. Create Zones and Zone Sets
A zoneset is a colections one or more zones. Each zone in a zoneset consists of multiple zone members. These zones members can be FC ports of the initiator (also known as Hosts) and target (also known as Storage). Members in a zone can access each other and members in different zones cannot access each other. Also zone member can be part of multiple zones.
Zones and zonesets can be managed from any switch in the fabric. When zone is activated, all the members of the fabric gets the activated zoneset information and it is distributed across all the switches in the fabric.
Here is an example for how to create zonesets and zones.
SwitchA# config t SwitchA(config)# zoneset name TestZoneset1 vsan 10 SwitchA(config-zoneset)# member TestZone1
- The first command is used to enter in to configuration mode.
- The second command creates a zoneset known as “TestZoneset1″ with VSAN 10. So all the FC members with VSAN10 can be part of this zone.
- The third command, is used to add the zone to the newly created zoneset.
You can use the below commands to create a new zone and add FC members to the zone
First, change to configuration mode.
SwitchA# config t
Create the zone name “TestZone1″ on vsan10
SwitchA(config)# zone name TestZone1 vsan 10 SwitchA(config-zone)#
5. Add Member to a Zone
The below commands is used to add member to a zone. The members can be fcalias, FCID, pWWN, fWWN or a domain ID. The syntax is given below,
SwitchA(config-zone)# member <type> <value>
To add pWWN(generally known as Host port) to a zone:
SwitchA(config-zone)# member pwwn 10:00:00:XX:XX:XX:XX:XX
To add Fabric fWWN(Generally known as storage port) to a zone:
SwitchA(config-zone)# member fwwn 10:01:10:XX:XX:XX:XX:XX
To add FC ID to a zone:
SwitchA(config-zone)# member fcid 0xce00d1
To add FC alias to a zone
SwitchA(config-zone)# member fcalias Host1_10
Note: you can create the fcalias for a WWPN as shown in the next topic.
To Add Domain ID to a zone:
SwitchA(config-zone)# member domain-id 2 portnumber 23
6. Create Alias
The below commands are used to create alias name for the FC ports WWPN’s which can be used in the zoning.
SwitchA(config)# fcalias name Host1_10 vsan 10 SwitchA-config-fcalias# member pwwn 10:00:00:XX:XX:XX:XX:XX
The above commands create alias called Host1_10 for the PWWN (10:00:00:XX:XX:XX:XX:XX) on the VSAN 10.
These are other examples to create alias for FCID, PWWN, FWWN
SwitchA-config-fcalias# member fcid 0x222222 Configures alias members based on the specified FC ID type and value (0x222222). SwitchA-config-fcalias# member pwwn 10:00:00:XX:XX:XX:XX:XX Configures alias members based on the specified port WWN type and value (pWWN 10:00:00:23:45:67:89:ab). SwitchA-config-fcalias# member fwwn 10:00:00:XX:XX:XX:XX:XX Configures alias members based on the specified fWWN type and value (fWWN 10:01:10:01:10:ab:cd:ef).
7. Activate Zoneset
Once the zone are created, you need to activate it otherwise the changes will not take effect
Here are the steps to activate a zoneset,
SwitchA# config t SwitchA(config)# zoneset activate name TestZoneset1 vsan 10
The following are few show zone sets commands that you might use frequently:
- show zone – Displays zone information for all VSANs.
- show zone vsan 1 – Displays zone information for a specific VSAN.
- show zoneset vsan 1 – Displays information for the configured zone set.
- show zoneset vsan 2-3 – Displays configured zone set information for a range of VSANs.
- show zone name Zone1 – Displays members of a zone.
- show fcalias vsan 1 – Displays fcalias configuration.
- show zoneset brief – Displays brief descriptions of zone sets.
- show zone active – Displays active zones.
- show zone status – Displays zone status.
- show zone – Displays zone statistics.