Suppose we have a server and a storage. connect to SAN switches from one port each. Let’s keep the structure a little simple. Briefly, have 2 port Server and 2 port Storage connection.

First, I prefer to defined an ALIAS for all Server and Storage HBA cards:
SAN-SW01:
alicreate “SRV1_HBA1_P1”,”ab:ab:ab:ab:cd:cd:cd:cd″
alicreate “STR1_C1_P1”,”ab:ab:ab:ab:de:de:de:de″
alicreate “STR1_C2_P1”,”ab:ab:ab:ab:ef:ef:ef:ef″
SAN-SW02:
alicreate “SRV1_HBA2_P1”,”ab:ab:ab:ab:fg:fg:fg:fg″
alicreate “STR1_C1_P2”,”ab:ab:ab:ab:gh:gh:gh:gh″
alicreate “STR1_C2_P2”,”ab:ab:ab:ab:hj:hj:hj:hj″
Control:
alishow “SRV1_HBA1_P1”
Routes (zones) are defined one by one. Although it is difficult to define one by one at the beginning, but it provides convenience in cases of removal / change.
SAN-SW01:
zonecreate “ZONE_SRV1_HBA1_P1_STR1_C1P1″,”SRV1_HBA1_P1;STR1_C1P1”
zonecreate “ZONE_SRV1_HBA1_P1_STR1_C2P1″,”SRV1_HBA1_P1;STR1_C2P1”
SAN-SW02:
zonecreate “ZONE_SRV1_HBA2_P1_STR1_C1P2″,”SRV1_HBA2_P1;STR1_C1P2”
zonecreate “ZONE_SRV1_HBA2_P1_STR1_C2P2″,”SRV1_HBA2_P1;STR1_C2P2”
Control:
zoneshow “ZONE_SRV1_HBA1_P1_STR1_C1P1”
All these ZONEs we created are combined under configuration:
SAN-SW01:
cfgcreate “SAN_SW1_CFG”, “ZONE_SRV1_HBA1_P1_STR1_C1P1; ZONE_SRV1_HBA1_P1_STR1_C2P1”
OR
cfgcreate “SAN_SW1_CFG”, “ZONE_SRV1_HBA1_P1_STR1_C1P1”
cfgadd “SAN_SW1_CFG”, “ZONE_SRV1_HBA1_P1_STR1_C2P1”
cfgenable “SAN_SW1_CFG”
cfgsave
SAN-SW1:admin>cfgenable “SAN_SW1_CFG”
You are about to enable a new zoning configuration.
This action will replace the old zoning configuration with the
current configuration selected. If the update includes changes
to one or more traffic isolation zones, the update may result in
localized disruption to traffic on ports associated with
the traffic isolation zone changes.
Do you want to enable ‘SAN_SW1_CFG’ configuration (yes, y, no, n): [no] yes
sw0 Updating flash …
2020/04/22-23:07:42, [ZONE-1022], 47, FID 128, INFO, SAN-SW1, The effective configuration has changed to SAN_SW1_CFG.
zone config “SAN_SW1_CFG” is in effect
Updating flash …
SAN-SW1:admin>
SAN-SW1:admin> cfgsave
You are about to save the Defined zoning configuration. This
action will only save the changes on Defined configuration.
If the update includes changes to one or more traffic isolation
zones, you must issue the ‘cfgenable’ command for the changes
to take effect.
Do you want to save the Defined zoning configuration only? (yes, y, no, n): [no] yes
Nothing changed: nothing to save, returning …
SAN-SW02:
cfgcreate “SAN_SW2_CFG”, “ZONE_SRV1_HBA1_P2_STR1_C1P2; ZONE_SRV1_HBA2_P2_STR1_C2P2”
OR
cfgcreate “SAN_SW2_CFG”, “ZONE_SRV1_HBA1_P2_STR1_C1P2”
cfgadd “SAN_SW2_CFG”, “ZONE_SRV1_HBA2_P2_STR1_C2P2”
cfgenable “SAN_SW2_CFG”
cfgsave
