18
Brocade SAN switch CLI command List

Brocade Command List09

Embed Size (px)

DESCRIPTION

it's free

Citation preview

Page 1: Brocade Command List09

Brocade SAN switch CLI command List

Page 2: Brocade Command List09

Index

1. Show Commands

2. Port Setting commands

3. Setting Commands

4. Time and Date commands

5. License Commands

6. Password Commands

7. User configuration commands

8. Zoning commands

9. Firmware commands

10. Banner commands

11. Node commands

12. Other Useful commands

13. Log collection

14. How to get the list of device node WWN's?

15. How to check whether my host is logged in or not thru CLI?

16. How to validate a zoning in between Initiator and Target?

17. Brocade health check commands

18. ISL and Trunking

19. Zoning

Prep: Sandeep Reddy

Page 3: Brocade Command List09

Introduction:

Brocade Communications Systems, Inc. is an American multinational corporation and a technology company specializing in data and storage networking products. The company's product portfolio spans across Enterprise Ethernet (LAN, WLAN) Switches, WAN (Internet) Routers, SAN Switches.

Brocade hardware products include Fibre Channel switches and directors; Ethernet switches and routers; application delivery controllers (load balancers, etc.); fabric extension switches; embedded switch blades; Fibre Channel host bus adapters (HBAs); and Converged Network Adapters (CNAs). Other hardware solutions from Brocade support common protocols that include iSCSI, FCIP, GigE, FICON, FCoE, CEE, and Layer 4-7 networking protocols. Brocade also sells software-based networking devices including technology for virtual routers, virtual firewalls and VPNs through its wholly owned subsidiary, Vyatta.

Summary of Current Brocade SAN Products:

Brocade Name Max. port speed(GBPS)

Max ports Dell version EMC version IBM version

DCX 8510-8 16 384 DCX 8510-8 ED-DCX8510-8B

SAN768B-2

DCX 8510-4 16 192 DCX 8510-4 ED-DCX8510-4B

SAN384B-2

6505 16 24 DS-6505B SAN24B-5

6510 16 48 6510 DS-6510B SAN48B-5

DCX 8 512 ED-DCX-B SAN768B

DCX-4S 8 256 BDCX ED-DCX-4S-B SAN384B Note: There are some more models which are not mentioned here.

Page 4: Brocade Command List09

Show Commands:

Command Description

psshow Displays the status of the power supply

fansshow Displays the status of the fans

tempshow Displays the status of the temperature readings

sensorshow Displays the status of the sensor readings

nsshow Displays information in the name server

nsshow -t Displays information in the name server

nsshow -rDisplays the information in the name server along with the state change registration details

nscamshowDisplays detailed information of all the devices connected to all the switches in the fabric (Remote Name Servers)

nsallshow Displays the 24 bit address of all devices that are in the fabric

licenseshow Displays all the licenses that have been added in the switch

date Displays the current date set on the switch

httpcfgshow Displays the JAVA version the switch expects at the management console

switchname Displays the switch name

fabricshow Displays information of all the switches in the fabric

userconfig –show -aDisplays the account information like role , description , password exp date , locked status

switchstatusshow Displays the overall status of the switch

switchstatuspolicyshowDisplays policy set for the switch regarding Marginal(Yellow) or Down(Red) error status

portshow To show the port status

portcfgshowDisplays the speed set for all ports on all slots and other detailed port information

configshow fabric.opsDisplays the parameters of the switch. Ensure all switches in a fabric have the same parameters in order to communicate

switchuptime OR uptime Displays the uptime for the switch

firmwareshow Displays the firmware on the switch

version Displays the current firmware version on the switch

hashowDisplays the status of local and remote CP’s. High availability , heartbeat and synchronization

Page 5: Brocade Command List09

nsshow | grep 'N 'To find node WWN's

switchshow Indicators like no light or In_sync will be displayed

Portshow <port> Provides report on errors on a port

porterrshow provides list of port errors, look for delta of counters

portstatsshow <port> Provides details of port errors

portstats64showExtension of portstatsshow when 32 bit counters do not suffice, look for tim_txcrd_z to observe BB_credit deltas

fabriclog -s Helps isolate flapping ports, look out for offline and online sequences

sfpshow Provides information on SFP and their state, check for power

Fabstats show flags any parameter mismatch during merging

Port settings :

Command Description

portcfgshow Displays the port settings

portcfg rscnsupr [slot/port] –enable

A registered state change registration is suppressed when a state change occurs on the port

portcfg rscnsupr [slot/port] –disable

A registered state change registration is sent when a state change occurs on the port

portname To assign a name for a port

portdisable To disable a port or slot

portenable To enable a port or slot

portcfgpersistentdisable To disable a port , status would not change even after rebooting the switch

portcfgpersistentenable To enable a port , status would not change even after rebooting the switch

portshow To show the port status

portcfgspeed To set speed for a port Note – 0:auto negotiated 1,2,4 Gbit/sec , 1 : 1Gbit/sec , 2 : 2 Gbit/sec , 4 : 4Gbit/sec

switchcfgspeedTo set speed for all the ports on the switch Note – 0:auto negotiated 1,2,4 Gbit/sec , 1 : 1Gbit/sec , 2 : 2 Gbit/sec , 4 : 4Gbit/sec

portcfgshowDisplays the speed set for all ports on all slots and other detailed port information

portcfgdefault To set the port settings to default

Page 6: Brocade Command List09

portcfglongdistance

To set the long distance mode . Default is L0(Normal), as per distance will display LE <=10 kms , L0.5 <=25kms , L1 <=50 kms, L2<=100kms , LD=auto , LS = Static

portcfgeport Used to disable a port from being a E port

Setting commands :

Command Description

ipaddrset To set the ip address for the switch

bannersetTo set the banner which will appear when logging in using the CLI or webtools

Time and Date Settings :

Command Description

date Displays the current date set on the switch

tsclockserver 10.10.1.1

Instruction for the principal switch to synchronize time with the NTP server (specify ipaddress of the NTP server)

tsclockserver LOCL Instruction to stop NTP server synchronization (Local time of the switch)

date mmddhhmmyy To set the time of the switch when the NTP server synchronization is cancelled

tstimezone -5 To set the time zone for individual switches

License Commands :

Command Description

licenseshowDisplays all the licenses that are added in the switch

licenseadd To add a new license to the switch

licenseremove To remove a license from the switch

licenseidshow Based on Switch WWN

Page 7: Brocade Command List09

Password commands :

Command Description

passwd To change the password for that particular login

passwdcfg –set -lowercase 3 uppercase 1 -digits 2 -punctuation 2 -minlength 10 -history 3 To set the password rules

passwdcfg –set -minpasswordage 1 To set the minimum password age in Days

passwdcfg –set -maxpasswordage 30 To set the maximum password age in Days

passwdcfg –set -warning 23 To set a warning for the expiration Days remaining

passwdcfg –set -lockoutthreshold 5 To set the account lockout thresh hold

passwdcfg –set -lockoutduration 30 To set the account lockout duration in Minutes

passwdcfg –setdefaultTo restore the password policy to Factory settings (min length – 8, history -1 , lockoutduration – 30)

User Configuration (commands to administer Accounts) :

Command Description

userconfig –show -a / userconfig –show

Displays all the account information like role , description , password exp date , locked status

userconfig –add jdoe -r admin -d “Jane Doe” To add a new account -r = role , -d = description

userconfig –show jdoe Displays all the information for the account jdoe

userconfig –change -e no

To Disable an account , usually default a/cs like admin and user . But ensure before disabling the admin a/c there is another a/c with admin rights

userconfig –change -e yes To Enable an account

Page 8: Brocade Command List09

Zoning Commands :

Command Description

alicreate “Name”, “domain,port no” Used to create alias

alicreate “Name”,”portname1; portname2″ To create more than one ports under one alias

alidelete “Name”

aliadd “Name”, “domain,port no” To add additional ports to an alias

aliremove “Name”, “domain,port no” To remove a port from the alias

alishow “AliName” To show the alias configuration on the switch

zonecreate “Zone Name”, “alias1; alias2″ To create zones based on alias

zonedelete “ZoneName” To delete a zone

zoneadd “ZoneName”, “alias name” To add additional alias into the zone

zoneremove “ZoneName”, “alias name” To remove an alias from the zone

zoneshow “zoneName” To show the zone configuration information

cfgcreate “Configname”, “Zone1; Zone2″ To create configurations by adding in zones

cfgdelete “ConfigName” To delete a configuration

cfgadd “ConfigName”, “Zone3″ To add additional zones in the configuration

cfgremove “ConfigName”, “Zone3″ To remove a zone from the configuration

cfgshow “ConfigName” To show the details of that configuration

cfgenable “ConfigName” To enable a configuration on the switch

cfgsaveTo have the effective configuration to be written into the flash memory

fcping <initiator> <target>helps isolate end to end device connectivity and also an easy method to validate zoning

Page 9: Brocade Command List09

Firmware commands :

Command Description

configupload Saves the switch config as an ASCII text file to an FTP server

configdownloadTo restore a switch configuration from ASCII text file Note – Need to disable the switch before downloading the config file

configure => cfgload attributes : [y] => Ensure secure config upload / download : [y]

Fabric OS v 4.4 & above provides Secure File Copy Protocol (SCP) during upload or download of configurations

firmwaredownload To download the firmware to be installed on the switch

firmwareshow To be run after installing the firmware on the switch

version Displays the current firmware version on the switch

fastbootNeeds to be run after installing the firmware . This doesnot include the post

rebootNeeds to be run after installing the firmware. This includes the post

firmwaredownloadstatus

Licenseshow

Banner Commands :Command Description

bannershowDisplays the banner that will appear when logging in unsing the CLI or webtools

bannersetTo set the banner which will appear when logging in using the CLI or webtools

bannerset “” To remove the bannerset

Node commands:

Command Descriptionnodefind <alias> To find specific device in fabric using Alias

nodefind<WWPN> To find specific device in fabric using WWN

Page 10: Brocade Command List09

Other commands :Command Description

killtelnet To kill a particular session which is using telnet

configure To configure a switch

quitemode To switch off the quietmode

quietmode 1 To suppress messages to the console

switchname Displays the switchname

switchname “EXAMPLE” To assign a switch name

configure To disable/enable TELNETD

timeout Displays the timeout time set for Telnet session on the switch

timeout 10 To set a specific timeout time for the Telnet session

switchuptime OR uptime Displays the uptime for the switch

switchcfgspeedTo set speed for all the ports on the switch Note – 0:auto negotiated 1,2,4 Gbit/sec , 1 : 1Gbit/sec , 2 : 2 Gbit/sec , 4 : 4Gbit/sec

fastboot To reboot the switch without post

reboot To reboot the switch with the post

switchstatusshow Displays the overall status of the switch

switchstatuspolicyshow

Displays policy set for the switch regarding Marginal(Yellow) or Down(Red) error status

switchstatuspolicysetTo change the policy set for the switch regarding Marginal(Yellow) or Down(Red) error status

Log collection

Command Descriptionsupportshow

supportsave

Page 11: Brocade Command List09

Scenarios :

1.How to get the list of device node WWN's ?

A) Issue “Nsshow | grep 'N '.see below for similar output.

Note: Maintain blank space after 'N ' in grep command.

The Red output is the connected Node WWN.

2. How to check whether my host is logged in or not thru CLI?

A) Issue “Node find”. It displays all device Name Server (NS) entries matching a given WWN, device PID, or alias.

a. Using WWN. see below for similar output

b . using Aliases. see below for similar output

c . When there is no match. see below for similar output

Page 12: Brocade Command List09

3. How to validate a zoning in between Initiator and Target?

A) Issue “fcping <initiator> <Target>”.

Note: In the above screen we can see one device that accepts the request and another device that rejects the request .

4. Basic brocade health check commands.

5. ISL and Trunking:

A connection between two switches using the E_Port.

A fabric feature that enables distribution of traffic over the combined up to eight ISL's between adjacent switches,while preserving in-order delivery.

Page 13: Brocade Command List09

Need to check below before performing trunking:

1.check trunking license (using licenseshow) on all the switches.

2.Trunk ports must be E-ports.

3.port speed must be same.

4.port must be enable as Trunk ports(using portcfgtrunkport).

5.Zoning configuration must be the same or one of the switches must be new without configuration. Check with cfgshow and ensure both switches have the same entries. If there is a mismatch or missing zones, create them manually.

6.Ensure that the switches have a unique domain id. Best practice is to set an insistent domain id.

7. Ensure all switch configuration parameters are the same on both. Some of the important parameters are

BB Credit R_A_TOV E_D_TOV Data Field Size Op Mode Non-SCSI Tachyon Mode Disable Device Probing VC Encoded Address Mode Disable Translative Mode Per-frame Route Priority

Basic ISL Trunking Scenario :

Objective : Need to perform ISL Trunking between three brocade DS300 switches.

Connections : Each subordinate switch will be connected to master switch via two cables.

Switch A is master and B and C are subordinate.

Connection Diagram:

NOTE : There is an internal chassis switch connected to C which we will term as D. This switch is already ISL with C and will be removed during the activity.

Cabling: Cable from switch A@port8 will connect to switch B@port9.

Cable from switch A@port9 will connect to switch B@port10.

Cable from switch A@port10 will connect to switch C@port18.

Cable from switch A@port12 will connect to switch C@port19.

Page 14: Brocade Command List09

Note :All the switches are in production and each switch has a active mirror running simultaneously. So no Impact as such as multipathing is enabled.

Steps:

1.Install the license for trunking.

2.After installation of license one need to enable and disable trunking/ISL ports.

3.Check for ISL R_RDY mode on ports should be disables—portcfgislmode.

4.On identified ports enable the trunk mode option.

5.Take configuration backup of all switches involved in activity.

6. Remove cable from switch D before proceeding with activity.

7. Change the Domain ID using the configure command.

8. Save the settings.

9. Disable the switches.

10. Clear configuration from switch B and C.

11. Make the switch A as master and rest of the switches as subordinate.

12. First Switch A to be connected to C.

13. Enable the switch.

14. Issue the fabricShow command to verify that the new switch is in the fabric.

15. Then connect A to B.

16. Enable the switch.

17. Issue the fabricShow command to verify that the new switch is in the fabric.

18. After successful ISL connection b/w three switches connect C to D.

19. Check the configuration in both the switches with cfgshow and effective configuration should be Config_Switch1 in case of FABRIC1 Switches.

20. Verify the devices with switchshow, nsshow outputs.

21. Create new alias & zones in Principal switch i.e. A (which were already there in other switches B and C).

22.Enable effective configuration and effective configuration should be Config_Switch1 in case of FABRIC1 Switches.

Page 15: Brocade Command List09

Commands that enable you to view trunk information

– trunkshow

– switchshow

– islshow

– portcfgshow

commands that allow you to configure trunk parameters

- portcfgtrunkport

- switchcfgtrunk

command that allows you to test trunking

– trunkdebug <start port>,<end port>

a) Trunk show :

switch:admin> trunkshow

b) Islshow

Page 16: Brocade Command List09

C ) Portcfgshow

switch:admin>portcfgtrunkport 8 ,0

switch:admin>portcfgshow

portcfgtrunkport is used to turn on or off trunking on one port,specified by port number.

The last parameter indicates on or off (1 for on and 0 for off).

Usage : portcfgtrunkport [slotnumber/] portnumber Mode

Mode : 1- configure port to be trunking capable

0 – configure port to be trunking incapable

switchcfgtrunk is used to turn on or off trunking capability for the whole switch.

Usage : switchcfgtrunk Mode

Mode : 0 – configure ports to be trunking incapable

1- configure ports to be trunking capable

d) trunkdebug:

switch : admin> trunkdebug <start port #>, <end port #>

Page 17: Brocade Command List09

Zoning can be done by two ways. They are

a) using CLI.

b) web tools,DCFM.

a)Steps for creating zoning using CLI (soft zoning recommended)

a1) alicreate

alicreate "aliName","member[; member...]"

switch : admin> alicreate”HBA0” , ”20:00:00:18:32:0b:66:22”

switch : admin> alicreate “HBA1” ,“21:00:00:20:37:0c:66:23”

a2) Zonecreate

zonecreate "zonename", "member[;member...]"

switch :admin> zonecreate “Zone1” , ”array1;HBA0”

switch :admin> zonecreate “zone2” , “array2;HBA1”

a3) cfgcreate

cfgcreate "cfgName", "member[;member...]"

switch : admin> cfgcreate “cfg_1” , ”zone1,zone2”

a4) cfgenable

cfgenable "cfgName"

switch : admin> cfgenable “cfg_1”

a5) cfgsave

switch :admin> cfgsave

a6) cfgshow

switch :admin> cfgshow

Page 18: Brocade Command List09