1. Managing System Files. Alcatel-Lucent OmniSwitch 6800 Series, OmniSwitch 9000 Series, OmniSwitch 6850 Series


Add to my manuals
292 Pages

advertisement

1. Managing System Files. Alcatel-Lucent OmniSwitch 6800 Series, OmniSwitch 9000 Series, OmniSwitch 6850 Series | Manualzz

1 Managing System Files

This chapter describes the several methods of transferring software files onto the OmniSwitch and how to register those files for use by the switch. This chapter also describes several basic switch management procedures and discusses the Command Line Interface (CLI) commands used.

• File Management (copy, secure copy, edit, rename, remove, change, and display file attributes)

• Directory Management (create, copy, move, remove, rename, and display directory information)

• System Date and Time (set system clock)

CLI commands are used in the configuration examples; for more details about the syntax of commands, see the OmniSwitch CLI Reference Guide.

In This Chapter

Configuration procedures described in this chapter include:

“Loading Software onto the Switch” on page 1-21

“Creating a File Directory on the Switch” on page 1-31

“Registering Software Image Files” on page 1-28

“Setting the System Clock” on page 1-37

For related information about connecting a terminal to the switch, see your Getting Started Guide. For information about switch command privileges, see

Chapter 8, “Managing Switch Security.”

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-1

File Management Specifications Managing System Files

File Management Specifications

The following table lists specifications for the OmniSwitch flash directory and file system as well as the system clock.

Note. The functionality described in this chapter is supported on the OmniSwitch 6800, 6850, and 9000 switches unless otherwise stated in the following Specifications table or specifically noted within any section of this chapter.

File Transfer Methods

Switch Software Utility

Configuration Recovery

FTP, Zmodem

OmniSwitch as an FTP Client

The flash/certified directory holds configurations that are certified as the default start-up files for the switch. They will be used in the event of a non-specified reload.

Switch /flash Directory

64 MB flash memory available for switch files and directories

(OmniSwitch 6800 and 6850)

128 MB flash memory available for switch files and directories

(OmniSwitch 9000)

Contains the /certified and /working directories •

File/Directory Name Metrics

32 characters maximum for directory and file names

(OmniSwitch 6800 and 6850)

128 characters maximum for directory and file names

(OmniSwitch 9000)

255 character maximum for a fully qualified path

File/Directory Name Characters Character types are limited to a-z, A-Z, 0-9, dashes (-), dots (.), and underlines (_).

Maximum Number of

Files/Directories

Maximum of 244 files and/or directories allowed in the root (flash) directory.

Sub-Directories

Text Editing

System Clock

System Date Default Value

Up to seven sub-directories allowed including /flash.

Vi standard UNIX editor. The Ed standard UNIX editor is available in the debug mode.

Set local date, time and time zone, Universal Time Coordinate (UTC),

Daylight Savings (DST or summertime).

THU JAN 01 1970 (Thursday, January 1, 1970) page 1-2 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Switch Administration Overview

Switch Administration Overview

The OmniSwitch has a variety of software features designed for different networking environments and applications. Over the life of the switch, it is very likely that your configuration and feature set will change because the needs of your network are likely to expand. Also, software updates become available from

Alcatel-Lucent. If you change your configuration to upgrade your network, you must understand how to install switch files and to manage switch directories.

The OmniSwitch 6800 and 6850 switches have 64 MB and the OmniSwitch 9000 switches have 128 MB of usable flash memory. You can use this memory to store files, including executable files (used to operate switch features and applications), configuration files, and log files.

You need to understand the various methods of loading files onto the switch for software upgrades and new features. Once the files are on the switch, the CLI has commands that allow you to load, copy, and delete these files. The CLI also has commands for displaying, creating, and editing ASCII files directly on the switch. You may also want to establish a file directory structure to help organize your files on the switch.

All the files and directories on the switch bear a time stamp. This is useful for switch administration because the time stamp allows you to tell at a glance which files are the most recent. You can set the system clock that controls these time stamps as well as other time based switch functions.

File Transfer

The switch can receive and send files by using industry standard local and remote transfer methods. Each of these methods is defined and explained. Because file transfers can involve logging onto the switch from a remote host, security factors, such as DNS resolver and Authenticated Switch Access requirements should be considered.

User’s Host OmniSwitch

File Transfer from User’s

Host to the OmniSwitch

File Transfer to OmniSwitch

It is not enough to simply transfer a file onto the switch. Once files are on the switch, they must be registered in order to become functional. The OmniSwitch has a directory structure that allows you to install new software while maintaining a backup copy of your old configuration. This directory structure is explained in the

“Switch Directories” section on page 1-4 .

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-3

Switch Administration Overview Managing System Files

Switch Directories

You can create your own directories in the switch flash directory. This allows you to organize your configuration and text files on the switch. You can also use the vi command to create files. This chapter tells you how to make, copy, move, and delete both files and directories.

Listing Directory: /flash

Directory: /flash/certified

(Files)

Directory: /flash/working

Directory: /flash/network

(Files)

(Files)

Switch Flash Directory

(Files) boot.params

cs_system.pmd

boot.slot.cfg

boot.cfg.1.err

swlog1.log

swlog2.log

page 1-4 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files File and Directory Management

File and Directory Management

A number of CLI commands allow you to manage files on your switch by grouping them into subdirectories within the switch’s flash directory. These commands perform the same functions as file management software applications (such as Microsoft Explorer) perform on a workstation. For documentation purposes, we have categorized the commands into the following three groups.

Directory commands allow you to create, copy, move, remove, rename, and display directories.

File commands allow you copy, secure copy, edit, rename, remove, change, and display file attributes.

Utility commands display memory and system diagnostic information.

The following illustration represents a sample flash directory that contains three directories and six files at the top level. The sample working directory and the certified directory both hold five files. The sample network directory holds one file.This sample flash directory is used in the explanations of the directory, file and utility CLI commands described in the following section.

The switch may show files and directories different from the ones shown in this example.

boot.params

Sample Flash Directory cs_system.pmd

boot.slot.cfg

Flash Files boot.cfg.1.err

swlog1.log

swlog2.log

Network Directory policy.cfg

Working Directory

Kadvrout.img

Ksecu.img

Kbase.img

Kos.img

Certified Directory

Ksecu.img

Krelease.img

Kos.img

Kbase.img

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-5

File and Directory Management Managing System Files

To list all the files and directories in your current directory, use the ls command. Here is a sample display of the flash directory.

-> ls

Listing Directory /flash:

-rw 315 Jan 5 09:38 boot.params

drw 2048 Jan 5 09:22 certified/ drw 2048 Jan 5 09:22 working/

-rw 12 Dec 18 2030 boot.slot.cfg

drw 2048 Dec 27 2030 switch/

-rw 64000 Jan 5 09:37 swlog1.log

-rw 64000 Dec 27 2030 swlog2.log

-rw 256 Dec 27 2030 random-seed drw 2048 Dec 18 2030 network/

40208384 bytes free

The following information describes the screen displayed by the ls command:

• The first column consists of three text characters. The first character indicates whether the row entry is a file (-) or a directory (d). The second and third characters indicate the user’s read/write permissions.

drw 512 Oct 25 14:17 WORKING/

-rw 321 Oct 25 14:39 boot.params

Here, the first entry shows a directory (d) for which the user has read and write (rw) permissions. The second entry shows a file (-) for which the user has read and write (rw) permissions.

• The second column indicates the number of bytes of flash memory the row entry occupies.

drw 512 Oct 25 14:17 WORKING/

-rw 321 Oct 25 14:39 boot.params

Here, the first entry shows that the directory uses 512 bytes of flash memory. The second entry shows that the file occupies 321 bytes of flash memory.

• The third, fourth and fifth columns show the date and time the row entry was created or copied into the flash directory.

drw 512 Oct 25 14:17 WORKING/

-rw 321 Oct 25 14:39 boot.params

Here, the first entry indicates the file was created or copied on April 22 at 05:23 hours. The second entry indicates that the directory was created or copied on April 19 at 06:12 hours.

• The column on the right lists the file or directory name. Note that directory names end with a slash (/) character. drw 512 Oct 25 14:17 WORKING/

-rw 321 Oct 25 14:39 boot.params

Here, the first entry shows a directory named WORKING, the second entry shows a file named boot.params.

• The value shown at the bottom of the display indicates the amount of flash memory remaining for use in this directory (9.47 megabytes in the above example).

page 1-6 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files File and Directory Management

Using Wildcards

Wildcards allow you to substitute symbols (* or ?) for text patterns while using file and directory commands. The asterisk (*) takes the place of multiple characters and the question mark character (?) takes the place of single characters. More than one wildcard can be used within a single text string.

Multiple Characters

An asterisk (*) is used as a wildcard for multiple characters in a text pattern. The following command will list all entries in the current directory that end with the .log extension:

-> ls *.log

Listing Directory /flash:

-rw 64000 Sep 21 19:49 swlog1.log

-rw 64000 Aug 12 19:06 swlog2.log

The following command lists all entries in the current directory that contain the i character.

-> ls *i*

Listing Directory /flash: drw 2048 Aug 21 17:49 certified/ drw 2048 Aug 12 18:51 working/

-rw 31 Jul 29 2001 policy.cfg drw 2048 Jul 28 12:17 switch/

Single Characters

The question mark (?) is used as a wildcard for a single character in a text pattern. The following command will locate all entries containing swlog followed by any single character and the .log extension.

-> ls swlog?.log

Listing Directory /flash:

-rw 64000 Jul 21 19:49 swlog1.log

-rw 64000 Aug 12 19:06 swlog2.log

The single and multiple character wildcards can be used in combination. The following command lists all entries containing the letter i followed by any two single characters.

-> ls *i??

Listing Directory /flash: drw 2048 Aug 12 18:51 working/

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-7

File and Directory Management Managing System Files

Directory Commands

The directory commands are applied to the switch file system and to files contained within the file system.

When you first enter the flash directory, your login is located at the top of the directory tree. You may navigate within this directory by using the pwd and cd commands (discussed below). The location of your login within the directory structure is called your current directory. You need to observe your login location because when you issue a command, that command applies only to directories and files in your current directory unless another path is specified.

The following drawing is an OmniSwitch 6800 logical representation of the file directory shown in the illustration on

page 1-5 .

Flash Directory

Certified Directory

(Files)

Ksecu.img

Kos.img

Krelease.img

boot.cfg

Working Directory

(Files)

Ksecu.img

Kbase.img

boot.cfg

Network Directory

(File) policy.cfg

(Files) boot.params

cs_system.pmd

boot.slot.cfg

boot.cfg.1.err

swlog.1.log

swlog2.log

Sample Switch Directory Tree

Note. The directory tree on OmniSwitch 6850 and OmniSwitch 9000 switches is similar.

Determining Your Location in the File Structure

Use the pwd command to display the path to your current directory. When you first log into the switch, your current directory is the flash directory. If you enter the pwd command, the following will be displayed:

-> pwd

/flash

->

The display shows the name of the current directory and its path. If your current directory is the certified directory and you enter the pwd command, the following will be displayed:

-> pwd

/flash/certified

->

The display shows the path to your current directory.

page 1-8 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files File and Directory Management

Changing Directories

Use the cd command to navigate within the file directory structure. The cd command allows you to move

“up” or “down” the directory tree. To go down, you must specify a directory located in your current directory. The following command example presumes your current directory is the /flash file directory as shown in the directory on

page 1-8

and that you want to move down the directory tree to the certified directory.

->pwd

/flash

->cd certified

->

To verify that your current directory has changed to /flash/certified, use the pwd command and the following will be displayed:

->pwd

/flash/certified

To move “up” the directory tree, use the cd command. Enter cd.. (cd dot dot) without specifying a directory name and your current directory will move up one directory level. If you enter cd without the dots, your current directory will move to the top of the tree. The following example shows the cd command used where the current directory is /flash/certified.

->pwd

/flash/certified

-> cd

->

To verify that your current directory has moved up the directory tree, use the pwd command to display your location. The display shows you have moved up one level from the /flash/certified directory and that your current directory is /flash.

-> pwd

/flash

If you use the cd command while you are at the top of the directory tree, the cd command will have no effect on the location of your login. In other words, if you use cd while your current directory is /flash, your current directory will remain /flash after you execute the cd command.

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-9

File and Directory Management Managing System Files

Displaying Directory Contents

The ls and dir commands have the same function. These two commands display the contents of the current directory. If you use the ls or dir command while logged into the /flash file directory of the switch as shown on

page 1-8 , the following will be displayed:

-> dir

Listing Directory /flash: drw 512 Oct 25 14:39 certified/ drw 512 Jul 15 14:59 NETWORK/ drw 512 Oct 25 14:17 WORKING/

-rw 321 Oct 25 14:39 boot.params

-rw 163258 Oct 2 11:04 cs_system.pmd

-rw 11 Jul 30 14:09 boot.slot.cfg

-rw 693 Oct 9 11:55 boot.cfg.1.err

-rw 0 Oct 28 11:14 swlog1.log

-rw 64000 Oct 29 09:12 swlog2.log

9467904 bytes free

If you specify a path as part of the ls or dir command, your screen will list the contents of the directory at the specified path.

-> ls /flash/certified

Listing Directory /flash/certified: drw 2048 Oct 12 11:16 ./ drw 2048 Oct 12 15:58 ../

-rw 2636 Oct 12 11:16 boot.cfg

-rw 860086 Oct 26 11:07 Kos.img

-rw 123574 Oct 14 10:54 Ksecu.img

-rw 123574 Oct 14 10:54 Krelease.img

If you use the ls or dir command while logged into the /flash file directory of OmniSwitch 9000 Series, the following will be displayed.

-> dir

Listing Directory /flash: drw 1024 Nov 8 08:30 WORKING/

-rw 276 Nov 8 09:59 boot.params

-rw 4890749 Oct 21 21:43 cs_system.pmd

-rw 256 Nov 8 09:57 random-seed

-rw 64000 Nov 8 09:59 swlog1.log

drw 1024 Nov 8 08:31 certified/ drw 1024 Nov 8 08:29 NETWORK/ drw 1024 Nov 8 08:29 SWITCH/

-rw 222 Nov 8 09:59 boot.cfg.1.err

-rw 524288 Oct 31 10:51 u-boot.bin

-rw 834497 Oct 31 10:50 miniboot.uboot

-rw 64000 Nov 8 10:56 swlog2.log

-rw 719 Nov 6 12:07 test020

-rw 199567 Nov 5 11:16 rule930.txt

63308800 bytes free page 1-10 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files File and Directory Management

If you specify a path as part of the ls or dir command, your screen will list the contents of the directory at the specified path.

-> ls /flash/

Listing Directory /flash: drw 1024 Nov 8 08:30 WORKING/

-rw 276 Nov 8 09:59 boot.params

-rw 4890749 Oct 21 21:43 cs_system.pmd

-rw 256 Nov 8 09:57 random-seed

-rw 64000 Nov 8 09:59 swlog1.log

drw 1024 Nov 8 08:31 certified/ drw 1024 Nov 8 08:29 NETWORK/ drw 1024 Nov 8 08:29 SWITCH/

-rw 222 Nov 8 09:59 boot.cfg.1.err

-rw 524288 Oct 31 10:51 u-boot.bin

-rw 834497 Oct 31 10:50 miniboot.uboot

-rw 64000 Nov 8 10:56 swlog2.log

-rw 719 Nov 6 12:07 test020

-rw 199567 Nov 5 11:16 rule930.txt

63308800 bytes free

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-11

File and Directory Management Managing System Files

Making a New Directory

To make a new directory use the mkdir command. You may specify a path for the new directory. Otherwise, the new directory will be created in your current directory. The syntax for this command requires a slash (/) and no space between the path and the new directory name. Also, a slash (/) is required at the beginning of your path specification.

Note. Your login account must have write privileges to execute the mkdir command.

The following command makes a new directory in the working directory on the OmniSwitch 6800:

-> mkdir /flash/working/newdir1

Flash Directory

Working Directory

(Files)

Ksecu.img

Kbase.img

boot.cfg

newdir1 Directory

This drawing represents the content of the /flash/working directory after the new directory is added.

Note. The output on OmniSwitch 6850 and OmniSwitch 9000 switches is similar.

page 1-12 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files File and Directory Management

Displaying Directory Contents Including Subdirectories

The ls -r command displays the contents of your current directory in addition to recursively displaying all subdirectories. The following example shows the result of the ls -r command where the /flash/working directory contains a directory named newdir1. Be sure to include a space between ls and -r.

-> ls -r /flash/working

Listing Directory /flash/working: drw 2048 Oct 14 17:14 ./ drw 2048 Oct 14 17:12 ../ drw 2048 Oct 14 17:14 newdir1/

-rw 2636 Oct 12 11:16 boot.cfg

-rw 123574 Oct 14 10:54 Kbase.img

-rw 123574 Oct 14 10:54 Ksecu.img

Listing Directory /flash/working/newdir: drw 2048 Oct 14 17:14 ./ drw 2048 Oct 14 17:14 ../

Copying an Existing Directory

The cp -r command recursively copies directories, as well as any associated subdirectories and files.

Before using this command, you should make sure you have enough memory space in your target directory to hold the new material you are copying.

Note. Your login account must have write privileges to execute the cp -r command.

In this example, a copy of the working directory and all its contents will be created in the certified directory of OmniSwitch 6800. The destination directory must exist before the cp -r command will work.

->cp -r /flash/working flash/certified/working

Flash Directory

Working Directory Certified Directory

(Files) boot.cfg

Kbase.img

Ksecu.img

newdir1 Directory

(Files) boot.cfg

Kos.img

Krelease.img

Ksecu.img

Working Directory

(Files) boot.cfg

Kbase.img

Ksecu.img

newdir1 Directory

Note. The directories on OmniSwitch 6850 and OmniSwitch 9000 switches are similar.

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-13

File and Directory Management Managing System Files

To verify the creation of the new directory, use the ls -r command to produce a list of the contents of the certified directory. This list will include the files that were originally in the certified directory plus the newly created copy of the working directory and all its contents.

->ls -r /flash/certified

Listing Directory /flash/certified drw 2048 Oct 12 16:22 ./ drw 2048 Oct 15 10:16 ../

-rw 4347 Oct 2 12:25 boot.cfg

-rw 844217 Oct 25 14:21 Kos.img

-rw 4658 Oct 25 14:21 Krelease.img

Listing Directory /flash/certified/working drw 2048 Oct 14 17:14 ./ drw 2048 Oct 14 17:12 ../ drw 2048 Oct 14 17:14 newdir1/

-rw 4347 Oct 2 12:25 boot.cfg

-rw 142830 Oct 25 14:17 Ksecu.img

-rw 2743945 Oct 25 14:16 Kbase.img

-rw 844217 Oct 25 14:17 Kos.img

Listing Directory /flash/certified/working/newdir: drw 2048 Oct 14 17:14 ./ drw 2048 Oct 14 17:14 ../

Removing a Directory and its Contents

The rmdir command removes the specified directory and all its contents. If the following command is

issued from the flash directory shown in the drawing on page 1-8 , the working directory would be

removed from the certified directory.

->rm -r /flash/certified/working

Note. Your login account must have write privileges to execute the rmdir command.

page 1-14 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files File and Directory Management

File Commands

The file commands apply to files located in the /flash file directory and its sub-directories.

Note. Each file in any directory must have a unique name. If you attempt to create or copy a file into a directory where a file of the same name already exists, you will overwrite or destroy one of the files.

Creating or Modifying Files

The switch has an editor for creating or modifying files. The editor is invoked by entering the vi command and the name of the new file or existing file that you want to modify. For example:

-> vi /flash/my_file

This command puts the switch in editor mode for my_file. If my_file does not already exist, the switch will create the file in the flash directory. In the editing mode, the switch uses command keystrokes similar to any vi UNIX text editor. For example, to quit the edit session and save changes to the file, type ZZ to return to the CLI prompt.

Copy an Existing File

Use the cp command to copy an existing file. You can specify the path and filename for the original file being copied as well as the path and filename for the new copy being created. If no path is specified, the command assumes the current directory. The following syntax copies the Kos.img file from the working directory to the certified directory.

->cp /flash/working/Kos.img /flash/certified

This second example presumes that the user’s current directory is the /flash/working directory. Here, it is not necessary to specify a path for the original file. A copy of Kos.img will appear in the /flash/certified directory once the following command is executed.

->cp Kos.img /flash/certified

This third example presumes that the user’s current directory is the flash directory. To copy a file into the same directory where the file currently exists, the user must specify a new filename. The following command will result in the Kbase.img file being copied into the /flash/working directory under the new name of newfile.img. Both Kos.img and its copy newfile.img will appear in the /flash/working directory.

->cp /flash/working/Kbase.img newfile.img

In these examples, a new file will be written to the specified or assumed path with the new filename. If you do not specify a new filename, the new file will have the same name as the copied file. If you copy a file to its own directory, you must specify a new filename. In each case, the file being copied will remain in its original location.

Note. You must have write privileges in order to execute the cp command.

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-15

File and Directory Management Managing System Files

Secure Copy an Existing File

Use the scp command to copy an existing file in a secure manner. You can specify the path and filename for the original file being copied as well as the path and filename for a new copy being created. If no path is specified, the command assumes the current directory. If SCP is not enabled on the switch, use the scp-sftp command to enable it. The following syntax copies all of the image files in the working directory from a remote switch 172.17.11.13 to the local working directory:

-> scp [email protected]:/flash/working/*.img /flash/working admin's password for keyboard-interactive method:

This second example helps copy all the image files from the user’s current working directory to the remote switch’s working directory. A copy of all the image files will appear in the /flash/working directory of the remote switch 172.17.11.13, once the following command is executed.

-> scp /flash/working/*.img [email protected]:/flash/working admin's password for keyboard-interactive method:

Note. The scp command prompts you to enter the admin password. On entering the admin password, the names and the path of the files being copied will be displayed. SCP is not supported between OmniSwitch and Windows in the current release.

Note. You must have write privileges in order to execute the scp command.

Move an Existing File or Directory

The move and mv commands have the same function and use the same syntax. Use these commands to move an existing file or directory to another location. You can specify the path and name for the file or directory being moved. If no path is specified, the command assumes the current path. You can also specify a path and a new name for the file or directory being moved. If no name is specified, the existing name will be used. page 1-16 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files File and Directory Management

Note. Your login account must have write privileges to use the move or mv command.

Flash Directory

Certified Directory

(Files)

Working Directory

(Files)

Network Directory

(File) policy.cfg

Testfiles Directory

(File) testfile2

In this first example, the user’s current directory is the flash directory. The following command syntax moves the testfile2 file from the user created testfiles directory into the working directory as shown in the illustration above. The screen displays a warning that the file is being renamed (or in this case, redirected).

-> move /flash/testfiles/testfile2 /flash/working/testfile2

WARNING:renaming file /flash/testfiles/testfile2 -> /flash/working/testfile2

In the next example, the user’s current directory is the /flash/testfiles directory as shown in the illustration, so it is not necessary to specify a path for the file being copied. However, the command syntax specifies a path to the destination directory. The screen displays a warning that the file is being renamed.

-> move testfile2 /flash/working/newtestfile2

WARNING:renaming file /flash/working/newtestfile2 -> /flash/working/newtestfile2

In this third example, the user’s current directory is the flash directory. Here, it is not necessary to specify a path for the destination file but a path must be specified for the original file. The screen displays a warning that the file is being renamed.

-> move /flash/testfiles/testfile2 newfile2

WARNING: renaming file /flash/testfiles/testfile2 -> /flash/testfiles/newfile2

In each of the above examples, a new file will be written to the specified or assumed path with the new filename. In each case, the file being copied will be removed from its original location.

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-17

File and Directory Management Managing System Files

Change File Attribute and Permissions

The chmod and attrib commands have the same function and use the same syntax. Use these commands to change read-write privileges for the specified file. The following syntax sets the privilege for the

config1.txt file to read-write. In this example, the user’s current directory is the /flash file directory.

Note. You must have read-write privileges to a file to change that file’s privileges.

To set the permission for the config1.txt file to read-only, use the following syntax.

-> chmod -w /flash/config1.txt

To set the permission for the config1.txt file to read/write, use the following syntax.

-> chmod +w /flash/config1.txt

Delete an Existing File

The delete command deletes an existing file. If you use the delete command from the directory containing the file, you do not need to specify a path. If you are in another directory, you must specify the path and name for the file being deleted. The user of this command must have write privileges for any file being deleted.

-> delete /flash/config.txt

page 1-18 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files File and Directory Management

Managing Files on Switches

On OmniSwitch 6800 and 6850 switches, you can copy a file from a non-primary switch to the primary switch in a stack using the rcp command. To use this command, enter rcp followed by the slot number of the non-primary switch, the path and file name of the source file on the non-primary switch, and the destination file name on the primary switch.

For example, to copy the boot.params file to the /flash directory on Switch 4 in a stack to the primary switch and name it boot.params.bak, enter:

-> rcp 4:/flash/file.txt file.txt

On OmniSwitch 9000 Series switches, you can copy a file from a secondary management module to a primary management module or from a primary management module to a secondary management module with the rcp command. To use this command enter rcp followed the secondary management module of the switch, the path and file name of the source file on the secondary management module of the switch, and the destination file name on the primary management module of the switch.

For example, to copy the boot.params file to the /flash directory on primary management module in a switch and name it boot.params.bak enter:

-> rcp cmm-b: /flash/boot.params boot.params.bak

To delete a file on a secondary management module of the non-primary switch, use the rrm command. To use this command, enter rrm followed by the path and file name of the file on the secondary management module of the non-primary switch to be deleted.

For example, to delete the boot.params file in the /flash directory on a secondary management module of the non-primary switch, enter:

-> rrm 4 /flash/boot.params

To list the directory contents of a secondary management module of the non-primary switch, use the rls command by entering rls, followed by the path name of the directory you want to display. (As an option, you can also specify a specific file name to be displayed.)

For example, to display the contents of the /flash directory on a secondary management module nonprimary switch, enter:

-> rls 4 /flash

A screen similar to the following will be displayed:

-rw 327 Sep 13 16:46 boot.params

drw 1024 Sep 13 16:46 certified/ drw 1024 Sep 13 16:45 working/

-rw 64000 Sep 13 16:46 swlog1.log

-rw 64000 Sep 8 21:24 swlog2.log

drw 1024 Sep 13 16:45 switch/ drw 1024 Sep 10 17:34 network/

-rw 256 Sep 13 16:41 random-seed drw 1024 Jun 22 1986 tk.dir/

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-19

File and Directory Management Managing System Files

Utility Commands

The utility commands include freespace , fsck , and newfs . These commands are used to check memory and delete groups of files.

Displaying Free Memory Space

The freespace command displays the amount of free memory space available for use in the switch’s file system. You may issue this command from any location in the switch’s directory tree.

-> freespace

/flash 16480256 bytes free

Performing a File System Check

The fsck command performs a file system check and can automatically repair any errors found. It displays diagnostic information in the event of file corruption. When you enter the command, you must specify the flash directory as follows.

-> fsck /flash

The screen displays the following prompt:

Do you want fsck to automatically repair any errors found? (<CR> = No)

Press Enter to skip repairing files, or enter yes to start file repair. If you enter yes, the screen displays similar to the following:

/flash/ - disk check in progress ...

/flash/ - Volume is OK

total # of clusters: 14,773

# of free clusters: 9,621

# of bad clusters: 0

total free space: 19,242 Kb

max contiguous free space: 7,454,720 bytes

# of files: 28

# of folders: 4

total bytes in files: 10,262 Kb

# of lost chains: 0

total bytes in lost chains: 0

Deleting the Entire File System

The newfs command deletes the flash file system and all the files and directories contained in it. This command is used when you want to reload all files in the file system.

Caution. This command will delete all of the switch’s system files. All configurations programmed into the switch will be lost. Do not use this command unless you are prepared to reload all files. page 1-20 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Loading Software onto the Switch

Loading Software onto the Switch

There are three common methods for loading software to and from your switch. The method you use depends on your workstation software, your hardware configuration, and the location and condition of your switch. These methods are discussed here.

FTP Server—You can use the switch as an FTP server. If you have FTP client software on your workstation, you can transfer a file to the switch via FTP. This is normally done to load or upgrade the switch’s software or configurations. For details see

“Using the Switch as an FTP Server” on page 1-21 .

FTP Client—You can use the switch as an FTP client by connecting a terminal to the switch’s console port and using standard FTP commands. This feature is useful in cases where you do not have access to a workstation with an FTP client. For details see

“Using the Switch as an FTP Client” on page 1-23 .

Zmodem—You can load software directly through the serial port with any terminal emulator that supports the Zmodem protocol. Note that a Zmodem transfer of large files may take several minutes to complete. For details see

“Using Zmodem” on page 1-27 .

Using the Switch as an FTP Server

The switch can act as an FTP server for receiving files transferred from your workstation. You can transfer software files to the switch by using standard FTP client software located on a host workstation. This is normally done to load or upgrade the switch software.

Workstation OmniSwitch

The FTP Client software on the Workstation sends a file from the Workstation to the OmniSwitch

FTP Client FTP Server

OmniSwitch FTP Server

The following describes how to transfer files where the switch is acting as an FTP server.

1 Log into the switch. Use your workstation’s FTP client software just as you would with any FTP application. To log in to the switch, start your FTP client. Where the FTP client asks for “Name”, enter the

IP address of your switch. Where the FTP client asks for “User ID”, enter the username of your login account on the switch. Where the FTP client asks for “Password”, enter your switch password.

Note. If you are using Authenticated Switch Access (ASA), the port interface must be authenticated for

FTP use and the username profile must have permission to use FTP. Otherwise the switch will not accept an FTP login. For information about ASA, refer to

Chapter 8, “Managing Switch Security.”

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-21

Loading Software onto the Switch Managing System Files

2 Specify the transfer mode. If you are transferring a switch image file, you must specify the binary transfer mode on your FTP client. If you are transferring a configuration file, you must specify the ASCII transfer mode.

3 Transfer the file. Use the FTP “put” command or click the client’s download button to send the file to the switch.

When you use FTP to transfer a file to the switch, the file is automatically placed in the switch’s /flash/

working directory. For details on using CLI commands to managing files once they are on the switch see

“File and Directory Management” on page 1-5 .

Note. You must use the binary mode (bin) to transfer files via FTP.

page 1-22 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Loading Software onto the Switch

Using the Switch as an FTP Client

Using the switch as an FTP client is useful in cases where you do not have access to a workstation with an

FTP client. You can establish an FTP session locally by connecting a terminal to the switch console port.

You can also establish an FTP session to a remote switch by using a Telnet session. Once you are logged into the switch as an FTP client, you can use standard FTP commands.

Note. If you are using Authenticated Switch Access (ASA), the port interface must be authenticated for

FTP and Telnet use. The login profile must also have permission to use FTP. Otherwise the switch will not

accept an FTP login. For information about ASA and user privileges, refer to Chapter 8, “Managing

Switch Security.”

Terminal

A dumb terminal uses the FTP client on the OmniSwitch to retrieve a file from a file server

File Server

OmniSwitch

FTP Client FTP Server

OmniSwitch FTP Client

Use the switch ftp command to start its FTP client.

1 Establish a connection to the switch as explained in your appropriate Getting Started Guide.

2 Log on to the switch and enter the ftp command to start the FTP client. Next, enter a valid host name

or IP address. (For information about enabling the DNS resolver for host names, please refer to Chapter 2,

“Logging Into the Switch.”

) A screen similar to the following is displayed:

-> ftp 198.23.9.101

Connecting to [198.23.9.101]...connected

220 cosmo FTP server (UNIX(r) System V Release 4.1) ready

Name :

Note. You can only use a host name instead of an IP address if the DNS resolver has been configured and enabled. If not, you must specify an IP address.

You can use the ftp6 command followed by the IPv6 address or the hostname of the FTPv6 server to start an FTPv6 session over an IPv6 environment. For example:

-> ftp6 fe80::a00:20ff:fea8:8961 intf1

Connecting to [fe80::a00:20ff:fea8:8961]...connected

220 cosmo FTP server (UNIX(r) System V Release 4.1) ready

Name :

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-23

Loading Software onto the Switch Managing System Files

Note. FTPv6 sessions are supported only on the OmniSwitch 6850 or 9000. It is mandatory to specify the name of the particular IPv6 interface, if the FTPv6 server has been specified using its link-local address.

3 Set the client to binary mode with the bin command. Enter a valid user name and password for the host you specified with the ftp command. A screen similar to the following is displayed:

Name: Jsmith

331 Password required for Jsmith

Password: *****

230 User Jsmith logged in.

4 After logging in, you will receive the ftp-> prompt. You may enter a question mark (?) to view available FTP commands as shown here.

ftp->?

Supported commands:

ascii binary bye cd delete

dir get help hash ls

put pwd quit remotehelp user

lpwd mput mget prompt !ls

lcd user

These are industry standard FTP commands. Their definitions are given in the following table: ascii binary bye cd delete dir get hash help ls put pwd quit remotehelp user lpwd mput mget prompt

Set transfer type to ASCII (7-bit).

Set transfer type to binary (8-bit).

Close session gracefully.

Change to a new directory on the remote machine.

Delete a file on the remote machine.

Obtain a long listing on the remote machine.

Retrieve a file from the remote machine.

Print the hash symbol (#) for every block of data transferred.

(This command toggles hash enabling and disabling.)

Displays a list of FTP commands and their definitions.

Display summary listing of the current directory on the remote host.

Send a file to the remote machine.

Display the current working directory on the remote host.

Close session gracefully.

List the commands that the remote FTP server supports.

Send new user information.

Display the current working directory on the local host.

Allows for the transfer of multiple files out of the local machine.

Allows for the transfer of multiple files into the local machine.

Toggles the query for use with the mput and mget commands.

page 1-24 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Loading Software onto the Switch

!ls

lcd user

Lists the contents (files and directories) of the local directory.

Change to a new local directory

Sends new user information.

If you lose communications while running FTP, you may receive a message similar to the following:

Waiting for reply (Hit ^C to abort)...........

In this case you can press Crtl-C to abort the session or wait until the communication failure is resolved and the FTP transfer can continue.

Note. You must use the binary mode (bin) to transfer files via FTP.

Using Secure Shell FTP

1 Log on to the OmniSwitch and issue the sftp CLI command. The command syntax requires you to identify the IP address for the device you are connecting to. The following command establishes a Secure

Shell FTP interface from the local OmniSwitch to IP address 10.222.30.125.

-> sftp 10.222.30.125

login as:

Note. If SFTP is not enabled on the switch, use the scp-sftp command to enable it.

You can use the sftp6 command followed by the IPv6 address or hostname of the SFTPv6 server to start an SFTPv6 session over an IPv6 environment. For example:

-> sftp6 fe80::a00:20ff:fea8:8961 int1 login as:

Note. SFTPv6 sessions are supported only on OmniSwitch 6850 or 9000. It is mandatory to specify the name of the particular IPv6 interface, if the SFTPv6 server has been specified using its link-local address.

2 You must have a login and password that is recognized by the IP address you specify. When you enter your login, the device you are logging in to, will request your password as shown here.

-> sftp 10.222.30.125

login as: rrlogin2 rrlogin2's password for keyboard-interactive method:

3 After logging in, you will receive the sftp> prompt. You may enter a question mark (?) to view available Secure Shell FTP commands and their definitions as shown here.

sftp>?

Available commands: cd path Change remote directory to 'path' lcd path Change local directory to 'path' chmod mode path Change permissions of file 'path' to 'mode' help Display this help text get remote-path [local-path] Download file

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-25

Loading Software onto the Switch Managing System Files lls [path]] Display local directory listing ln oldpath newpath Symlink remote file lmkdir path Create local directory lpwd Print local working directory ls [path] Display remote directory listing mkdir path Create remote directory put local-path [remote-path] Upload file pwd Display remote working directory exit Quit sftp quit Quit sftp rename oldpath newpath Rename remote file rmdir path Remove remote directory rm path Delete remote file symlink oldpath newpath Symlink remote file version Show SFTP version

? Synonym for help

Note. Although Secure Shell FTP has commands similar to the industry standard FTP, the underlying protocol is different.

Closing a Secure Shell FTP Session

To terminate the Secure Shell FTP session, issue the exit command. The following will display:

-> exit

Connection to 11.333.30.135 closed.

This display indicates the Secure Shell FTP session with IP address 11.333.20.135 is closed. The user is now logged into the OmniSwitch as a local device with no active remote connection.

page 1-26 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files

Workstation

Loading Software onto the Switch

Using Zmodem

A Zmodem application has been included with your switch software so that new programs and archives can be uploaded through the switch’s serial console port. There are generally two situations that would require you to use the switch’s console serial port to load software by using Zmodem.

• Your system is having problems and the FTP transfer method does not work.

• The switch’s Ethernet Management port is either not functioning or not configured.

To use Zmodem, you must have a terminal emulator that supports the Zmodem protocol. There are many

Zmodem products available that operate differently. You should consult the user manual that came with your terminal emulation software for details.

Note. If a file you are transferring already exists in the switch’s flash memory, you must remove the file before transferring the new file via Zmodem.

OmniSwitch

Zmodem is used to transfer a file from a workstation to the OmniSwitch

Zmodem

Zmodem File Transfer

To transfer a file via Zmodem, complete the following steps:

1 Connect your terminal emulation device containing the Zmodem protocol to the switch’s console port.

2 Start the Zmodem process on your switch by executing the rz command.

-> rz

A screen similar to the following will appear.

Upload directory: /flash rz ready to receive file, please start upload (or send 5 CTRL-X’s to abort).

**B000000023be50

3 Transfer the files by using your terminal emulation software. The following will be displayed.

ZMODEM file transfer successful,

Hit <RETURN> to exit...

When the transfer is complete, you can use the ls command to verify that the new files were loaded successfully. To abort a Zmodem session enter Ctrl-X five times in succession.

Note. Files transferred via Zmodem are loaded into the flash directory. Before the new files can be used by the switch, you must transfer them to the switch’s /flash/working directory and reboot the switch.

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-27

Registering Software Image Files Managing System Files

Registering Software Image Files

New software transferred to the switch must go through a registration process before it can be used by the switch. The registration process includes two tasks:

• Transfer the new software file(s) to the switch’s /flash/working directory via remote connection.

• Restart the switch to register the software.

Directories on the Switch

When you log into the switch, your current directory is the flash directory. For a factory default switch, the flash directory contains three sub-directories and several files. It is important to understand the relationship of these directories before you load software or edit any of the files. The three directories are described here:

Certified directory—This directory contains configuration files that are certified as the default startup files for the switch. These are the trusted configuration and binary image files. They will be used in the event of a non-specified reload. Do not attempt to edit these files. The path to this directory is

/flash/certified.

Working directory—The working directory is a repository for configuration files that you are working on. If you are working on configuration files to develop a custom switch application, you may want to test them before certifying them as the switch’s default. To do this, you can boot from the files in the working directory while preserving the files in the certified directory. When the files in the working directory are tested and working properly, you may certify them as the switch’s default files. The files are then copied into the certified directory to replace the old ones. The path to this directory is

/flash/working.

Network directory—This directory holds files that may be required by servers used for authentication. Other files can be put into this directory if desired. The path to this directory is /flash/network.

For more information on switch directories refer to the “Managing CMM Directory Content” chapter of this manual.

page 1-28 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Registering Software Image Files

Available Image Files

The following table lists the image files available for the OmniSwitch 6800 Series switches. Most of the files listed here are part of the base switch configuration. Files that support an optional switch feature are noted in the table.

Archive File Name Base or Optional Software Description

Kadvrout.img

Kbase.img

Kdiag.img

Keni.img

Kos.img

Ksecu.img

Krelease.img

Optional Advanced Routing

Base Software

Base Software

Base Software

Base Software

Optional Security

Base Software

Advanced Routing

Base Software

Diagnostics

Ethernet Images

Operating System

Security (AVLANS)

Release Archive

Note. Some OmniSwitch 6800 Series switches may also have AKdiag.img and DKdiag.img image files in flash memory. These files can result from the manufacturing process and are not needed for the switch to function. Therefore, they can be safely deleted.

This table lists the image files for the OmniSwitch 6850 Series switches. Most of the files listed here are part of the base switch configuration. Files that support an optional switch feature are noted in the table.

Archive File Name Base or Optional Software Description

Kadvrout.img

Kbase.img

K2diag.img

Keni.img

K2os.img

Ksecu.img

Krelease.img

Optional Advanced Routing

Base Software

Base Software

Base Software

Base Software

Optional Security

Base Software

Advanced Routing

Base Software

Diagnostics

Ethernet Images

Operating System

Security (AVLANS)

Release Archive

This table lists the image files for the OmniSwitch 9000 switches. Most of the files listed here are part of the base switch configuration. Files that support an optional switch feature are noted in the table.

Archive File Name Base or Optional Software Description

Jadvrout.img

Jbase.img

Jdiag.img

Jeni.img

Jos.img

Jqos.img

Jrout.img

Jsecu.img

Jrelease.img

Optional Advanced Routing

Base Software

Base Software

Base Software

Base Software

Base Software

Base Software

Optional Security

Base Software

CMM Advanced Routing

CMM Base

CMM Diagnostics

NI image for all Ethernet-type NIs

CMM Operating System

CMM Quality of Service

CMM Routing (IP and IPX)

CMM Security (AVLANS)

Release Archive

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-29

Application Examples for File Management Managing System Files

Application Examples for File Management

The following sections provide detailed examples of managing files and directories on the switch.

Transferring a File to the Switch Using FTP

In this example, the user is adding the AVLAN security feature to an OmniSwitch 6800 Series switch. To do this, the user must load the Ksecu.img image file onto the switch and then register the file by rebooting the switch. The following steps describe how to transfer the file from the user workstation to the switch by using an FTP client on the workstation:

1 Load the Ksecu.img file onto a workstation that contains an FTP client.

You will normally receive the file from the Internet, via E-mail, or on CD media. Place the file on your workstation where it can be easily downloaded.

2 Run the FTP client software on your workstation.

Most workstations have an FTP client installed. Refer to your manufacturer’s instructions for details on running the FTP application.

3 Log in to the switch from your FTP client.

Where the FTP client asks for Name, enter the IP address of your switch. Where the FTP client asks for

User ID, enter “admin”. Where the FTP client asks for Password, enter “switch” or your custom configured password.

4 Transfer the file from the workstation to the switch by using the FTP client.

If you have a GUI FTP client, select the Ksecu.img file on your desktop and click the download button. If you have a text only FTP client, use the FTP “put” command to move the file from your desktop to the switch. In either case, you must specify a binary file transfer because the Ksecu.img file is a binary file.

Once the transfer is complete, the file will appear in the switch’s /flash/working directory.

5 Close the FTP session with the switch.

6 To verify that the Ksecu.img file is in the /flash/working directory on the switch. Log onto the switch and list the files in the /flash/working directory.

-> ls /flash/working

Listing Directory /flash/working: drw 2048 Aug 4 10:45 ./ drw 2048 Aug 5 14:05 ../

-rw 670979 Aug 5 14:44 Ksecu.img

-rw 2877570 Aug 4 10:33 Kbase.img

-rw 217119 Aug 4 10:33 Kdiag.img

-rw 727663 Aug 4 10:33 Keni.img

-rw 5519 Aug 4 10:34 Krelease.img

-rw 880 Sep 31 13:05 boot.cfg

This list verifies that the file is located on the switch in the /flash/working directory.

page 1-30 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Application Examples for File Management

7 Reboot the switch to register the security file Ksecu.img. The following will be displayed:

-> install Ksecu.img

renaming file temp.img -> /flash/working/Krelease.img

Installation of Ksecu.img was successful.

The features and services supported by the Ksecu.img image file are now available on the switch.

Creating a File Directory on the Switch

In this example, the user wants to store several test files on the switch for use at a later date. The user has loaded the files into the switch’s /flash/working directory by using FTP. Rather than leaving the files in the working directory, the user may want to create a new directory. The following steps describe how to create a directory on the switch, how to transfer files into the directory, and how to list the files.

1 Log onto the switch and use the mkdir command to create a new directory called “resources”.

-> mkdir resources

->

2 Verify that the new directory was created using the ls command. The “resources” directory is listed.

-> ls

Listing Directory /flash:

-rw 308 Aug 12 13:33 boot.params

drw 2048 Aug 14 10:45 certified/ drw 2048 Aug 15 16:24 working/

-rw 64000 Aug 15 16:19 swlog1.log

-rw 64000 Aug 15 14:05 swlog2.log

drw 2048 Sep 24 07:57 switch/

-rw 30 Aug 19 2023 policy.cfg

drw 2048 Aug 25 16:25 resources/

-rw 0 Sep 24 08:00 boot.cfg

3 Use the ls command to list the contents of the /flash/working directory.

-> ls /flash/working

Listing Directory /flash/working: drw 2048 Aug 5 17:03 ./ drw 2048 Aug 5 16:25 ../

-rw 880 Sep 31 13:05 boot.cfg

-rw 6 Aug 5 17:03 test1.txt

-rw 6 Aug 5 17:03 test2.txt

-rw 6 Aug 5 17:03 test3.txt

4 Use the mv command to move the test files from /flash/working to /flash/resources.

-> mv test1.txt /flash/resources

-> mv test2.txt /flash/resources

-> mv test3.txt /flash/resources

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-31

Application Examples for File Management Managing System Files

5 Use the ls command to verify that the files are now located in the /flash/resources directory.

-> ls /flash/resources

Listing Directory /flash/resources: drw 2048 Jul 5 17:20 ./ drw 2048 Jul 5 16:25 ../

-rw 6 Jul 5 17:03 test1.txt

-rw 6 Jul 5 17:03 test2.txt

-rw 6 Jul 5 17:03 test3.txt

17995776 bytes free

FTP Client Application Example

The following example shows how to transfer a file named rrtext.txt from the switch’s /flash/working directory to another host by using the switch as an FTP client.

1 Log into the switch. Use the ls command to verify that your current directory is /flash.

-> ls

Listing Directory /flash:

-rw 272 Jun 12 15:57 boot.params

drw 2048 Jun 12 17:52 certified/ drw 2048 Jun 13 12:32 working/ drw 2048 Jul 12 16:22 switch/

-rw 10000 Jun 12 15:58 swlog1.log

-rw 10000 Jun 12 17:50 swlog2.log

-rw 445 Jun 21 11:43 aaasnap

-rw 7298 Jul 24 16:51 websnap1024

-rw 2662306 Jun 28 16:44 cs_system.pmd

-rw 543 Jun 28 12:02 aaapublic drw 2048 Jun 28 17:50 newdir/

-rw 1452 Jun 29 12:50 nssnap76

-rw 1452 Jun 29 12:42 iesnap76

16480256 bytes free

2 Use the cd command to change your current directory to /flash/working. Use the ls or pwd command to verify.

-> cd working

-> ls

Listing Directory /flash/working: drw 2048 Aug 3 12:32 ./ drw 2048 Aug 14 10:58 ../

-rw 450 Aug 13 10:02 rrtest1.txt

page 1-32 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Application Examples for File Management

3 Enter the FTP mode by using the ftp command followed by the IP address or the name of the host you

are connecting to. (If you enter a host name, please refer to “Using Zmodem” on page 1-27 .)

->ftp 10.255.11.101

220 Connecting to [10.255.11.101]...connected.

Cosmo Windows FTP server ready

Name: Myhost1

Note. You can only use a host name instead of an IP address if the DNS resolver has been configured and enabled. If not, you must specify an IP address.

You can use the ftp6 command followed by the IPv6 address or hostname of the FTPv6 server to start an

FTPv6 session over an IPv6 environment. For example:

-> ftp6 fe80::a00:20ff:fea8:8961 intf1

220 Connecting to [fe80::a00:20ff:fea8:8961]...connected.

Cosmo Windows FTP server ready

Name: Myhost1

Note. FTPv6 sessions are supported only on OmniSwitch 6850 or 9000. It is mandatory to specify the name of the particular IPv6 interface, if the FTPv6 server has been specified using its link-local address.

4 Enter a valid user name and password for the host you specified with the ftp command. A screen similar to the following is displayed:

Name (d) : Jsmith

331 Password required for Jsmith

Password: *****

230 User Jsmith logged in.

5 Use the FTP “put” command to transfer the file from your switch to the host as shown here.

ftp> put rrtest.txt

The following will be displayed:

200 Port set okay

150 Opening BINARY mode data connection

Transferred 20 octets in 1 seconds.

226 Transfer complete ftp>

6 To exit the switch’s FTP client mode, use the “quit” FTP command. Your current directory on the switch is /flash/working, which is the location from which you initiated the FTP client session. Use the pwd CLI command to verify your current directory.

ftp> quit

221 Bye

-> pwd

/flash/working

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-33

Application Examples for File Management Managing System Files

Creating a File Directory Using Secure Shell FTP

The following example describes the steps necessary to create a directory on a remote OmniSwitch and to transfer a file into the new directory by using Secure Shell FTP.

1 Log on to the switch and issue the sftp CLI command with the IP address for the device you are connecting to. The following command establishes a Secure Shell FTP interface from the local

OmniSwitch to another OmniSwitch at IP address 10.222.30.125.

-> sftp 10.222.30.125

login as:

Note. If SFTP is not enabled, use the scp-sftp command to enable it.

You can use the sftp6 command followed by the IPv6 address or hostname of the SFTPv6 server to start an SFTPv6 session over an IPv6 environment. For example:

-> sftp6 fe80::a00:20ff:fea8:8961 int1 login as:

Note. SFTPv6 sessions are supported only on OmniSwitch 6850 or 9000. It is mandatory to specify the name of the particular IPv6 interface, if the SFTPv6 server has been specified using its link-local address.

2 You must have a login and password that is recognized by the IP address you are logging in to. When you enter your login, the device will request your password. Here, the login “rrlogin2” is used, the system requests a password.

-> sftp 10.222.30.125

login as: rrlogin2 rrlogin2's password for keyboard-interactive method:

Once the correct password is given and the login is completed, the sftp> prompt is displayed. This indicates that you are in the Secure Shell FTP mode and must, therefore, use the Secure Shell FTP commands as listed on

page 1-25 .

3 Use the ls command to display the contents of the target OmniSwitch’s directory.

sftp> ls

287 boot.params

2048 certified

2048 working

64000 swlog1.log

64000 swlog2.log30 policy.cfg

2048 network

206093 cs_system.pmd

2048 LPS

256 random-seed

4 Use the mkdir command to create a new directory entitled “newssdir” in the target OmniSwitch.

Remember you must specify the path for the new directory as follows: sftp> mkdir /flash/newssdir

5 Use the ls command again to list the contents of the current (flash) directory. Note that the “newssdir” directory appears toward the bottom of the following list.

sftp> ls page 1-34 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files

287 boot.params

2048 certified

2048 working

64000 swlog1.log

64000 swlog2.log30 policy.cfg

2048 network

206093 cs_system.pmd

2048 LPS

2048 newssdir

256 random-seed

Application Examples for File Management

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-35

Verifying Directory Contents Managing System Files

Transfer a File Using Secure Shell FTP

To demonstrate how to transfer a file by using the Secure Shell FTP, this application example continues from the previous example where a new directory named “newssdir” was created on a remote

OmniSwitch.

1 Use the Secure Shell FTP put command to transfer the file “testfile1.rr” from the local OmniSwitch to the “newssdir” directory on the remote OmniSwitch. You must specify the local path (where the file originates) and the remote path (where the file is going) in the command syntax. The following command is used: sftp> put /flash/testfile1.rr /flash/newssdir

The following will be displayed to indicate that the file was successfully transferred to the /flash/newss-

dir on the target OmniSwitch.

Uploading /flash/testfile1.rr to /flash/newssdir/testfile1.rr

2 To verify that the file was transferred to the correct destination, use the Secure Shell FTP cd command to move your login to the newssdir directory. Then, use the ls command to list the contents of the directory. The copied file is listed in the correct directory as shown here.

sftp> cd newssdir sftp> ls

2048 .

2048 ..

31 testfile1.rr

Closing a Secure Shell FTP Session

To terminate the Secure Shell FTP session, issue the exit command. The following will be displayed:

-> exit

Connection to 11.333.30.135 closed.

This display indicates the Secure Shell FTP session with IP address 11.333.20.135 is closed. The user is now logged into the OmniSwitch as a local device with no active remote connection.

Verifying Directory Contents

To display a list of files, the following CLI commands may be used.

ls dir rls

Displays the contents of a specified directory or the current working directory.

Displays the contents of a specified directory or the current working directory.

Displays the content of a non primary switch in a stack.

For more information about these commands, see the OmniSwitch CLI Reference Guide.

page 1-36 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Setting the System Clock

Setting the System Clock

The switch clock displays time by using a 24-hour clock format. It can also be set for use in any time zone. Daylight Savings Time (DST) is supported for a number of standard time zones. DST parameters can be programmed to support non-standard time zones and time off-set applications.

All switch files and directories listed in the flash directory bear a time stamp. This feature is useful for file management purposes.

Setting Date and Time

You can set the local date, time zone, and time for your switch or you can also set the switch to run on

Universal Time Coordinate (UTC or GMT). If applicable, you can also configure Daylight Savings Time

(DST or Summertime) parameters.

Note. If you have multiple switches in a stack, you must set the date and time on both the primary and the secondary switch. Otherwise, if you experience a fail-over situation, the secondary switch’s time and date will not match. You can use the takeover command to switch between primary and secondary switches to

set time and date. For more information on redundancy, refer to Chapter 4, “Managing CMM Directory

Content.”

Date

To display the current system date for your switch, use the system date command. If you do not specify a new date in the command line, the switch will display the current system date.

To modify the switch’s current system date, enter the new date with the command syntax. The following command will set the switch’s system date to June 23, 2002.

-> system date 06/23/2002

When you specify the date you must use the mm/dd/yyyy syntax where mm is the month, dd is the day and

yyyy is the year. Months are specified as numbers from 01 to 12. Days are specified as numbers from 1 to

31. You must use two digits to define the month and the day. You must use four digits to specify the year.

Time Zone

To determine the current time zone or to specify a new time zone for your switch, use the system timezone command. This specifies the time zone for the switch and sets the system clock to run on UTC time (or Greenwich Mean Time). The following is displayed for the Pacific standard time zone:

-> system timezone

PST: (Coordinated Universal Time) UTC-8 hours

To set a new time zone for the system clock, use the system timezone command along with the appropri-

ate time zone abbreviation. Refer to the table in “Enabling DST” on page 1-40

for time zone abbreviations. The following command sets the system clock to run on Pacific standard time:

-> system timezone pst

PST: (Coordinated Universal Time) UTC-8 hours

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-37

Setting the System Clock Managing System Files

You may set the switch system clock to a time that is offset from standard UTC time. For example, you can set a time that is offset from UTC by increments of 15, 30, or 45 minutes. You must indicate by a plus

(+) or minus (-) character whether the time should be added to or subtracted from the system time. To set a time that offsets UTC by adding 5 hours and 45 minutes, use the following command:

-> system timezone +05:45

Note that four digits must be used to specify an offset for minutes, and the minutes must be specified in

15, 30, or 45 minute increments. To specify the number of hours offset from UTC (such as ten hours) use the following command syntax:

-> system timezone +10

Values to specify hours for offset range from -13 through +12.

Time

To display the current local time for your switch, use the system time command. If you do not specify a new time in the command line, the current system time is displayed as shown:

-> system time

17:08:51 (PST)

To modify the switch’s current system time, enter the system time command. When you specify the time you must use the hh:mm:ss syntax where hh is the hour based on a 24 hour clock. The mm syntax represents minutes and ss represents seconds. You must use two digits to specify the minutes and two digits to specify the seconds. The following command will set the switch’s system time to 10:45:00 a.m:

-> system time 10:45:00

->

The following command will set the switch’s system time to 3:14:00 p.m:

-> system time 15:41:00

-> page 1-38 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Setting the System Clock

Daylight Savings Time Configuration

The switch can be set to change the system clock automatically to adjust for Daylight Savings Time

(DST). There are two situations that apply depending on the time zone selected for your switch.

If the time zone set for your switch shows DST parameters in the table on page 1-40 , you need to only

enable DST on your switch by using the following command:

-> system daylight savings time enable

If the time zone set for your switch does not show DST parameters in the table on page 1-40 , you must

specify the start, end, and change parameters for DST by using the system daylight savings time command. The following information is needed to specify DST:

• The day of the week and month of the year when DST will begin.

• The position of that day in the month (e.g., first, second, third, fourth, or last Sunday of the month).

• The hour and minute of the day at which DST will begin.

• The day of the week and month of the year when DST will end.

• The position of that day in the month (e.g., first, second, third, fourth, or last Sunday of the month).

• The hour and minute of the day at which DST will end.

• The number of hours the switch clock will be offset for DST (one hour in most cases).

To set the switch DST parameters so that the clock will move back one hour on the fourth Sunday of

September at 11:00 p.m. and move forward on the fourth Sunday of March at 11:00 a.m., the following command should be used:

-> system daylight savings time start fourth sun in Sept at 23:00 end fourth sun in march at 11:00 by 1

For more details on syntax for this command, please refer to the OmniSwitch CLI Reference Guide. You can also use the question mark (?) character in the command syntax to invoke the CLI’s help feature as described in the “Using the CLI” chapter of this manual.

Note. By default, Daylight Savings Time is disabled.

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-39

Setting the System Clock Managing System Files

Enabling DST

When Daylight Savings Time (DST) is enabled, the switch’s clock will automatically set the default DST parameters for the time zone specified on the switch or for the custom parameters you can specify with the system daylight savings time command. In this case, it is not necessary to change the time setting on the switch when your time zone changes to and from DST. To verify the DST parameters for your switch, use the system daylight savings time command. A screen similar to the following will be displayed:

-> system daylight savings time

Daylight Savings Time (DST) is DISABLED.

PST: (Coordinated Universal Time) UTC-8 hours

Daylight Savings Time (DST):

DST begins on the first sunday in april (4/7) at 2:00

DST ends on the last sunday in october (10/27) at 2:00

DST will change the time by +/- 1:00 hour(s)

The second line in the above display indicates the Enabled/Disabled status of the DST setting on the switch. The last three lines describe the date and time parameters for the selected time zone or the custom parameters set with the CLI. To enable daylight savings time use the following command:

-> system daylight savings time enable

Note. If your time zone shows “No default” in the “Time Zone and DST Information Table”, refer to

“Daylight Savings Time Configuration” on page 1-39 for information on configuring and enabling DST.

The following table shows a list of supported time zone abbreviations and DST parameters.

Abbreviation Name nzst New Zealand zp11 aest gst acst zp7 zp6 zp5 zp4 msk jst kst awst zp8 eet

No standard name

Australia East

Guam

Australia Central

Time

Japan

Korea

Australia West

China;

Manila, Philippines

Bangkok

No standard name

No standard name

No standard name

Moscow

Eastern Europe

Time Zone and DST Information Table

Hours from

UTC

+12:00

+11:00

+10:00

+10:00

+09:30

+09:00

+09:00

+08:00

+08:00

+07:00

+06:00

+05:00

+04:00

+03:00

+02:00

DST Start

1st Sunday in Oct. at

2:00 a.m.

No default

Last Sunday in Oct. at 2:00 a.m.

No default

Last Sunday in Oct. at 2:00 a.m.

No default

No default

No default

No default

DST End

3rd Sunday in Mar. at 3:00 a.m.

No default

Last Sunday in Mar. at 3:00 a.m.

No default

Last Sunday in Mar. at 3:00 a.m.

No default

No default

No default

No default

DST Change

1:00

No default

1:00

No default

1:00

No default

No default

No default

No default

No default

No default

No default

No default

Last Sunday in Mar. at 2:00 a.m.

Last Sunday in Mar. at 2:00 a.m.

No default

No default

No default

No default

Last Sunday in Oct. at 3:00 a.m.

Last Sunday in Oct. at 3:00 a.m.

No default

No default

No default

No default

1:00

1:00 page 1-40 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

Managing System Files Setting the System Clock wat zm2 zm3 nst

Time Zone and DST Information Table (continued)

Abbreviation Name cet Central Europe met bst wet gmt

Middle Europe

British Standard

Time

Western Europe

Hours from

UTC

+01:00

+01:00

+00:00

+00:00

+00:00

DST Start

Last Sunday in Mar. at 2:00 a.m.

Last Sunday in Mar. at 2:00 a.m.

Last Sunday in Mar. at 1:00 a.m.

Last Sunday in Mar. at 1:00 a.m.

No default

DST End

Last Sunday in Oct. at 3:00 a.m.

Last Sunday in Oct. at 3:00 a.m.

Last Sunday in Oct. at 3:00 a.m.

Last Sunday in Oct. at 3:00 a.m.

No default

DST Change

1:00

1:00

1:00

1:00

No default Greenwich Mean

Time

West Africa

No standard name

No standard name

Newfoundland

-01:00

-02:00

-03:00

-03:30 ast est cst mst pst astcam estcam cstcam mstcam pstcam akst

Atlantic Standard

Time

Eastern Standard

Time

Central Standard

Time

Mountain Standard

Time

Pacific Standard

Time

Atlantic Standard

Time

Central America

Eastern Standard

Time

Central America

Central Standard

Time

Central America

Mountain Standard

Time

Central America

Pacific Standard

Time

Central America

Alaska

-04:00

-05:00

-06:00

-07:00

-08:00

-04:00

-05:00

-06:00

-07:00

-08:00

-09:00

No default

No default

No default

1st Sunday in Apr. at

2:00 a.m.

2nd Sunday in Mar. at 2:00 a.m.

2nd Sunday in Mar. at 2:00 a.m.

2nd Sunday in Mar. at 2:00 a.m.

2nd Sunday in Mar. at 2:00 a.m.

2nd Sunday in Mar. at 2:00 a.m.

1st Sunday in Apr. at

2:00 a.m.

No default

No default

No default

Last Sunday in Oct. at 2:00 a.m.

1st Sunday in Nov. at

2:00 a.m.

1st Sunday in Nov. at

2:00 a.m.

1st Sunday in Nov. at

2:00 a.m.

1st Sunday in Nov. at

2:00 a.m.

1st Sunday in Nov. at

2:00 a.m.

Last Sunday in Oct. at 2:00 a.m.

No default

No default

No default

1:00

1:00

1:00

1:00

1:00

1:00

1:00

1st Sunday in Apr. at

2:00 a.m.

Last Sunday in Oct. at 2:00 a.m.

1:00

1st Sunday in Apr. at

2:00 a.m.

Last Sunday in Oct. at 2:00 a.m.

1:00

1st Sunday in Apr. at

2:00 a.m.

Last Sunday in Oct. at 2:00 a.m.

1:00

1st Sunday in Apr. at

2:00 a.m.

Last Sunday in Oct. at 2:00 a.m.

1:00 hst zm11

Hawaii

No standard name

-10:00

-11:00

1st Sunday in Apr. at

2:00 a.m.

No default

No default

Last Sunday in Oct. at 2:00 a.m.

No default

No default

1:00

No default

No default

OmniSwitch 6800/6850/9000 Switch Management Guide December 2007 page 1-41

Setting the System Clock Managing System Files page 1-42 OmniSwitch 6800/6850/9000 Switch Management Guide December 2007

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents