Managing Configuration Files

Contents

1Managing Configuration Files

2

About Files and Storage
2.1Software Storage Organization
2.2Configuration Files
2.3Storage for System Images and Configuration Files
2.4URLs

3

Manage Configuration Files

4

Example: Managing Configuration Files
Copyright

© Ericsson AB 2009–2010. All rights reserved. No part of this document may be reproduced in any form without the written permission of the copyright owner.

Disclaimer

The contents of this document are subject to revision without notice due to continued progress in methodology, design and manufacturing. Ericsson shall have no liability for any error or damage of any kind resulting from the use of this document.

Trademark List
SmartEdge is a registered trademark of Telefonaktiebolaget LM Ericsson.
NetOp is a trademark of Telefonaktiebolaget LM Ericsson.

1   Managing Configuration Files

This document provides an overview of file storage, system image, boot files, and configuration files, URL access to system files, and describes the tasks that are used to load and save system configuration files through the operating system.

For a description of the tasks used to administer file storage and releases, see Command List. For information about upgrading the Boot ROM and Minikernel, see Installing the SmartEdge OS.

For information about accessing the Boot ROM interface (also known as the OFW or NetBSD shell) and useful Boot ROM commands, see Basic Troubleshooting Techniques.

Note:  
In the following descriptions, the term controller card applies to the Cross-Connect Route Processor (XCRP4) Controller card, including the controller carrier card unless otherwise noted.

The term controller carrier card refers to the controller functions on the carrier card within the SmartEdge™ 100 chassis. The term I/O carrier card refers to the traffic card functions on the carrier card; these functions are compatible with the similar functions that are implemented on the traffic card that are supported on all other SmartEdge routers.


2   About Files and Storage

This section describes software storage organization, configuration files, storage for system images and configuration files and provides useful URLs.

2.1   Software Storage Organization

Each SmartEdge router can contain one or two controller cards. If there are two controller cards, one is active and the other is standby. Each controller card has two internal compact-flash cards: one to store the operating system, configuration, and other system files, and one to store the low-level software. The compact-flash card for the low-level software is not accessible from the command-line interface (CLI).

The compact-flash card stores the operating system files. Storage on the compact-flash card is divided into three independent partitions: p01, p02, and /flash:

You can also install a 1-GB mass-storage device in the external slot of a controller card for additional storage space. The device is divided into two independent partitions, a UNIX-based file system, /md, and a partition to store operating system core dumps.

Note:  
If you install a mass-storage device in the active controller card, you must also install one in the standby controller card.

2.2   Configuration Files

A configuration file is a script of configuration commands that can be loaded into the system. Configuration files can contain partial configurations and more than one can be read at any time. This allows you to keep sequences of commands that may be required from time to time.

A configuration file can have two versions: a text version and a binary version. The system generates both versions of the file when you enter the save configuration command (in exec mode).

By default (if a different file has not been specified with the boot configuration command, in global configuration mode), the system automatically loads the binary version of the system configuration file, redback.bin, from the local file system during system power on or reload. If the binary version does not exist, or if it does not match the redback.cfg file, the system loads the redback.cfg file.

The redback.cfg file is loaded on the file system at the factory, but if the file does not exist, the system automatically generates a minimal configuration. You can then begin to modify the configuration.

You can modify the active system configuration in both of the following ways:

An interactive configuration consists of beginning a CLI session, and then accessing global configuration mode by entering the configure command (in exec mode). In global configuration mode, you can enter any number of configuration commands.

An offline configuration allows you to enter configuration commands using any text editor and save the file to be loaded by the operating system at a later time.

The operating system supports comment lines within configuration files. To add a comment to your configuration file, simply begin the line using the exclamation point (!) key. When you load a configuration file, any line that begins with the ! key is not processed as a command.

2.3   Storage for System Images and Configuration Files

System images and configuration files can be stored locally in the /flash partition on the internal compact-flash card or in the /md partition on the mass-storage device.

You can also store them on a remote server and access them using the File Transfer Protocol (FTP), Remote Copy Protocol (RCP), Secure Copy Protocol (SCP), Secure Shell FTP (SFTP), or Trivial FTP (TFTP).

You can also use the enterprise Management Information Base (MIB), RBN-CONFIG-FILE-MIB, to save and load configuration files to and from a TFTP or FTP server. The server must be reachable through one of the system ports.

Note:  
For operations that request the use of transfer protocol, such as FTP, SCP, or TFTP, it is assumed that there is a system configured and reachable by the SmartEdge router to service these requests.

2.4   URLs

Many SmartEdge router commands use a URL to access a file. For details on a particular command, see the Command List. When referring to a file on the local file system, the URL takes the following form:

[/device][/directory]/filename.ext

Configuration files can be stored on the local file system (/flash) or on the mass-storage device (/md) on a SmartEdge router. The device argument can be flash, or if a mass-storage device is installed, md. If the device argument is not specified, the default value is the device in the current working directory. If the directory argument is not specified, the default value is the current directory. Directories can be nested. The filename argument can be up to 256 characters in length.

You can also access files using the FTP, RCP, SCP, SFTP, or TFTP. Table 1 describes the syntax for the url argument when accessing a remote server.

Table 1    URL Syntax for Accessing a Remote Server

Server Protocol

URL Format

FTP, SCP, or SFTP

ftp://username[:passwd]@{ip-addr | hostname}[//directory]/filename.ext


scp://username[:passwd]@{ip-addr | hostname}[//directory]/filename.ext


sftp://username[:passwd]@{ip-addr | hostname}[//directory]/filename.ext

RCP

rcp://username@{ip-addr | hostname}[//directory]/filename.ext

TFTP

ftp://{ip-addr | hostname}[//directory]/filename.ext

Note:  
Use double slashes (//) if the path name to the directory on the remote server is an absolute pathname; use a single slash (/) if it is a relative path name (under the hierarchy of username account home directory).

You can specify the hostname argument only if the Domain Name System (DNS) is enabled with the ip domain-lookup, ip domain-name, and ip name-servers commands (in context configuration mode). For more information, see the Command List.


3   Manage Configuration Files

To load and save configuration files, perform the tasks described in Table 2.

Table 2    Load and Save Configuration Files

Task

Root Command

Notes

Set the boot configuration file.

boot configuration

Enter this command in global configuration mode.

Load a configuration file.

configure (URL)

Enter the configure command in exec mode. You must specify the URL of the file.

Save the running configuration to a specified file on the local or a remote file system.

save configuration

Enter the save configuration command in exec mode. You must specify the URL of the file.

4   Example: Managing Configuration Files

The following example loads the configuration file, test.cfg and merges the test.cfg with the running configuration:

[local]Redback#configure test.cfg besteffort verbose