You are on page 1of 2

Cisco MDS 9000 Family Command Line Interface Quick Reference Card for SAN-OS Release 2.

Prompts
switch# exec mode switch(config)# global configuration mode switch(config-xxxx)# specific configuration submode

Creating and Configuring VSANs


switch(config)# vsan database switch(config-vsan-db)# vsan x Creates the VSAN numbered x. switch(config-vsan-db)# vsan x name yyyyy Adds a description to a VSAN, where x is the VSAN number and yyyyy is the VSAN description. switch(config-vsan-db)# vsan x interface type slot/port Adds an interface to a VSAN, where x is the VSAN number and type, slot/port is the interface. switch(config-vsan-db)# vsan x interface type slot/port - port Adds a specified range of interfaces into a VSAN from the same line card. switch# show vsan Lists all VSANs. switch# show vsan membership Lists ports within a VSAN. switch(config)# zoneset distribute full vsan xx Configures the switch to distribute all zone sets rather than just the active zone set for the VSAN. switch# show fcalias Displays alias mappings. switch# show zone Displays zone mappings. switch# show zoneset Displays all zone sets. switch# show zoneset act Displays the active zone set for each VSAN, including which devices have logged in and are communicating.

Helpful Hints
? displays available commands or arguments fort a command <tab> completes partially typed command Control-Z backs out to the exec prompt do executes any command you precede with the word do as if the command executed from the exec mode prompt exit backs up a level in prompt no negates the command it precedes | filters output when used with include and exclude commands > redirects output to a file

Basic Switch Configuration


switch# config term Enters global configuration mode. The resulting prompt is switch(config)#

Troubleshooting Commands
switch# fcping fcid 0xaaaaaa vsan x switch# fcping pwwn aa:bb:cc vsan x Sends ECHO over FC frames to determine if the destination device is logged in and communicating. switch# fctrace Traces the route to an N port. switch(config)# fcanalyzer local brief limit-c 0 Captures control frames to console session. switch# show tech-support details Performs a show version, show environment, show module, show run, show hardware, show interface, show accounting log, show process (et al), show license (et al), show system health. switch# tac-pac Creates a gzip file (show_tech_out.gz) on the volatile filesystem of the show tech details command. switch# show version switch# show interface brief switch# show interface fcx/y trunk vsan switch# show module switch# show fspf internal route switch# show topology

Configuration Management
switch# show run Shows the presently-running configuration. switch# copy run start Saves current configuration to startup configuration. switch# install all system image kickstart image Upgrades all modules in any Cisco MDS 9000 family switch.

Alias, Zones, Zone sets


switch# show flogi database Displays the devices that have logged into the fabric. Get pWWNs for aliases and zoning here. switch# show fcns database Displays device name server registration information per VSAN. switch(config)# fcalias name xxxx vsan y Configures an alias mapping for a device where xxxx is the canonical name within VSAN y. switch(config-fcalias)# member pwwn aa:aa:aa Defines a mapping of pwwn aa:aa:aa to fcalias name xxxx. pWWN can be retrieved from the FLOGI or FCNS database. switch(config)# zone name xxxxx vsan y Creates a zone called xxxxx within VSAN y. switch(config-zone)# member fcalias zzzzzz Adds the node referenced by fcalias zzzzzz to the zone. switch(config-zone)# member pwwn aa:bb:cc. Adds the device referenced by pWWN aa:bb:cc... to the zone switch(config)# zoneset name xxxx vsan y switch(config-zoneset)# member aaaa Creates a zone set called xxxx within VSAN y and adds zone aaaa to the zone set.

Basic Interface Configuration Menu


switch(config)# interface fc 3/12 Defines an FC interface on slot 3 port 12. switch(config-if)# no shutdown Enables the interface switch(config)# int mgmt0 switch(config-if)# no shut switch(config-if)# ip address x.x.x.x y.y.y.y Where x.x.x.x is the IP address and y.y.y.y is the subnet mask. switch(config-if)# switchport description line Defines an interface description of 80 characters or less. switch(config)# ip default-gateway x.x.x.x switch(config)# ip route x.x.x.x y.y.y.y z.z.z.z Defines default gateway and static routes for management. switch# clock set hh:mm:ss dd MONTH yyyy Sets the switch clock.

switch# show license usage switch# show logging log switch# show device alias

Cisco MDS 9000 Family Command Line Interface Quick Reference Card for SAN-OS Release 2.x

FCIP Commands Basic


switch# fcip enable Enables FCIP. switch(config)# interface gigabitethernet x/y Enters the interface configuration mode on the Gigabit Ethernet interface (slot x, port y). switch(config-if)# ip address x.x.x.x y.y.y.y Enters the IP address and subnet mask for the Gigabit Ethernet interface. switch(config)# fcip profile n Creates a profile for the FCIP connection. The range for n is 1255. Creates a profile on both switches in the connection. switch(config-profile)# ip address x.x.x.x Associates the profile with the local IP address of the Gigabit Ethernet interface. Do this for both switches in the connection. switch(config)# interface fcip n Creates an FCIP interface. switch(config-if)# use profile n Assigns the profile to the FCIP interface. switch(config-if)# peer-info ipaddr x.x.x.x Assigns the peer IP address information to the FCIP interface. On switch1, assign the IP address information for switch2; on switch 2, assign the IP address information for switch1.

SPAN Commands
switch(config)# span session x Creates a new SPAN session under the ID of x. switch(config-span)# source int fcx/y (rx/tx) Specifies which interface (slot x, port y) to mirror traffic from to a SPAN-destination interface. You can specify ingress frames only (RX), egress frames only (TX), or ALL frames (no RX/TX) following the command. switch(config-span)# destination int fcx/y Specifies which interface (slot x, port y) will receive the mirrored traffic. This interface should be where the packet analyzer is attached. This interface should be configured as an SD port, or SPAN-destination. switch(config)# interface fcx/y switch(config-if)# switchport mode SD switch(config-if)# switchport speed (1000/2000) Configures an interface (slot x, port y) as a SPAN destination interface. Frames to/from interfaces identified within span sessions can be directed to these ports. Packet analyzers should be attached to SD-type ports. The Ethereal packet analyzer is available here: http://www.ethereal.com.

CFS Commands
Cisco Fabric Services (CFS) provides a common infrastructure for automatic configuration synchronization in the fabric. Various SAN-OS applications use CFS. The following examples show commands that support one CFS application, in this case NTP. switch# config term switch(config)# ntp distribute Enables the distribution of the NTP configuration to the fabric. By leveraging CFS, this action need occur just once over the life of the application. switch(config)# ntp server x.x.x.x Forms a server association with a server. switch(config)# ntp commit Commits changes to the active NTP configuration. switch(config)# ntp abort Discards the proposed changes. switch(config)# ntp-pending diff Displays the difference between the active NTP configuration and the proposed changes that go into effect when the ntp commit command executes. switch# show cfs application Shows CFS information for all applications on the switch. switch# show cfs application name name Displays CFS information for the named application.

Inter-VSAN Routing Commands


switch(config)# ivr enable switch(config)# ivr vsan-topology database switch(config-ivr-topology-db)# autonomous fabric-id x switch aa:bb:cc vsan-ranges e,f-g Enables Inter-VSAN routing and defines which VSANs are resident on which switches within the fabric. Can include explicit VSAN definitions or a range. switch(config)# ivr zone name xxxx switch(config-ivr-zone)# member pwwn aa:bb:cc vsan x Creates an Inter-VSAN zone named xxxx. Members must be specified by unique identifiers (alias, pWWN, etc.) and by VSAN. switch(config)# ivr zoneset name xxxx switch(config-ivr-zoneset)# member aaaa Creates an Inter-VSAN zoneset and adds member zones. switch(config)# ivr zoneset activate name aaaa Activates the Inter-VSAN zoneset and enables the zones within the fabric. switch# show ivr vsan-topology

User Commands
switch(config)# username name Defines a user. Enter a name of 32 characters or less. switch(config)# username abcd password wxyz expire 2005-08-31 Creates or updates a user account and password that are set to expire on 2005-08-31. switch(config)# role name name Assigns users to a new role or modifies the profile of an existing role. Enter a name of 16 characters or less. switch(config-role)# description role description Assigns a description to the new role just created. Enter a description of 64 characters or less. switch# show role Displays all roles configured on the switch.

Cisco MDS 9000 Family


Command Line Interface Quick Reference Card SAN-OS 2.x

switch# show ivr zoneset active switch# show ivr tech-support