Showing posts with label CLI. Show all posts
Showing posts with label CLI. Show all posts

Thursday, March 12, 2015

MDS Series Switch Zoning via CLI


Zones are configured within VSANs. The Logical tab displays the VSANs configured in the currently discovered fabric. 
Note: zone information must always be identical for all the switches in the network fabric.

To configure a zone and assign a zone name, follow these steps:

Configuring an Alias

To create an alias using the fcalias command, follow these steps:


Command
Purpose
Step 1 
switch# config t
Enters configuration mode.
Step 2 
switch(config)# fcalias name Alias_Sample vsan 3
switch-config-fcalias#
Configures an alias name (Alias_Sample).
   Step 3
switch-config-fcalias# member pwwn xx:xx:xx:xx:xx:xx:xx:xx
Configures alias members based on the specified port WWN type and value (pWWN xx:xx:xx:xx:xx:xx:xx:xx).

Creating Zone Sets

A zone set consists of one or more zones. A zone can be a member of more than one zone set and consists of multiple zone members. Members in a zone can access each other; members in different zones cannot access each other. Devices can belong to more than one zone.
A zone set can be activated or deactivated as a single entity across all switches in the fabric. Only one zone set can be activated at any time. If zoning is not activated, all devices are members of the default zone. If zoning is activated, any device that is not in an active zone (a zone that is part of an active zone set) is a member of the default zone.
Zoning can be administered from any switch in the fabric. When you activate a zone (from any switch), all switches in the fabric receive the active zone set. Additionally, full zone sets are distributed to all switches in the fabric, if this feature is enabled in the source switch.

Command

Purpose

Step 1 
switch# config tEnters configuration mode.

Step 2 
switch(config)# zoneset name Zoneset1 vsan 3
switch(config-zoneset)#
Configures a zone set called Zoneset1.

Step 3 
switch(config-zoneset)# member Zone1Adds Zone1 as a member of the specified zone set (Zoneset1).

Step 4 
switch(config-zoneset)# zone name 
first-new-zone
switch(config-zoneset-zone)# 
Adds a zone (first-new-zone) to the specified zone set (Zoneset1).

Step 5 
switch(config-zoneset-zone)# member fcid  xxxxxxxxxx

switch(config-zoneset-zone)# 
Adds a new member (FC ID xxxxxxxxxx) to the newly created zone (first-new-zone).


Activating a Zone Set


Changes to a zone set do not take effect to a full zone set until you activate it.

To activate a zone set, follow these steps:

Command

Purpose

Step 1 
switch# config t
switch(config)#
Enters configuration mode.

Step 2 
switch(config)# zoneset activate name Zoneset1 vsan 3Activates the specified zone set.
switch(config)# no zoneset activate name Zoneset1 vsan 3Deactivates the specified zone set

show zone and show zoneset Commands 

show Command

Description

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 zone member pwwn xx:xx:xx:xx:xx:xx:xx:xx

Displays membership status.

show zone statistics

Displays zone statistics.

show zone statistics read-only-zoning

Displays read-only zoning statistics.

show zoneset active

Displays active zone sets.

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.

show running

Displays the interface-based zones.



Wednesday, March 4, 2015

Cisco MDS fabric switch | Command Line cheat sheet







CISCO MDS CLI Cheat Sheet

Show tech-support  is one of the common command that we use in Cisco switches to collect almost all information about the switch.It is very useful for troubleshooting purpose.The output of this command can be provided to technical support representatives when reporting a problem.

To Collect Information from Cisco Switch Use the below mentioned commands
# term len 0
# show tech-support details

Show tech-support will provide a combined output of several other show commands output.

The default output of the show tech-support command includes the output of the following commands:

# show version
# show environment
# show module
# show hardware
# show running-config
# show interface
# show accounting log
# show processes

Useful cisco SAN Switch CLIs commands:

Below are some useful Cisco CLI commands and also the procedure to do zoning using Cisco CLI commands:

Show Commands

Command Description
show clock To display the system date and time and verify the time zone configuration, use the show clock command.
show environment To display all environment-related switch information (status of chassis clock,fan modules, power supply modules etc
show fcalias To display the member name information in a Fibre Channel alias (fcalias),
show interface brief shows the status of the ports on the switch
show interface counters port errors and details of transmission
show interface counters brief port transmission details in brief
show interface transceiver shows details of the sfps used on the ports of the switch
show running-config show the details of the switch, ports , firmware , etc
show interface mgmt0 To display the details of the management console
show vsan xX To display details of a VSAN
show module To display details of the switching module
show interface fcx/x capabilities To details of the matrix support for that port
show port-resources module x To check port resources like bb credits , rate mode , bandwidth for ports on a 24/48 bit module
show interface trunk vsan x-x To checkper vsan information on trunk ports
show vsan membership interface fcx/x – x To check the vsan membership on port level for an interface
show vsan x membership To check the ports that are part of a vsan
show version To display the version of system software that is currently running on the switch, use the show version command.
show vsan To display information about configured VSAN
show vsan usage To check the vsans created and available vsan ids to be created
show wwn To display the status of the WWN configuration
show zone To display zone information
show zoneset To display the configured zone sets
show zoneset active vsan xx To display the active zoneset for a particular vsan
show flogi To list all the FLOGI sessions through all interfaces across all VSANs
show hardware To display switch hardware inventory details,
show port-channel Use the show port-channel command to view information about existing PortChannel configurations.
show running-config To display the running configuration file
show startup-config To display the startup configuration file
show switchname To display the switch network name, use the show switchname command.
show tech-support To display information useful to technical support when reporting a problem
show user-account To display configured information about user accounts
show fc-tunnel To display configured Fibre Channel tunnel information


Configuration Commands:

Command Description
config t This CLI sequence will disable/enable a port on the switch and saves the configuration
interface fcx/x
shutdown / no shutdown
copy running-config startup-config
config t This command sequence put a decription for a switch port(here putting description as emcsaninfo) and saves the configuration
interface fcx/x
switchport description emcsaninfo
copy running-config startup-config
config t This will Assign a bbcredits to a switch port and saves the configuration
interface fcx/x
switchport fcrxbbcredit xx/default
copy running-config startup-config”
config t This will Set ip address for the management interface,set default gateway and save the configuration
interface mgmt0
ipaddress xx.xx.xx.xx 255.255.255.255
no shutdown
ip default-gateway 1.1.2.3
copy running-config startup- config”
config t To delete a Vsan , cannot delete default vsan
vsan database
no vsan XX
config t This step will disable or enable a vsan XX
interface vsan xx
shutdown / no shutdown
config t This will used to set port speed
interface fcx/x
switchport speed 1000/2000/4000/auto/auto max xxxx
config t This will used for configuring rate mode of a switch port
interface fc x/x
switchport rate-mode dedicated/shared
config t Steps to add a port to a port channel
interface fc x/x
channel-group x/auto
config t Steps to manually set the port type on a switch
interface fc x/x
switchport mode e/f/fl/n
config t Steps to enable trunk protocol on a swith (default)
trunk protocol enable
config t Steps to enable/disable trunk on a port level
interface fc x/x
switchport trunk mode on/off/auto
config t Steps to configure an allowed list of vsans to communicate through that port (TE PORT) and allows to add a specific vsan to the allowed list of vsans
interface fc x/x
switchport trunk allowed vsan x-x/x
switchport trunk allowed vsan add x
config t Steps to forcefully reconfigure without affecting traffic and force vsan to configure with data traffic affected
fcdomain restart vsan x
fcdomain restart disruptive vsan x
config t Steps to create a new vsan (default)
vsan database
vsan x
config t Steps to delete a vsan
vsan database
no vsan x
config t Steps to create a vsan ,then assign a name. Steps to suspend a vsan and unsuspend it
vsan database
vsan x
vsan x name abc
vsan x suspend
no vsan x suspend
end
config t Steps to create a vsan and add a port on interface into a vsan
vsan database
vsan x
vsan x interface fcx/x
config t Steps to remove a port on an interface from a vsan
vsan database
vsan x
no vsan x interface fcx/x
config t Steps to remove a port on an interface from a vsan
vsan database
vsan x
no vsan x interface fcx/x