HP 9304m Installation And Getting Started Manual page 291

Procurve routing switches
Table of Contents

Advertisement

Installation and Getting Started Guide
Preparing the Configuration File
A configuration file that you create must follow the same syntax rules as the startup-config file the device creates.
The configuration file is a script containing CLI configuration commands. The CLI reacts to each command
entered from the file in the same way the CLI reacts to the command if you enter it. For example, if the
command results in an error message or a change to the CLI configuration level, the software responds by
displaying the message or changing the CLI level.
The software retains the running-config that is currently on the device, and changes the running-config only
by adding new commands from the configuration file. If the running config already contains a command that
is also in the configuration file you are loading, the CLI rejects the new command as a duplicate and displays
an error message. For example, if the running-config already contains a a command that configures ACL 1,
the software rejects ACL 1 in the configuration file, and displays a message that ACL 1 is already configured.
The file can contain global CONFIG commands or configuration commands for interfaces, routing protocols,
and so on. You cannot enter User EXEC or Privileged EXEC commands.
The default CLI configuration level in a configuration file is the global CONFIG level. Thus, the first command
in the file must be a global CONFIG command or " ! ". The ! (exclamation point) character means "return to
the global CONFIG level".
NOTE: You can enter text following " ! " as a comment. However, the " !" is not a comment marker. It returns
the CLI to the global configuration level.
NOTE: In software releases earlier than 07.1.x, the CLI ignores the " ! " instead of changing the CLI to the
global CONFIG level, when you load the configuration using the copy tftp running-config <ip-addr>
<filename> command. In software release 07.1.x and later, the CLI does change the CLI to the global
CONFIG level, when you load the configuration using the copy tftp running-config <ip-addr> <filename>
command or the ncopy tftp <ip-addr> <filename> running-config command.
In all releases, the CLI changes to the global CONFIG level if you load the configuration as a startup-config
file instead of the running-config (using the copy tftp startup-config <ip-addr> <filename> command or
ncopy tftp <ip-addr> <from-name> startup-config command).
NOTE: If you copy-and-paste a configuration into a management session, the CLI ignores the " ! " instead of
changing the CLI to the global CONFIG level. As a result, you might get different results if you copy-and-
paste a configuration instead of loading the configuration using TFTP.
Make sure you enter each command at the correct CLI level. Since some commands have identical forms at
both the global CONFIG level and individual configuration levels, if the CLI's response to the configuration file
results in the CLI entering a configuration level you did not intend, then you can get unexpected results.
For example, if a trunk group is active on the device, and the configuration file contains a command to disable
STP on one of the secondary ports in the trunk group, the CLI rejects the commands to enter the interface
configuration level for the port and moves on to the next command in the file you are loading. If the next
command is a spanning-tree command whose syntax is valid at the global CONFIG level as well as the
interface configuration level, then the software applies the command globally. Here is an example:
The configuration file contains these commands:
interface ethernet 4/2
no spanning-tree
The CLI responds like this:
HP9300(config)# interface ethernet 4/2
Error - cannot configure secondary ports of a trunk
HP9300(config)# no spanning-tree
HP9300(config)#
10 - 10

Advertisement

Table of Contents
loading

This manual is also suitable for:

9315m

Table of Contents