New User's Guide to Managing Cisco MDS Zones via CLI
20 October 2009
Toward the end of August 2009, I posted an article on how to configure Cisco MDS zones via the command-line interface (CLI). This article is a follow-up to that article; in this post, I’ll review some commands that are helpful inmanaging
As with the first post, this post probably won’t be very helpful to users who are well-versed with the Cisco MDS family of Fibre Channel switches. Hence, why I’ve tagged it as a “new user’s” post. Similarly, I’m not going into the need for zones, as that is covered amply elsewhere.
fcalias rename
switch(config)# fcalias rename <old alias> <new alias> vsan _XXX_
You can also rename zones:
switch(config)# zone rename <old zone name> <new zone name> vsan _XXX_
And you can rename zonesets:
switch(config)# zoneset rename <old zoneset name> <new zoneset name> vsan _XXX_
zoneset clone
Adding a new alias, zone, or zoneset is similar to modifying an existing alias, zone, or zoneset. For example, to add a new alias to an existing zone, you would use these commands:
switch(config)# zone name existing-zone-name-here vsan _XXX_
switch(config-zone)# member fcalias new-alias-to-add
switch(config-zone)# exit
Likewise, adding a new zone to an existing zoneset is similar to defining a new zoneset:
switch(config)# zoneset name existing-zoneset-name vsan _XXX_
switch(config-zoneset)# member new-zone-to-add
switch(config-zoneset)# member another-new-zone
switch(config-zoneset)# exit
include
keyword can be rather handy. Consider this command:
switch# show zone | include server-name
zone name **server-name**-storage vsan _XXX_
fcalias name **server-name** vsan _XXX_
zone name **server-name**-storage2 vsan _XXX_
fcalias name **server-name** vsan _XXX_
include
keywords acts like a bit like grep
. This makes it much easier to filter out only the zones you want or need to see, instead of having to wade through all the currently defined zones. This is not an MDS-specific trick; it’s also applicable in IOS and NX-OS as well. And it works not only with zones, but also with zonesets, FC aliases, etc.
Cisco MDS experts, feel free to post additional suggestions on managing zones via the CLI in the comments below so that all readers can benefit. Thanks for reading!
Tags: CLI · Cisco · FibreChannel · Networking · Storage
← Previous Post: VMware Lab Manager Design Considerations
Next Post: I/O Virtualization and the Double-Edged Sword →
标签:via,Cisco,CLI,zone,vsan,switch,config,zoneset,name From: https://blog.51cto.com/drennetwork/5875411