Search

Saturday, May 21, 2011

CCIE SAN Cheatsheet - Darby Weaver

Here's a quick cheat sheet reference for the Cisco MDS Switches:

Create a zone:


1. config t

2. zone name sample_zone_name vsan sample_vsanId

3. member pwwn hba1_wwn

4. member pwwn hba2_wwn

5. exit

6. zoneset name same_zoneset_name

7. member sample_zone_name

8. exit

9. zoneset activate name sample_zoneset_name vsan sample_vsanId

10. zoneset distribute full vsan sample_vsanId

11. exit

12. copy running-config startup-config



Delete a zone:

1. config t

2. no zone name sample_zone_name vsan sample_vsanId

3. zoneset activate name sample_zeonset_name vsan sample_vsanId

4. zoneset distribute full vsan sample_vsanId

5. exit

6. copy running-config startup-config



Delete a zoneset:

1. config t

2. no zoneset name sample_zoneset_name vsan sample_vsanId

3. zoneset distribute full vsan sample_vsanId

4. exit

5. copy running-config startup-config



Create a VSAN and add port 1/1 into the vsan:

1. config t

2. vsan database

3. vsan sample_vsanId name sample_vsanName

4. vsan sample_vsanId interface fc 1/1

5. exit

6. copy running-config startup-config



Bring interface fc1/1 online:

1. config t

2. interface fc1/1

3. no shut

4. exit

5. exit

6. copy running-config startup-config



Enable E port or port-channel to carry traffic for VSAN 2 to 4092:

1. config t

2. interface fc1/1

3. switchport trunk allowed 2-4092

4. exit

5. exit

6. copy running-config startup-config



Add port fc1/1 to a port-channel

1. config t

2. interface fc1/1

3. channel-group 1 (force)

4. exit

5. exit

6. copy running-config startup-config



Configure Fibre Channel domain parameters for a new domain:

1. config t

2. fcdomain domain sample_domainId static vsan sample_vsanId

3. fcdomain fcid persistent vsan sample_vsanId

4. fcdomain restart vsan sample_vsanId

5. exit

6. copy running-config startup-config



Configure switch IP:

1. config t

2. interface mgmt0

3. ip address sample_IP sample_netmask

4. exit

5. ip default-gateway sample_IP

6. ip domain-lookup

7. ip name-server dns-server

8. exit

9. copy running-config startup-config



Configure ntp:

1. config t

2. ntp server sample_ntpServer

3. exit

4. copy running-config startup-config



Enable ssh:

1. config t

2. ssh key dsa 1024 force

3. ssh server enable

4. exit

5. copy running-config startup-config


View ALL HBAs that are logged in:


• show fcns database

View ALL HBAs that are logged in a given VSAN:

• show fcns database vsan sample_vsanId

View all zones:

• show zone

View zones in a VSAN :

• show zone vsan sample_vsanId



View ALL active zones :

• show zone active



View ALL active zones in a VSAN :

• show zone active vsan sample_vsanId



View what zones a given wwn is a part of :

• show zoneset

• show fcns database vsan sample_vsanId



View ALL zonesets :

• show zoneset



View zonesets in a given VSAN:

• show zoneset vsan sample_vsanId



View active zoneset in a given VSAN:

• show zoneset active vsan sample_vsanId



View zoneset member in a given VSAN:

• show zoneset active vsan sample_vsanId



View VSAN:

• show vsan

• show vsan membership

• show vsan sampe_vsanId membership



Ping a WWN:

• fcping pwwn hba_wwn vsan sample_vsanId



Trace a WWN:

• fctrace pwwn hba_wwn vsan sample_vsanId



Show all the interfaces on a switch:

• show interface brief



Show interfaces fc 1/1 on a switch:

• show interface fc1/1



Show Fibre Channel domain:

• show fcdomain



Show Fibre Channel domain for a VSAN:

• show fcdomain vsan sample_vsanId



Configure syslog:

• logging server syslogd_server 6 facility local1



View log setting and log:

• show logging logfile



View log only:

• show logging logfile



Enable logs to be displayed on the current session:

• terminal monitor



Disable logs to be displayed on the current session:

• terminal no monitor



View licenses:

• show licenses

• show license usage



View modules and hardware:

• show module

• show inventory



View configuration:

• show running (running configuration)

• show startup-config (startup configuration)



View software version:

• show version



Other tricks



running a script from a server and run it on the switch using scp:

• copy scp://user@hostname:/path_to_script bootflash:/script_name

• run-script bootflash:/script_name

• delete bootflash:/script_name



grep like function on cli using pipe

• show zone
include 50

• show zone
exclude 50

• show zone
count

No comments: