Cisco Nexus 4001I and 4005I Switch Module for IBM BladeCenter NX-OS Configuration Guide
Configuring the Switch
Downloads: This chapterpdf (PDF - 295.0KB) The complete bookPDF (PDF - 4.46MB) | Feedback

Configuring the Switch

Table Of Contents

Configuring the Switch

Image Files on the Switch

Starting the Switch

Booting Mechanism

Console Settings

Upgrading the Switch

Upgrade Procedure Summary

Detailed Upgrade Procedure

Downgrading from a Higher Release

Initial Configuration

Configuration Prerequisites

Initial Setup

Preparing to Configure the Switch

Default Login

Configuring the Switch

Changing the Initial Configuration

Accessing the Switch

Additional Switch Configuration

Assigning a Switch Name

Configuring Date, Time, and Time Zone

Adjusting for Daylight Saving Time or Summer Time

NTP Configuration

About NTP

NTP Configuration Guidelines

Configuring NTP

Management Interface Configuration

About the mgmt Interface

Configuring the Management Interface

Displaying Management Interface Configuration

Shutting Down the Management Interface

Managing the Switch Configuration

Displaying the Switch Configuration

Saving a Configuration

Clearing a Configuration

Using Switch File Systems

Setting the Current Directory

Displaying the Current Directory

Listing the Files in a Directory

Creating a Directory

Deleting an Existing Directory

Moving Files

Copying Files

Deleting Files

Displaying File Contents

Saving Command Output to a File

Compressing and Uncompressing Files


Configuring the Switch


This chapter describes basic switch configuration functions. This chapter includes the following sections:

Image Files on the Switch

Upgrading the Switch

Downgrading from a Higher Release

Initial Configuration

Accessing the Switch

Additional Switch Configuration

NTP Configuration

Management Interface Configuration

Managing the Switch Configuration

Using Switch File Systems

Image Files on the Switch

The Cisco Nexus 4001I and 4005I Switch Module for IBM BladeCenter have the following images:

BIOS and loader images combined in one file

Kickstart image

System image that includes a BIOS image that can be upgraded

The switch has flash memory that consists of two separate flash parts:

A 2 MB flash part holds two BIOS and loader images.

A 1 GB flash part holds configuration files, kickstart images, systems images, and other files.

The upgradeable BIOS and the golden BIOS are programmed onto the 2 MB flash part. You cannot upgrade the golden BIOS.

When you download a new pair of kickstart and system images, you also get a new BIOS image because it is included in the system image. You can use the install all command to upgrade the kickstart, system, and upgradeable BIOS images.

This section includes the following topics:

Starting the Switch

Booting Mechanism

Console Settings

Starting the Switch

A switch starts its boot process when it is completely inserted in the slot in the IBM BladeCenter. The switch does not have a power switch.

Booting Mechanism

The switch has a redundant boot BIOS mechanism.

When the switch boots, it checks for the location of the BIOS. If the primary bootflash contains a valid BIOS, the switch boots from there. If the primary bootflash is not there or is corrupted, the switch checks for the secondary BIOS and boots from there.

The BIOS runs a number of tests, and if any test fails, the boot process stops and provides the loader prompt to the user.

Console Settings

The loader, kickstart, and system images have the following factory default console settings:

Speed—9600 baud

Databits—8 bits per byte

Stopbits—1 bit

Parity—none

These settings are stored on the switch, and all three images use the stored console settings.

To change a console setting, use the line console command in configuration mode. The following example configures a line console and sets the options for that terminal line:

switch# configure terminal  
switch(config)# line console  
switch(config-console)# databits 7  
switch(config-console)# exec-timeout 30  
switch(config-console)# parity even  
switch(config-console)# stopbits 2  

You cannot change the BIOS console settings. These are the same as the default console settings.

Upgrading the Switch


Note Users with the network-administrator role can upgrade the software image on the switch.


This section includes the following topics:

Upgrade Procedure Summary

Detailed Upgrade Procedure

Upgrade Procedure Summary

To upgrade the switch software, perform the following steps:


Step 1 Log in to the console port on the switch.

Step 2 Log in to Cisco.com and download the kickstart and system images to a server.

Step 3 Download the kickstart and system images to the switch using the copy command.

Step 4 Install the images using the install all command.


Caution While the switch performs the installation, all traffic through the switch is disrupted.

Detailed Upgrade Procedure


Caution Upgrading a switch disrupts all traffic flow.

To upgrade the software on the switch, perform the following steps:


Step 1 Log in to the switch on the console port connection.

Step 2 Log in to Cisco.com to access the Software Download Center. To log in to Cisco.com, go to the URL http://www.cisco.com/ and click Log In at the top of the page. Enter your Cisco username and password.


Note Unregistered Cisco.com users cannot access the links provided in this document.


Step 3 Access the Software Download Center using this URL:

http://www.cisco.com/cisco/software/navigator.html?a=a&i=rpm

Step 4 Navigate to the software downloads for the switch.

You see links to the download images for the switch.

Step 5 Read the release notes for the related image file.

Step 6 Select and download the kickstart and system software files to a server.

Step 7 Ensure that the required space is available in the bootflash: directory for the image file(s) to be copied:

switch# dir bootflash:
         49     Jul 20 16:09:07 2009  ..tmp-kickstart
         26     Jul 20 16:09:08 2009  ..tmp-system
       1347     Jan 22 10:54:09 2009  StartupConfigFile
       4096     Jan 06 00:13:05 2009  TCLscipts/
       9244     Aug 12 07:17:06 2009  aclqosapi.log
   20834304     Aug 15 09:40:33 2009  block_kic.bin
   73822994     Aug 15 10:02:45 2009  block_sys.bin
   26001920     Feb 16 22:38:46 2009  diag-dce1ru-4.0.1a.bin
       4096     Dec 08 12:09:05 2008  electra/
    1537212     Aug 14 10:08:27 2009  fipsm.out
    4130990     Aug 15 14:09:11 2009  fwm_cm.bin
     399430     Sep 02 01:03:18 2009  klm_solm.klm
      78007     Sep 02 01:02:58 2009  libsolmcli.so
       1210     Mar 04 00:40:45 2009  linux-gdbserver.sh
       2155     Apr 01 00:13:32 2009  local.isan.init
      49152     Jul 20 16:09:07 2009  lost+found/
    3514473     Aug 31 18:52:18 2009  n4000_dplug.4.1.2.E1.0.175.gbin
   20768768     Aug 29 23:17:18 2009  n4000_kickstart.4.1.2.E1.0.174.gbin
   20272128     Aug 31 18:53:33 2009  n4000_kickstart.4.1.2.E1.0.175.gbin
   74497726     Aug 31 19:13:35 2009  n4000_system.4.1.2.E1.0.175.gbin
   73946627     Sep 09 11:36:46 2009  n4000_system.4.1.2.E1.0.189.bin
    6190714     Sep 02 06:56:42 2009  netstack.bin
       4096     Apr 14 03:01:17 2009  newer-fs/
   73844616     Aug 15 16:29:00 2009  pc_block.sys.bin
       4096     Mar 26 22:11:09 2009  plugin/
     493264     Sep 02 00:59:10 2009  solm.bin
       5446     Sep 02 00:59:31 2009  solm.cli
   20683264     Aug 14 11:18:28 2009  taishan_kickstart.4.1.2.E1.0.164.bin
   73837768     Aug 14 11:07:30 2009  taishan_system.4.1.2.E1.0.164.bin
       4096     Mar 19 21:26:29 2009  vdc_2/
       4096     Mar 19 21:26:29 2009  vdc_3/
       4096     Mar 19 21:26:29 2009  vdc_4/
 
   
Usage for bootflash://sup-local
  846000128 bytes used
     671744 bytes free
  846671872 bytes total

Tip We recommend that you keep the kickstart and system image files for at least one previous software release to use if the new image files do not load successfully.


Step 8 Install the new images, specifying the new image names that you downloaded:

switch(config)# install all kickstart bootflash:n4000-bk9-kickstart.4.1.2.E1.1.bin system 
bootflash:n4000-bk9.4.1.2.E1.1.bin  

The install command performs the following actions:

Performs compatibility checks (equivalent to the show incompatibility command) for the images that you have specified. If there are compatibility issues, an error message is displayed and the installation does not proceed.

Displays the compatibility check results and displays whether the installation is disruptive.

Provides a prompt to allow you to continue or abort the installation.


Note A disruptive installation causes traffic disruption while the switch reboots.


Updates the boot variables to reference the specified images and saves the configuration to the startup configuration file.

Step 9 After the switch completes the installation, log in and verify that the switch is running the required software version:

switch# show version
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2009, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained herein are owned by
other third parties and are used and distributed under license.
Some parts of this software are covered under the GNU Public
License. A copy of the license is available at
http://www.gnu.org/licenses/gpl.html.
 
   
Software
  BIOS:      version 1.0.28
  loader:    version N/A
  kickstart: version 4.1(2)E1(1) [build 4.1(2)E1(1)] [gdb]
  system:    version 4.1(2)E1(1) [build 4.1(2)E1(1)] [gdb]
  BIOS compile time:       06/17/09
  kickstart image file is: bootflash:///n4000_kickstart.4.1.2.E1.1.gbin
  kickstart compile time:  8/28/2009 23:00:00 [08/29/2009 10:06:33]
  system image file is:    bootflash:///n4000_system.4.1.2.E1.1.gbin
  system compile time:     8/28/2009 23:00:00 [08/29/2009 09:50:46]
 
   
 
   
Hardware
  cisco Nexus4010 Chassis ("20x10GE/supervisor")
  Motorola, e500v2  with 2076512 kB of memory.
  Processor Board ID JAB1303003F
 
   
  Device name: n4000
  bootflash:     589836 kB
 
   
Kernel uptime is 0 day(s), 7 hour(s), 52 minute(s), 10 second(s)
 
   
Last reset at 899227 usecs after  Thu Sep  3 07:27:36 2009
 
   
  Reason: Reset Requested by CLI command reload
  System version: 4.1(2)E1(0.170)
  Service:
 
   
plugin
  Core Plugin, Ethernet Plugin
 
   

Downgrading from a Higher Release

The procedure to downgrade the switch is identical to a switch upgrade, except that the image files to be loaded are for an earlier release than the image currently running on the switch.


Note Prior to downgrading to a specific release, check the release notes for the current release installed on the switch, to ensure that your hardware is compatible with the specific release.


To downgrade the software on the switch, perform the following steps:


Step 1 Locate the image files you will use for the downgrade by entering the dir bootflash: command.

If the image files are not stored on the bootflash memory, download the files from Cisco.com (using steps 1 through 9 of the software upgrade procedure).

Step 2 Install the new images.

switch(config)# install all kickstart bootflash:n4000-bk9-kickstart.4.1.2.E1.1.bin system 
bootflash:n4000-bk9.4.1.2.E1.1.bin  

The install all command performs the following actions:

Performs compatibility checks (equivalent to the show incompatibility command) for the images that you have specified. If there are compatibility issues, an error message is displayed and the installation does not proceed.

Displays the compatibility check results and displays whether the installation is disruptive.

Provides a prompt to allow you to continue or abort the installation.


Note A disruptive installation causes traffic disruption while the switch reboots.


Updates the boot variables to reference the specified images and saves the configuration to the startup configuration file.

Step 3 After the switch completes the installation, log in and verify that the switch is running the required software version:

switch# show version 


Initial Configuration

The section includes the following topics:

Configuration Prerequisites

Initial Setup

Preparing to Configure the Switch

Default Login

Configuring the Switch

Changing the Initial Configuration

Configuration Prerequisites

The following procedure is a review of the tasks you should have completed during hardware installation. These tasks must be completed before you can configure the switch.

Before you configure a switch, perform the following steps:


Step 1 Verify the following physical connections for the new switch:

The console port is physically connected to a computer terminal (or terminal server).

The management Ethernet port (mgmt0) is connected to an external hub, switch, or router.

See the Cisco Nexus 4001I and 4005I Switch Module for IBM BladeCenter Hardware Installation Guide for more information.


Tip Save the host ID information for future use (for example, to enable licensed features). The host ID information is provided in the Proof of Purchase document that accompanies the switch.


Step 2 Verify that the default console port parameters are identical to those of the computer terminal (or terminal server) attached to the switch console port:

9600 baud

8 data bits

No parity

1 stop bit


Initial Setup

The first time that you access a switch in the IBM BladeCenter, it runs a setup program that prompts you for the IP address and other configuration information necessary for the switch to communicate over the Ethernet interface. This information is required to configure and manage the switch.


Note The IP address can only be configured from the CLI. When the switch powers on for the first time, you should assign the IP address.


Preparing to Configure the Switch

Before you configure the switch for the first time, you need the following information:

Administrator password.


Note If a password is weak (short, easy-to-decipher), your password configuration is rejected. Be sure to configure a strong password.


If you are using an IPv4 address for the management interface, you need the following information:

IPv4 subnet mask for the switch management interface.

IPv4 address of the default gateway (optional).

SSH service on the switch (optional).

To enable this service, select the type of SSH key (dsa/rsa/rsa1) and number of SSH key bits (768 to 2048).

NTP server IPv4 address (optional).

SNMP community string (optional).

switch name (optional).

This is your switch prompt.

An additional login account and password (optional).


Note If you are using IPv4, be sure to configure the IPv4 route, the IPv4 default network address, and the IPv4 default gateway address to enable SNMP access.


Default Login

The switch has the network administrator as a default user (admin). You cannot change the default user at any time.

There is no default password so you must explicitly configure a strong password. If a password is trivial (short, easy-to-decipher), your password configuration is rejected. Be sure to configure a strong password. If you configure and subsequently forget this new password, you have the option to recover this password.


Note If you enter a write erase command and reload the switch, you must reconfigure the default user (admin) password using the setup procedure.


Configuring the Switch

This section describes how to initially configure the switch.


Note Press Ctrl-C at any prompt to skip the remaining configuration options and proceed with what you have configured up to that point. Entering the new password for the administrator is a requirement and cannot be skipped.



Tip If you do not want to answer a previously configured question, or if you want to skip answers to any questions, press Enter. If a default answer is not available (for example, switch name), the switch uses what was previously configured and skips to the next question.


Once the switch boots up and displays the initial configuration dialog on the serial console connection, you can configure the switch.

To enter the basic configuration parameters, perform the following steps:


Step 1 Use a terminal emulator to access the console port of the switch.

You can now configure the switch.


Note Register the switch immediately with your supplier. Failure to register may affect response times for the initial service call. The device must be registered to receive entitled support services.


Step 2 Enter the basic configuration information.

The following example shows how to start the basic configuration setup:

switch# setup
 
 
   
         ---- Basic System Configuration Dialog ----
 
This setup utility will guide you through the basic configuration of
the system. Setup configures only enough connectivity for management
of the system.
 
*Note: setup is mainly used for configuring the system initially,
when no configuration is present. So setup always assumes system
defaults and not the current system configuration values.
 
Press Enter at anytime to skip a dialog. Use ctrl-c at anytime
to skip the remaining dialogs.
 

Step 3 Enter the setup mode by entering yes.

The following example shows how to enter the setup mode:

Would you like to enter the basic configuration dialog (yes/no): yes
 

Step 4 Create additional accounts by entering yes (no is the default).

The following example shows how to create additional accounts:

Create another login account (yes/no) [n]: y
 

a. Enter the user login ID:

    Enter the User login Id : <ID>
 

b. Enter the user password:

    Enter the password for "qatest": <password>
Please enter a valid password.
 
    Confirm the password for "qatest":<password>
Please enter a valid password.
 
   

c. Enter the default user role:

    Enter the user role [network-operator]:<role>
 
   

Step 5 Configure an SNMP community string by entering yes.

The following example shows how to configure an SNMP community string:

  Configure read-only SNMP community string (yes/no) [n]: y
 
    SNMP community string : <string>
 

Step 6 Enter a name for the switch.

The following example shows how to enter the switch name:

  Enter the switch name : ibm-switch-1
 

Step 7 Configure out-of-band management by entering yes.

The following example shows how to configure out-of-band management:

  Continue with Out-of-band (mgmt0) management configuration? (yes/no) [y]:
 
    Mgmt0 IPv4 address : 10.10.10.1
 
    Mgmt0 IPv4 netmask : 255.255.255.0
 

Step 8 Configure the IPv4 default gateway (recommended) by entering yes. You can then enter its IP address.

The following example shows how to configure the default gateway:

  Configure the default gateway? (yes/no) [y]:
 
    IPv4 address of the default gateway : 10.10.10.100
 

Step 9 Enable the Telnet service by entering yes.

The following example shows how to enable the Telnet service:

  Enable the telnet service? (yes/no) [y]:
 

Step 10 Enable the SSH service by entering yes.

The following example shows how to enable the SSH service:

  Enable the ssh service? (yes/no) [n]:
 

Step 11 Configure the NTP server by entering yes.

The following example shows how to configure the NTP server:

  Configure the ntp server? (yes/no) [n]:
 
The following configuration will be applied:
  username qatest password <user-password> role network-operator
  snmp-server community topspin ro
  switchname ibm-switch-1
interface mgmt0
ip address 10.10.10.1 255.255.255.0
no shutdown
ip route 0.0.0.0/0 10.10.10.100
  telnet server enable
  no ssh server enable
 

Step 12 Configure the FCOE service by entering yes (or y), as in the following example (the default is no):

Enable FCOE service? (yes/no) [n]:
 
   

After the prompt for the FCOE service, the configuration displays.

The following configuration will be applied:
  username qatest password <user-password> role network-operator
  snmp-server community topspin ro
  switchname ibm-switch-1
interface mgmt0
ip address 10.10.10.1 255.255.255.0
no shutdown
ip route 0.0.0.0/0 10.10.10.100
  telnet server enable
  no ssh server enable
 
   
Would you like to edit the configuration? (yes/no) [n]:
 
Use this configuration and save it? (yes/no) [y]: y

Step 13 If you want to make changes to the displayed configuration, enter yes (or y); otherwise accept the default (no) by pressing Enter.

If you enter yes, the setup utility returns to the beginning of the setup, and repeats each step.

Step 14 Save this configuration by entering yes (or y), as in the following example (the default is no):.

If you do not save the configuration at this point, none of your changes are part of the configuration the next time the device reboots. Saving the configuration also automatically configures the boot variables for the kickstart and system images.

Use this configuration and save it? (yes/no) [y]: y
 
ibm-switch-1 #

Note The switch has two out-of-band management interfaces. The AMM configuration is mgmt1. Mgmt 0 must be placed on a different subnet than mgmt1.



Changing the Initial Configuration

To make changes to the initial configuration at a later time, enter the setup command in EXEC mode:

switch# setup  
 
---- Basic System Configuration Dialog ---- 
 
This setup utility will guide you through the basic configuration of 
the system. Setup configures only enough connectivity for management 
of the system. 
 
*Note: setup is mainly used for configuring the system initially, 
when no configuration is present. So setup always assumes system 
defaults and not the current system configuration values. 
 
Press Enter at anytime to skip a dialog. Use ctrl-c at anytime 
to skip the remaining dialogs. 
 
Would you like to enter the basic configuration dialog (yes/no): yes  

The setup utility guides you through the basic configuration process.

Accessing the Switch

After the initial configuration, you can access the switch in either method:

Serial console access—You can use a serial port connection to access the CLI.


Note Usernames for serial console login should be in all lowercase letters and should not exceed eight characters. If your username is in uppercase letters, Cisco NX-OS interprets the username as lowercase, but echoes it as uppercase, which causes the login to fail on the first attempt.


Out-of-band access—You can use Telnet or SSH to access a switch.

Additional Switch Configuration

This section includes the following topics:

Assigning a Switch Name

Configuring Date, Time, and Time Zone

Adjusting for Daylight Saving Time or Summer Time

Assigning a Switch Name

Each switch in the network requires a unique name. You can assign names to easily identify the switch by its physical location, its network association, or the organization to which it is deployed. The assigned name is displayed in the command-line prompt. The switch name is limited to 20 alphanumeric characters.


Note This guide refers to the Cisco Nexus 4001I and 4005I Switch Module for IBM BladeCenter as the switch, and it uses the switch# prompt.


To change the name of the switch, perform this task:

 
Command
Purpose

Step 1 

switch# configure terminal

Enters configuration mode.

Step 2 

switch(config)# switchname myswitch1
myswitch1(config)#

Changes the switch name prompt as specified (myswitch1).

Step 3 

myswitch1(config)# no switchname
switch(config)#

Reverts the switch name prompt to its default (switch#).

Configuring Date, Time, and Time Zone

The switch use Coordinated Universal Time (UTC), which is the same as Greenwich Mean Time (GMT). To change the default time on the switch, perform this task:

Command
Purpose
switch# clock set HH:MM:SS DD Month 
YYYY 

Sets the default time on the switch. HH represents hours in 24-hour time (15 for 3 P.M.), MM is minutes (58), SS is seconds (09), DD is the date (29), Month is the month in words (February), and YYYY is the year (2008).


The following example sets the time for the switch:

switch# clock set 15:58:09 29 February 2009  
Mon Feb 20 15:58:09 UTC 2009 


Note The clock command changes are saved across system resets.


You can specify a time zone for the switch. To specify the local time without the daylight saving time feature, perform this task:

 
Command
Purpose

Step 1 

switch# configure terminal

Enters configuration mode.

Step 2 

switch(config)# clock timezone timezone hours_offset minutes_offset

Sets the time zone. timezone is the three letter time zone (PST for Pacific Standard), the hours offset from UTC (-8 for the PST offset), and minutes offset (needed for time zones such as Newfoundland Standard (NST) or India Standard (IST)).

Step 3 

switch(config)# exit

Returns to EXEC mode.

Step 4 

switch# show clock

Verifies the time zone configuration.

Step 5 

switch# show run

Displays changes made to the time zone configuration along with other configuration information.

The following example sets the time zone to Pacific Standard Time (PST) and offsets the UTC time by negative eight hours and 0 minutes:

switch# configure terminal  
switch(config)# clock timezone PST -8 0  

To disable the local time setting, perform this task:

switch(config)# no clock timezone

Disables the time zone adjustment feature.


Adjusting for Daylight Saving Time or Summer Time

You can configure your switch to adjust for daylight saving time (or summer time). By default, Cisco NX-OS does not automatically adjust for daylight saving time. You must manually configure the switch to adjust to the daylight saving time.

For example, following U.S. standards (defined by the Energy Policy Act of 2005), you can have the switch advance the clock one hour at 2:00 a.m. on the second Sunday in March and move back the clock one hour at 2:00 a.m. on the first Sunday in November. You can also explicitly specify the start and end dates and times and whether or not the time adjustment recurs every year.

To enable the daylight saving time clock adjustment, perform this task:

 
Command
Purpose

Step 1 

switch# configure terminal

Enters configuration mode.

Step 2 

switch(config)# clock summer-time timezone start_week start_day start_month start_time end_week end_day end_month end_time offset

Sets the daylight savings time for a specified time zone.

The start and end values are as follows:

Week ranging from 1 through 5

Day ranging from Sunday through Saturday

Month ranging from January through December

The daylight offset ranges from 1 through 1440 minutes, which are added to the start time and deleted time from the end time.

switch(config)# no clock summer-time

Disables the daylight saving time adjustment feature.

Step 3 

switch(config)# exit

Returns to EXEC mode.

Step 4 

switch# show running-config | include summer-time

Verifies the time zone configuration.

The following example adjusts the daylight savings time for the U.S. Pacific daylight time by 60 minutes starting the second Sunday in March at 2 a.m. and ending the first Sunday in November at 2 a.m:

switch# configure terminal  
switch(config)# clock summer-time PDT 1 Sunday March 02:00 5 Sunday November 02:00 60  

NTP Configuration

A Network Time Protocol (NTP) server provides a precise time source (radio clock or atomic clock) to synchronize the system clocks of network devices. NTP is transported over User Datagram Protocol UDP/IP. All NTP communications use Coordinated Universal Time (UTC). An NTP server receives its time from a reference time source, such as a radio clock or atomic clock, attached to the time. NTP distributes this time across the network.

This section includes the following sections:

About NTP

NTP Configuration Guidelines

Configuring NTP

Management Interface Configuration

About NTP

In a large enterprise network, having one time standard for all network devices is critical for management reporting and event logging functions when trying to correlate interacting events logged across multiple devices. Many enterprise customers with extremely mission-critical networks maintain their own stratum-1 NTP source.

Time synchronization happens when several frames are exchanged between clients and servers. The switches in client mode know the address of one or more NTP servers. The servers act as the time source and receive client synchronization requests.

By configuring an IP address as a peer, the switch will obtain and provide time as required. The peer is capable of providing time on its own and is capable of having a server configured. If both these instances point to different time servers, your NTP service is more reliable. Even if the active server link is lost, you can still maintain the right time due to the presence of the peer.


Tip If an active server fails, a configured peer helps in providing the NTP time. Provide a direct NTP server association and configure a peer to ensure backup support if the active server fails.


If you only configure a peer, the most accurate peer takes on the role of the NTP server and the other peer(s) acts as a peer(s).

NTP Configuration Guidelines

The following guidelines apply to all NTP configurations:

You should have a peer association with another switch only when you are sure that your clock is reliable (which means that you are a client of a reliable NTP server).

A peer configured alone takes on the role of a server and should be used as backup. If you have two servers, then you can have several switches point to one server, and the remaining switches to the other server. You would configure peer association between these two sets, which forces the clock to be more reliable.

If you only have one server, it is better for all the switches to have a client association with that server.

Not even a server down time will affect well-configured switches in the network. Figure 2-1 displays a network with two NTP stratum 2 servers and two switches.

Figure 2-1 NTP Peer and Server Association  

In this configuration, the switches were configured as follows:

Stratum 2 Server 1

IPv4 address-10.10.10.10

Stratum-2 Server-2

IPv4 address-10.10.10.9

switch 1 IPv4 address-10.10.10.1

switch 1 NTP configuration commands

ntp server 10.10.10.10

ntp peer 10.10.10.2

switch 2 IPv4 address-10.10.10.2

switch 2 NTP configuration commands

ntp server 10.10.10.9

ntp peer 10.10.10.1

Configuring NTP

You can configure NTP using either IPv4 addresses, IPv6 addresses, or Domain Name System (DNS) names. To configure NTP associations, perform this task:

 
Command
Purpose

Step 1 

switch# configure terminal

Enters configuration mode.

Step 2 

switch(config)# ntp server {ip-address | ipv6-address | dns-name}

Forms an association with a server.

Step 3 

switch(config)# ntp peer {ip-address | ipv6-address | dns-name}

Forms an association with a peer. You can specify multiple associations.

Step 4 

switch(config)# exit

Returns to EXEC mode.

Step 5 

switch# copy running-config startup-config

Saves your configuration changes to NVRAM.

Tip This is one instance where you can save the configuration as a result of an NTP configuration change. You can enter this command at any time.

Step 6 

switch# show ntp peers

Displays the configured server and peer associations.

Management Interface Configuration

The management interface on the switch allows multiple simultaneous Telnet or SNMP sessions. You can remotely configure the switch through the management interface (mgmt0), but first you must configure some IP parameters so that the switch is reachable. You can manually configure the management interface from the CLI.

This section includes the following topics:

About the mgmt Interface

Configuring the Management Interface

Displaying Management Interface Configuration

Shutting Down the Management Interface

About the mgmt Interface

The mgmt0 interface on Cisco NX-OS devices provides out-of-band management, which enables you to manage the device by its IPv4 or IPv6 address. The mgmt0 interface uses 10/100/1000 Ethernet.

The mgmt1 interface on Cisco NX-OS is provided for configuration using the Advanced Management Module (AMM) to manage the switch. To configure the mgmt1 interface using AMM, see the AMM documentation provided by IBM.


Note Before you begin to configure the management interface manually, obtain the switch IP address and subnet mask. Also make sure that the console cable is connected to the console port.


Configuring the Management Interface

To configure the management (mgmt0) Ethernet interface to connect over IP, perform this task:

 
Command
Purpose

Step 1 

switch# configure terminal

Enters configuration mode.

Step 2 

switch(config)# interface mgmt 0

Selects the management Ethernet interface on the switch and enters interface configuration submode.

Step 3 

switch(config-if)# ip address ipv4-address[/length]

Configures the IPv4 address and its subnet mask.

switch(config-if)# ip address ipv4-address [subnet-mask]

An alternative method that configures the IPv4 address and its subnet mask.

switch(config-if)# ipv6 address ipv6-address[/length]

Configures the IPv6 address and its subnet mask.

Step 4 

switch(config-if)# no shutdown

Enables the interface.

Step 5 

switch(config-if)# exit

Returns to configuration mode.

Step 6 

switch(config)# vrf context management

Enters VRF context management configuration mode.

Step 7 

switch(config-vrf)# ip route ipv4-prefix[/length] ipv4-nexthop-address

Configures the IPv4 address of the next hop.

switch(config-vrf)# ipv6 route ipv6-prefix[/length] ipv6-nexthop-address

Configures the IPv6 address of the next hop.

Step 8 

switch(config-if)# duplex {auto | full | half}

(Optional) Configures the port duplex mode. The default is auto.

Step 9 

switch(config-if)# speed {10 | 100 | 1000 | auto}

(Optional) Configures the port speed. The default is auto.

Step 10 

switch(config-vrf)# exit

Returns to EXEC mode.

Step 11 

switch# copy running-config startup-config

(Optional) Saves your configuration changes to the file system.

The following example shows how to configure the management interface on mgmt 0:

switch# configure terminal
switch(config)# interface mgmt 0
switch(config-if)# ip address 10.65.122.252/24
switch(config-if)# no shutdown
switch(config-if)# exit
switch(config)# vrf context management
switch(config-vrf)# ip route 0.0.0.0/0 10.65.122.2
switch(config-vrf)# exit
switch(config)# interface mgmt 0
switch(config-if)#
 
   

In some cases, a switch interface might be administratively shut down. You can check the status of an interface at any time by using the show interface mgmt 0 command.

Displaying Management Interface Configuration

To display the management interface configuration, use the show interface mgmt0 command:

switch# show interface mgmt0
mgmt0 is up
  Hardware: GigabitEthernet, address: 0005.ad00.36d8 (bia 0005.ad00.36d8)
  Internet Address is 172.29.231.220/23
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA
  full-duplex, 100 Mb/s
  1 minute input rate 1792 bits/sec, 2 packets/sec
  1 minute output rate 24 bits/sec, 0 packets/sec
  Rx
    136170 input packets 7896 unicast packets 119763 multicast packets
    8511 broadcast packets 10446815 bytes
  Tx
    793 output packets 14 unicast packets 723 multicast packets
    56 broadcast packets 187697 bytes 

Shutting Down the Management Interface

To shut down the management interface (mgmt0), you use the shutdown command. A system prompt requests you confirm your action before it executes the command. You can use the force option to bypass this confirmation.

The following example shuts down the interface without using the force option:

switch# configure terminal 
switch(config)# interface mgmt 0 
switch(config-if)# shutdown 
Shutting down this interface will drop all telnet sessions. 
Do you wish to continue (y/n)? y 

The following example shuts down the interface using the force option:

switch# configure terminal 
switch(config)# interface mgmt 0 
switch(config-if)# shutdown force 

Managing the Switch Configuration

This section includes the following topics:

Displaying the Switch Configuration

Saving a Configuration

Clearing a Configuration

Displaying the Switch Configuration

You can view the ASCII form of the configuration file when required. To view the current configuration tree from the EXEC prompt, enter the show running-config command. If the running configuration is different from the startup configuration, enter the show startup-config command to view the ASCII version of the current startup configuration that was used to boot the switch if a copy running-config startup-config command was not entered after the reboot. Use the show startup-config command to view the contents of the current startup configuration.

You can also gather specific information about the entire switch configuration by entering the relevant show commands. Configurations are displayed based on a specified feature, interface, or module. Available show commands for each feature are briefly described in this section and listed at the end of each chapter.

Saving a Configuration

Use the copy running-config startup-config command to save the new configuration into nonvolatile storage. Once this command is entered, the running and the startup copies of the configuration are identical.

Clearing a Configuration

Use the write erase command to clear a startup configuration. Once this command is executed, the startup configuration of the switch reverts to factory defaults. The running configuration is not affected.


Caution The write erase command erases the entire startup configuration with the exception of any configuration that affects the loader functionality.

The write erase boot command only erases the configuration that affects the loader functionality. The loader functionality configuration includes the boot variables and the mgmt0 IP configuration information (IP address, netmask, and default gateway).

switch# write erase boot 

This command will erase the boot variables and the IP configuration of interface mgmt 0.

Using Switch File Systems

This section includes the following topics:

Setting the Current Directory

Displaying the Current Directory

Listing the Files in a Directory

Creating a Directory

Deleting an Existing Directory

Moving Files

Copying Files

Deleting Files

Displaying File Contents

Saving Command Output to a File

Compressing and Uncompressing Files

Setting the Current Directory

The cd command changes the current directory level to a specified directory level. The CLI defaults to the volatile: file system. This command expects a directory name input.

Any file saved in the volatile: file system is erased when the switch reboots.

The syntax for this command is cd directory name.

This command exchanges the current directory to the root directory on the bootflash: file system:

switch# cd bootflash:  

The following example changes the current directory to a mystorage directory that resides in the current directory:

switch# cd mystorage  

Displaying the Current Directory

The pwd command displays the current directory location. The following example changes the directory and displays the current directory.

switch# cd bootflash:  
switch# pwd  
bootflash: 

Listing the Files in a Directory

The dir command displays the contents of the current directory or the specified directory. The syntax for this command is dir directory or dir filename.

The following example shows how to list the files in the default volatile file system:

switch# dir volatile:  
 
Usage for volatile://sup-local 
          0 bytes used 
   20971520 bytes free 
   20971520 bytes total 

Creating a Directory

The mkdir command creates a directory at the current directory level or at a specified directory level.

The syntax for this command is mkdir name.

The following example creates a directory called test in the bootflash directory:

switch# mkdir bootflash:test  

The following example creates a directory called test in the current directory:

switch# mkdir test  

Deleting an Existing Directory

The rmdir command deletes an existing directory at the current directory level or at a specified directory level. The directory must be empty to be deleted.

The syntax for this command is rmdir name.

The following example deletes the directory called test in the bootflash directory:

switch# rmdir bootflash:test  
This is a directory.  Do you want to continue (y/n)?  [y] y  

The delete command can also delete empty and nonempty directories. When you enter this command, a warning is displayed to confirm your intention to delete the directory.

The following example deletes the directory called test in the current directory:

switch# delete test  
This is a directory.  Do you want to continue (y/n)?  [y] y  

If the current directory is bootflash:mydir, this command deletes the bootflash:mydir/test directory.

Moving Files

The move command removes a file from the source directory and places it in the destination directory.


Caution If a file with the same name already exists in the destination directory, that file is overwritten by the moved file.

The following example moves the file called samplefile from the root directory to the mystorage directory:

switch# move bootflash:samplefile bootflash:mystorage/samplefile  

The following example moves a file from the current directory level:

switch# move samplefile mystorage/samplefile  

If the current directory is bootflash:mydir, this command moves bootflash:mydir/samplefile to bootflash:mydir/mystorage/samplefile.

Copying Files

The copy command copies a file between file systems within a switch.


Note Use the dir command to ensure that enough space is available in the target file system. If enough space is not available, use the delete command to remove unneeded files.


The following example copies the file called samplefile from the root directory to the mystorage directory:

switch# copy bootflash:samplefile bootflash:mystorage/samplefile  

The following example copies a file from the current directory level:

switch# copy samplefile mystorage/samplefile  

If the current directory is bootflash:mydir, this command copies bootflash:mydir/samplefile to bootflash:mydir/mystorage/samplefile.

Deleting Files

The delete command deletes a specified file or the specified directory and all its contents.

The following example shows how to delete a file from the current working directory:

switch# delete dns_config.cfg  

The following example deletes the entire bootflash: directory and all its contents:

switch# delete bootflash:my-dir  


Caution If you specify a directory, the delete command deletes the entire directory and all its contents.

Displaying File Contents

The show file command displays the contents of a specified file in the file system.

The following example displays the contents of a file residing in the current directory:

switch# show file myfile  

Saving Command Output to a File

You can force all screen output to go to a file by appending > filename to any command. For example, enter show interface > Samplefile at the EXEC mode switch prompt to save the interface configuration to Samplefile which is a file created at the same directory level. At the EXEC mode switch prompt, enter a dir command to view all files in this directory, including the recently saved Samplefile.

Compressing and Uncompressing Files

The gzip command compresses (zips) the specified file using LZ77 coding.

The following example directs the output of the show tech-support command to a file (Samplefile), and then zips the file and displays the difference in the space used up in the volatile directory:

switch# show tech-support > Samplefile  
Building Configuration ...  
switch# dir  
    1525859     Jul 04 00:51:03 2003 Samplefile  
Usage for volatile://  
    1527808 bytes used  
   19443712 bytes free  
   20971520 bytes total  
switch# gzip volatile:Samplefile  
switch# dir  
     266069     Jul 04 00:51:03 2003 Samplefile.gz  
Usage for volatile://  
     266240 bytes used  
   20705280 bytes free  
   20971520 bytes total  

The gunzip command uncompresses (unzips) LZ77 coded files.

The following example unzips the file that was compressed in the previous example:

switch# gunzip Samplefile  
switch# dir  
    1525859     Jul 04 00:51:03 2003 Samplefile 
Usage for volatile:// 
    1527808 bytes used 
   19443712 bytes free 
   20971520 bytes total