A P P E N D I X  A

Useful Tasks You Will Need to Perform on the Switches

This appendix describes how to perform certain tasks that can only be performed at the command-line interface to a switch. You will need to refer to it when you are configuring the blade system chassis.

For instructions about logging into the switch command-line interface, see Chapter 2.

This chapter contains the following sections:


A.1 Navigating the Command Prompts

 FIGURE A-1 Map of Command Prompts for the Switch

Chart showing how to move between command modes in the switch's command-line interface.


A.2 Exiting the Command-line Interface

A.2.1 Exiting From the Switch to the System Controller

single-step bulletTo exit from the command-line interface on the switch and return to the System Controller's command-line interface, type the `#' character followed immediately by the `.' character.

Wherever you are in the switch's command-line interface, the `#.' escape seq uence will return you to the System Controller's command-line interface.

For example, type (but note that the characters are not echoed to the screen):

Console(config)##.

A.2.2 Exiting to the Switch's Login Prompt

single-step bulletTo return to the switch's login prompt, type exit or end until you are at the Console# prompt, then type:

Console#exit


A.3 Accessing the Web-based Graphical User Interface

You can use a telnet or a web connection to the switch provided that you have set up a DHCP server on your management network. To ensure that the switch receives the same address each time it boots (and makes a DHCP request), you need to specify the following client identifier on your DHCP server: SUNW,SWITCH_ID=serial number of chassis, 0 (for the switch in SSC0) or SUNW,SWITCH_ID=serial number of chassis, 1 (for the switch in SSC1).

To use the web-based GUI, type the IP address or host name of the switch into the web browser's URL field:

http://ip address or host name

The standard port number for an http server is 80 but it is possible to configure the switch to use a different port number for http (for information about how to do this, refer to the Sun Fire B1600 Blade System Chassis Switch Administration Guide). If you have configured the switch to use a different http port number, you need to specify that number after the ip address of the switch in the URL field of your browser. For example, if a switch with the host name switch_1 has been configured to use port 75 for http, then to access it you would type:

http://switch_1 75

To access the same switch by IP address, you would type the IP address followed by the port number (75). For example:

http://192.168.1.202 75

For more information about using the web-based GUI to configure the switch, refer to the Sun Fire B1600 Blade System Chassis Switch Administration Guide.


A.4 Viewing Online Help for the Switch CLI

single-step bulletTo view information about using online help, type help at any time.

single-step bulletTo view context-sensitive online help at any time, type ?.

This displays a list of commands or parameters. If you are at a command prompt, typing ? will display a list of the commands available for the current command mode. If you want to know the parameter or parameters required for a command, type the first word of the command followed by ?. This will display a list of the parameters you can enter plus a description of each one. Each time you type ? after typing an incomplete command, the part of the command you have already typed will be echoed to the console. This means that you do not need to re-type that information.

Sample help information for using the vlan database command to go into the command mode for configuring VLANs is as follows:

Console(config)#vlan 
% Incomplete command.
Console(config)#vlan ?
  database  Enter VLAN database mode
Console(config)#vlan database ?
  <cr>

where <cr> indicates that there are no more parameters required and you must press [ENTER] to return to the command prompt.


A.5 Restoring the Switch to its Factory Default State

For information about the factory default settings of the switch, refer to the Sun Fire B1600 Blade System Chassis Switch Administration Guide.

To restore the switch to its factory default settings, do the following:

1. To check whether the switch is using its factory default configuration, type:

Console#whichboot
                     file name  file type        startup  size (byte)
 -------------------------  -------------- ------- --------
                    diag74  Boot-Rom ima    Y      114248
            runtime_v00423  Operation Code  Y      1429204
Factory_Default_Config.cfg  Config File     Y      2574

If the bottom line of the output from this command includes "Factory_Default_Config.cfg" in the file name column, then the switch is using the default configuration.

2. To make the switch use its factory default configuration, type:

Console#configure
Console(config)#boot system config Factory_Default_Config.cfg
Console(config)#exit

3. Reboot the switch using the factory default configuration.

Type:

Console#reload

4. When prompted for your user name and password, type admin for both.


A.6 Resetting the Switch

A typical reason for resetting the switch is to revert to the startup configuration after making some changes to the running configuration (and you want to discard those changes).

Another reason for resetting the switch is if you have created or downloaded a new configuration file and you want to designate the new file as the default startup file.



Note - Before you reset the switch, save any changes you configuration changes you have made that you want to perserve.



single-step bulletTo reset the switch from the switch's command line, type:

Console#reload

single-step bulletAlternatively, you can reset the switch from the System Controller's command-line.

Type the following at the sc> prompt:

sc>reset sscn/swt

where n is 0 or 1depending on whether you are resetting SSC0 or SSC1.


A.7 Setting the IP address, Netmask, and Default Gateway

1. Set the IP address and netmask by typing:

Console#configure
Console(config)#interface vlan vlan id
Console(config-if)#ip address ip address netmask
Console(config-if)#exit

where:

2. To set the default gateway, type:

Console(config)#ip default-gateway ip address
Console(config)#exit

where ip address is the IP address of the device you are specifying as the default gateway.

3. To confirm the change you have made to the setting for the default gateway, type:

Console#show running-config
building running-config, please wait.....
:
!
interface ethernet NETMGT
 description External RJ-45 connector NETPMGT
 switchport allowed vlan add 2 untagged
 switchport native vlan 2
 switchport allowed vlan remove 1
 switchport forbidden vlan add 1
 spanning-tree edge-port
!
interface vlan 2
 ip address 129.156.203.3 255.255.255.0
 ip dhcp client-identifier text SUNW,SWITCH_ID=900002,0
!
!
!
ip default-gateway  129.156.203.8
:
Console#

The : characters in the sample output above indicate omitted information. The setting for the default gateway is near the end of the output from the show running-config command.


A.8 Setting up VLANs

By default the switch has a management VLAN (VLAN 2) containing its management port (NETMGT), and a data VLAN containing all other ports.

For more information about using VLANs, see Chapter 5, Chapter 6, and Chapter 7.

To create an additional VLAN, you need to set up the VLAN and add ports to it individually.

1. From the Console# prompt, type:

Console#configure

2. Go into vlan configure mode by typing:

Console(config)#vlan database

3. Create the VLAN:

Console(config-vlan)#vlan vlan identifier media ethernet

where vlan identifier is a number from 1 through 4094.

4. To give the VLAN a name, type:

Console(config-vlan)#vlan vlan identifier name media ethernet

where vlan identifier is the number of the VLAN and name is the name you want to use for the VLAN.

5. Populate the VLAN by adding it to individual ports.

a. To do this, first return to configure mode by typing:

Console(config-vlan)#exit

b. Then enter the configure interface mode by typing:

Console(config)#interface ethernet port

where port is the name of the port you want to include in the VLAN.

c. Add the VLAN to a port by typing:

Console(config-if)#switchport allowed vlan add vlan identifier

d. Repeat Step a through Step c for each port you want to include on the new VLAN.


A.9 Saving Your Switch Settings



Note - Make sure you save any switch settings that you want to persist beyond the next reboot of the switch.



single-step bulletTo save any changes you have made, copy the running configuration firmware to the startup configuration firmware.

To do this, type the following in the switch console:

Console#copy running-config startup-config
Startup configuration file name [default filename]:filename
Write to FLASH Programming
-Write to FLASH finish
Success
 
Console#

where default filename is the current startup configuration file, and filename is the name you want to give to a new startup configuration file. If you type [ENTER] instead of specifying a new file name, the running configuration will be written to the current startup configuration file.


A.10 Copying the Configuration of the First Switch to the Second

The procedure for transferring a configuration file from one switch to the other requires you to use TFTP. This means that to perform it you need to have a TFTP server available on your network. The instructions in this section tell you how to do this. They then tell you how to perform the file transfer.

If you have VLANs set up on the switch to separate the different regions of your network from each other, and you are also using IP Network Multipathing (IPMP) to give your server blades redundant connections to the network, you must make sure that the configuration of the second switch matches that of the first.



caution icon

Caution - If the VLAN configuration of the second integrated switch does not match the VLAN configuration of the first, then data passing through the second switch will not be governed by the VLAN definitions on the first. Similarly, any protection of your management network that is enforced by the packet filter on the first switch will be lost if you do not duplicate it on the second switch.



To ensure that the second switch inside the Sun Fire B1600 blade system chassis has the same configuration as the first, follow the instructions in this section.

A.10.1 Setting up a TFTP Server

To configure a Solaris system on your network to serve TFTP requests, do the following:

1. On the system that you intend to set up as the TFTP server, log in as root.

2. Use a text editor to un-comment the following line in the file /etc/inetd.conf:

tftp  dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot

3. On the same system create a TFTP home directory by typing the following at the Solaris prompt:

# mkdir /tftpboot
# chown root /tftpboot
# chmod 755 /tftpboot
# cd /tftpboot
# ln -s . tftpboot

4. Restart inetd by typing:

# pkill -HUP inetd

5. Verify that TFTP is working.

To do this, use TFTP to get a file from the /tftpboot directory. Follow the instructions below:

a. On the system that you are using as the TFTP server, copy any file (for example, the Solaris /etc/release file) to the /tftpboot directory.

To copy the /etc/release file, at the Solaris prompt, type:

# cp /etc/release /tftpboot/filename

where filename is the name of the file you intend to make available on the TFTP server.

b. Make the file you have just copied read-only by all:

# chmod 444 /tftpboot/filename

where filename is the name of the file you intend to make available on the TFTP server

c. Get the file from the TFTP server you have created.

At the Solaris prompt on another system, type the following commands:

% tftp tftp server
tftp>get filename

where tftp server is the host name or IP address of the system running the TFTP server you have set up, and filename is the name of the file you want to try getting from the TFTP server.

d. Still on the Solaris system that you used to initiate the get command, check the content of the file by typing:

# cat filename

where filename is the name of the file you have transferred from the TFTP server.



Note - that TFTP is not the same as FTP. It does not display the same error messages as FTP, and you cannot use the cd or ls commands (or indeed most other commands) that FTP allows you to use.



A.10.2 Transferring the Switch Configuration File

When you have created a TFTP server, and you have also finished configuring the switch in SSC0 or SSC1, then duplicate the configuration of the switch you have configured onto the second switch.

To do this, follow the instructions below. (The instructions assume you are duplicating the configuration of the switch in SSC0 onto the switch in SSC1, but of course you can duplicate the switch in SSC1 onto the switch in SSC0.)

1. Configure switch 0 according to your requirements by following the instructions in Chapter 2, Chapter 3, Chapter 5, Chapter 6, and/or Chapter 7.

2. Save the configuration of switch 0 to a file called, for example, standard.cfg.

To do this, at the switch Console# prompt, type:

Console#copy running-config file
Destination configuration file name: standard.cfg
Write to FLASH Programming
-Write to FLASH finish
Success.
 
Console#

3. Upload the standard.cfg file to the TFTP server.

To do this:

a. Log into the TFTP server as root.

b. Change directory to /tftpboot.

c. Create an empty file called standard.cfg.

#>standard.cfg

4. Make the file read-writeable by all:

#chmod 666 standard.cfg

5. At the command-line interface to the switch, type:

Console#copy file tftp
Choose file type: 
1. config: 2.opcode: <1-2>:1
Source file name: filename
TFTP server ip address: IP address
Desitination file name: filename
Console#

where filename, in both cases, is standard.cfg (if this is the name of the file that you saved your switch configuration to) and IP address is the IP address of the TFTP server.

6. On the TFTP server, use a text editor to open the standard.cfg file.

Change the entry for the host name of switch 0 so that it contains the host name of switch 1:

!
hostname host name of switch 1

If you have chosen to have manually assigned IP addresses for the switches, you must change the entry for the IP address and netmask so that it contains the IP address and netmask of switch 1 instead of those of switch 0:

interface vlan 2
  ip address ip address netmask

If you are using DHCP there is no need to change the IP address and netmask or the DHCP client identifier. The IP address and netmask will be automatically assigned by your DHCP server. And the DHCP client identifier will be automatically assigned by the active System Controller whenever the switch is reset.

7. Save this file with a suitable name, for example, standard1.cfg.

8. Log into switch 1 and (if the switch has not been assigned an IP address by DHCP) set a temporary management IP address on it.

If you have already configured the login and password information for switch 1, then log in using these. If not, log in using the factory default user name (admin) and password (admin).

To set the IP parameters, follow the instructions in Section A.7, Setting the IP address, Netmask, and Default Gateway

9. Download standard1.cfg from the TFTP server to Switch 1.

To do this, type:

Console#copy tftp file
TFTP server ip address:IP address 
Choose file type: 
1. config: 2.opcode: <1-2>:1
Source file name:standard1.cfg 
Destination file name:standard1.cfg
Console#

10. Make this the startup configuration for switch 1.

Type:

Console#configure
Console(config)#boot system config standard1.cfg 
Console(config)#exit
Console#

11. Reload the switch firmware.

Type:

Console#reload


A.11 Using Aggregated Links for Resilience and Performance

If you have external data ports that connect to the same switch as each other, we recommend that you combine them into aggregated links. This gives you both resilience and added performance.

For example, if you had four separate connections to the same external switch and one of those connections failed because of a cabling fault, any communication on the broken connection would be lost. But, if you had set up an aggregated link to include all four connections to the external switch, then if one connection failed, communication would continue on the remaining connections defined in the aggregated link.

As long as no connections are broken, the integrated switch treats all the connections in the aggregated linkas a single high-bandwidth connection to the same network.



Note - If you have duplicate connections to an external switch, hub, or router and you do not make them into an aggregated link, then the integrated switch's Spanning Tree facility will block all of them except one. Therefore, although your network will still benefit from redundancy, none of the duplicated connections will be active until the single unblocked connection fails.



The following sample commands create an aggregated link using ports NETP2, NETP3, and NETP4:

Console(config)#interface port-channel 1
Console(config-if)#exit
Console(config)#interface ethernet NETP2
Console(config-if)#channel-group 1
Console(config-if)#exit
Console(config)#interface ethernet NETP3
Console(config-if)#channel-group 1
Console(config-if)#exit
Console(config)#interface ethernet NETP4
Console(config-if)#channel-group 1
Console(config-if)#exit
Console(config)#


A.12 Enabling Secure Management of Blades

The switch contains a packet filter which by default blocks all traffic from the server blades to the switch's management port (NETMGT). This prevents any possible hostile attack on your management network being launched from a server blade (in the event, for example, of a hacker gaining access to a blade from the public network). However, it means that you cannot communicate directly with the server blades through the management port until you have configured the packet filter to permit management traffic to pass from the server blades to the management port. This section tells you how to do that.



Note - By default the packet filter permits no traffic to pass from the server blades to the management port (NETMGT). Exercise caution when deciding to enable traffic to pass through the packet filter, and in any case only enable the protocols you know you require.



The instructions below tell you which commands to use to permit DHCP, BOOTP, TFTP, SUNRPC, SNMP and NFS frames to pass from the server blades through the packet filter to the management port. This is the minimum set of protocols required to enable the server blades to be administered via the management port:

1. Enable DHCP and BOOTP frames to pass through the packet filter.

In the switch console, type:

Console#configure
Console(config)#ip filter permit udp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 67-68

2. Enable TFTP frames to pass through the packet filter.

Type:

Console#configure
Console(config)#ip filter permit udp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 69
Console(config)#ip filter permit udp 0.0.0.0 0.0.0.0 699-65535 0.0.0.0 0.0.0.0 699-65535

3. Enable SunRPC frames to pass through the packet filter.

Type:

Console#configure
Console(config)#ip filter permit udp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 111
Console(config)#ip filter permit tcp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 111

4. Enable SNMP frames to pass through the packet filter.

Type:

Console#configure
Console(config)#ip filter permit udp 0.0.0.0 0.0.0.0 161 0.0.0.0 0.0.0.0
Console(config)#ip filter permit tcp 0.0.0.0 0.0.0.0 161 0.0.0.0 0.0.0.0
Console(config)#ip filter permit udp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 162
Console(config)#ip filter permit tcp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 162



Note - that the 161 port is the port for SNMP requests on a managed device, and the 162 port is the port for SNMP traps on a managed device. The SNMP traps originate on the managed device. The SNMP commands originate on an SNMP management station.



5. Enable NFS frames to pass through the packet filter.

Type:

Console#configure
Console(config)#ip filter permit udp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 2049
Console(config)#ip filter permit tcp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 2049



Note - For more information about using the ip filter permit command, refer to the Sun Fire B1600 Blade System Chassis Switch Administration Guide. For a list of the port numbers associated with particular protocols, refer to the /etc/services file or the /etc/inet/services file on a Unix system. For a complete list of the port numbers associated with IP services, refer to the web site of the Internet Assigned Numbers Authority (http://www.iana.org).




A.13 Setting Up a Named User on the Switch

1. In the switch console, type:

Console#configure

2. Type:

Console(config)#username username access-level 15

where username is the name you want the user to type when he or she logs in.

The number 15 in the first command signifies that the new user will have access to Privileged Exec mode. (To give a user access to Normal Exec mode only, type 0 instead of 15.)

3. Type:

Console(config)#username username password 0 password

where username is the name you want the user to type when he or she logs in, and password is the new user's password.

The 0 in this command signifies that the value typed for password is not encrypted. If you were to enter the value in its encrypted form, you would have to indicate this by typing 7 instead of 0 before the encrypted text that you specify as the password. However, there is no reason to enter the password in its encrypted form. The switch stores the password

A.13.1 Understanding Why the Switch Needs to be Told That a Password is Not Encrypted

When you set up a password for a user, you need to tell the switch (by putting a 0 or a 7 on the command line) whether you are specifying the user's password in plain text or encrypted form. In practice, you will always specify a 0 to indicate plain text.

The parameter 7 (indicating encrypted text) exists only for the switch's internal use at boot-time. It stores its passwords in encrypted form for security in the configuration file, because the passwords are viewable in this file. For example, you can view them by typing:

Console#> show running-config
:
:
username admin access-level 15
username admin password 7 21232f297a57a5a743894a0e4a801fc3
username guest access-level 0
username guest password 7 084e0343a0486ff05530df6c705c8bb4
enable password level 15 7 1b3231655cebb7a1f783eddf27d254ca
:
:

However, at boot time the switch processes the passwords from this file. And it is therefore during the boot process that it needs to be able to distinguish between passwords presented as plain text and passwords presented as encrypted text. In other words, the parameter 7 that it is possible to enter on the command line (when you set up a user with a password) is of no practical use to you as a user.



Note - You cannot use passwords stored in encrypted form as a method of accessing the switch if you have forgotten the passwords, because you need password access to the switch in order to view them.



A.13.2 The Default User Names and Passwords for the Switch

The default user name (with full access rights) is admin.
The password is admin.

The default user name for guest access (with limited privileges) is guest.
The password is guest.

The default password for the enable command (to transition from guest access to full access) is super.


A.14 Viewing Information About the Switch and its Configuration

This section contains the following information:

A.14.1 Checking the IP Address and VLAN Id

single-step bulletTo check the IP address and VLAN Id of the management port, at the Console# prompt, type:

Console#show ip interface
 IP address and netmask: 129.156.223.215 255.255.255.0 on VLAN 2,
 and address mode: User specified.

A.14.2 Checking the VLAN Configuration

single-step bulletTo check the VLAN configuration of the switch, at the Console# prompt, type:

Console#show vlan
 
VLAN Type    Name             Status    Ports/Channel groups
---- ------- ---------------- --------- ----------------------------------
   1  Static      DefaultVlan   Active   SNP0    SNP1    SNP2    SNP3    SNP4
                                         SNP5    SNP6    SNP7    SNP8    SNP9
                                         SNP10   SNP11   SNP12   SNP13   SNP14
                                         SNP15   NETP0   NETP1   NETP2   NETP3
                                         NETP4   NETP5   NETP6   NETP7
   2  Static         MgtVlan   Active  NETMGT

A.14.3 Finding Out Who is Logged On

single-step bulletTo find out who is logged into the command-line and web interfaces, at the Console# prompt, type:

Console#show users
Username accounts:
  Username Privilege
  -------- ---------
     admin        15
     guest         0
 
 Online users:
  Line        Username Idle time (h:m:s) Remote IP addr.
  ----------- -------- ----------------- ---------------
* 0   console    admin           0:00:00                
 

A.14.4 Inspecting the Current or Startup Configuration

single-step bulletTo view the current configuration of the switch, at the Console# prompt, type:

Console#show running-config

If anybody has changed any switch settings since the last time the switch booted, the running configuration will differ from the start-up configuration

single-step bulletTo view the configuration that the switch received when it last booted (and which it will receive the next time it boots), at the Console# prompt, type:

Console#show startup-config

A.14.5 Finding Out Firmware Version Numbers

single-step bulletTo find out firmware (and other) version information, at the Console# prompt, type:

Console#show version
 
Unit1
 Serial number          : 
 Service tag            :
 Hardware version       :r0b
 Number of ports        :25
 Main power status      :up
 Redundant power status :not present
 
Agent(master)
 Unit id                :1
 Loader version         :0.0.6.7
 Boot rom version       :1.0.0.8
 Operation code version :1.0.0.6
Console#

A.14.6 Viewing MAC Address and General System Information

single-step bulletTo find out the MAC address, and to find out firmware (and other) version information, at the Console# prompt, type:

Console#show system
 
System description: Sun Fire B1600
System OID string: 1.3.6.1.4.1.42.2.24.1
 
System information
 
 System Up time: 0 days, 7 hours, 41 minutes, and 4.4 seconds
 System Name            : [NONE]
 System Location        : [NONE]
 System Contact         : [NONE]
 MAC address            : 08-00-20-7A-92-0B
 Web server             : enable
 Web server port        : 80
 Web secure server      : enable
 Web secure server port : 443
 
 POST result             
 
--- Performing Power-On Self Tests (POST) ---
UART Loopback Test ..................... PASS
Timer Test ............................. PASS
DRAM Test .............................. PASS
I2C Initialization ..................... PASS
Runtime Image Check .................... PASS
PCI Device Check ....................... PASS
AN983 Initialization ................... PASS
AN983 Internal Loopback Test ........... PASS
Switch Driver Initialization ........... PASS
Switch Internal Loopback Test .......... PASS
------------------- DONE --------------------
Console#