|
|
This command enters the configuration editor to modify, delete, or add parameters.
configure sectionAfter entering a section, you can use the following subcommands:
{list options | delete keyword | keyword = value | keyword = ? | ? | exit | # comment}
section | Enter a valid section name to configure keywords for that section. See the "Configure Command Sections" section for all sections listed alphabetically. If you are already in the configuration editor and no section name is specified, the configuration editor will tell you the name of the section you are currently editing and the line on which it can be found in the configuration buffer. Otherwise, if no section name is specified, the configuration editor will inform you that you have not specified a section and will prompt for a section name. A list of section names can be retrieved, or a short help message can be displayed. By entering a ? at the section name prompt, a list of configurable sections will be generated by the configuration editor. You may choose from this list. The following example shows the results of successfully entering the configuration editor. My Test Router# configure ip wan 0 Configure parameters in this section by entering: To find a list of valid keywords and additional help enter "?" [ IP WAN 0 ]# At this point all subcommands of the configuration editor will be accepted. |
list | The list subcommand will display the section that is currently being modified by the configuration editor. The list subcommand has many options that can be used to display different aspects of the configuration section. The list subcommand and its options are fully described in the "show config" section. | ||
delete keyword | See the section for applicable keywords. The delete subcommand is used to delete a keyword and its associated value from the configuration. Most keywords may only appear one time in a section, and in those cases, the delete subcommand will simply display the configuration entry and the line it was found on. You will then be asked if you want to delete it. [ IP WAN 0 ]# delete ripout Delete 'RIPOut = TRUE', from line 31? y *[ IP WAN 0 ]# In the case of keywords that may (and actually do) appear multiple times within a section, each instance will be prompted as in the previous example until no more instances of the keyword exist in the section. You may delete any, all or none of the keyword/value pairs. The command will continue through all instances of the keyword regardless of your input. If you only want to change a configured value for a keyword, then it is not necessary to use the delete subcommand. The normal keyword entry procedures described in the following section will both change and create new keywords. | ||
keyword = value | See the section for applicable keywords and values. In the configuration editor, additions and modifications to the configuration are made by using keyword and value pairs. The real strength of the configuration editor is the ability to enter keywords in a section and ensure that the value associated with the keyword is syntactically correct. A keyword and value may be entered as it would appear in the configuration. keyword = value Unlike section names, keywords may be abbreviated to a unique subset of characters at the beginning of the keyword. Labels and values in general may not be abbreviated.
The following information is displayed when an invalid value is entered. *[ IP WAN 0 ]# ripout = foo
Command Line: 1: Boolean parse failed, 'foo'
The value 'foo' is invalid.
The keyword 'RIPOut' expects Boolean values:
Default: On
Valid Values: True/False, On/Off, 1/0, or Yes/No.
When a value is accepted, the new keyword will be inserted in the section directly below the section name, before any other items in the section. If the keyword already exists in the section, the value will be replaced, leaving the keyword where it was in the section. If a keyword may appear more than once in a section, like the Zone keyword in an AppleTalk section, each keyword/value pair will be added to the section. If you want to change such a value, you must first delete the value and then add the new value. | ||
keyword = ? | The value may be entered as a question mark (?) to find out additional information about the keyword. *[ IP WAN 0 ]# ripin = ? The keyword 'RIPIn' expects Boolean values: ? To get a list of keywords for a section, enter a ? after the section name. | ||
exit | There is really no reason to exit the configuration editor, since all management commands are available from within the configuration editor. However, if you want to leave the editor, enter exit at the prompt. *[ Time Server ]# exit Leaving section editor. *My Test Router# | ||
# Comment | Comments and blank lines may occur anywhere in a configuration. If you create your own configuration files, you are encouraged to make them as readable as possible. Comments begin with a pound sign (#) and continue until the end of the line. # This is a comment [ New Section ] # So is this |
The configuration editor is the primary way to manage (create, modify, display, and delete) configuration parameters from the command line interface of the device. The only other way is to edit the configuration with the edit config command. The configuration editor simplifies the process of creating configurations from the console or telnet and will ensure a syntactically correct configuration.
The configuration editor is entered by selecting a section of the configuration to modify. If the section doesn't exist in the configuration, the configuration editor will ask if you want to add the section. To indicate that you are in the configuration editor, the command line prompt will change to the section name followed by a pound sign (#). For example, when modifying parameters for the section IP WAN 0, the prompt would be:
[ IP WAN 0 ]#
The new prompt indicates that you are modifying the IP WAN 0 section of the configuration using the configuration editor. All of the subcommands of the configuration editor will now work to modify, display, delete or create configuration parameters.
The primary function of the configuration editor is to add or modify configuration variables. These variables are entered as keyword and value pairs. The configuration editor will only permit valid keywords to be added to the section being edited. Additionally, it checks to make sure that the value being entered for the keyword is a valid type and within the prescribed ranges defined by the device.
When a configuration variable has been changed with the configuration editor, the command line's configuration buffer will be changed. It is possible to reset the configuration buffer to what is stored in the permanent configuration memory or to the default settings by using the reset config command. Once all changes to the configuration are complete, the save command is needed to save the modified configuration to the permanent configuration storage and restart the device so that the new configuration takes effect.
The configuration editor has an extensive help facility that tries to guide you through your configuration. The help information for keywords will specify what type of value is expected and other information about the keyword. This is the ? command.
Within the configuration editor, all of the regular management commands are still available. For instance, if you are modifying the section IP WAN 0 and you want to see what the device's IP configuration would look like with your new changes, you can still use the show ip config command to display that information without leaving the configuration editor. This is true of all other management commands.
The configuration editor can also be used to convert old binary configuration data to the new text-based format. The configure command will automatically convert an old configuration to the new format if an old configuration is detected.
In the following example session, the IP interface in a router will be configured. The router currently has the default configuration for IP.
My Test Router> sh ip config
Addresses
Port IP Addr Subnet Broadcast Flags
Ether0 disabled
Ether1 disabled
Bridge 198.41.12.1 255.255.255.0 198.41.12.255 <RIP:out,in>
Wan0 Unnumbered interface <RIP:disabled>
Remote Address: 0.0.0.0 <>
Wan1 Unnumbered interface <RIP:disabled>
Remote Address: 0.0.0.0 <>
In this example we will set an IP address for Ethernet 0 and disable the bridge interface. We will start by disabling the IP bridge interface.
My Test Router> configure ip bridge Enter Password: password entered here... Section 'ip bridge' not found in the config. Do you want to add it to the config? y Configure parameters in this section by entering: <Keyword> = <Value> To find a list of valid keywords and additional help enter "?" *[ IP Bridge ]#
Notice that the section was not found in the configuration. The configuration editor prompts to see if the section should be added. Also now that we have selected a section, the router prompt has changed. The star (*) preceding the prompt indicates that the configuration has been modified.
Now we can disable the interface.
*[ IP Bridge ]# mode = off *[ IP Bridge ]# list [ IP Bridge ] Mode = Off *[ IP Bridge ]#
The show ip config command verifies that the interface has been disabled.
*[ IP Bridge ]# show ip config
Addresses
Port IP Addr Subnet Broadcast Flags
Ether0 disabled
Ether1 disabled
Bridge disabled
Wan0 Unnumbered interface <RIP:disabled>
Remote Address: 0.0.0.0 <>
Wan1 Unnumbered interface <RIP:disabled>
Remote Address: 0.0.0.0 <>
![]() |
Note The actual router interfaces are still running as before the changes were made. No changes take effect until they are saved using the save command. Until saved, all changes are made in a separate buffer. |
Enable the Ethernet 0 interface, using the following command sequence.
*[ IP Bridge ]# configure ip ethernet 0 Section 'ip ethernet 0' not found in the config. Do you want to add it to the config? y Configure parameters in this section by entering: <Keyword> = <Value> To find a list of valid keywords and additional help enter "?" *[ IP Ethernet 0 ]# mode = routed *[ IP Ethernet 0 ]# ipaddr = 10.0.0.1 *[ IP Ethernet 0 ]# subnet = 255.255.255.0 *[ IP Ethernet 0 ]# list [ IP Ethernet 0 ] SubnetMask = 255.255.255.0 IPAddress = 10.0.0.1 Mode = Routed *[ IP Ethernet 0 ]#
The preceding example shows the minimal set of parameters needed to enable an IP router interface. The show ip config command verifies the configuration.
*[ IP Ethernet 0 ]# show ip config
Addresses
Port IP Addr Subnet Broadcast Flags
Ether0 10.0.0.1 255.255.255.0 10.0.0.255 <RIP:out,in>
Ether1 disabled
Bridge disabled
Wan0 Unnumbered interface
<RIP:disabled>
Remote Address: 0.0.0.0 <>
Wan1 Unnumbered interface <RIP:disabled>
Remote Address: 0.0.0.0 <>
Notice that the RIP routing protocol and broadcast address are configured, even though they are not explicitly listed in the configuration.
The list subcommand has a cooked mode to display all of the important parameters in the configuration. By adding the cook and mark options the list subcommand will tell us parameters that we have entered which are different from the router's default values. See the "show config" section for a complete description of these and other features.
*[ IP Ethernet 0 ]# list cook mark [ IP Ethernet 0 ] Mode = Routed # Default => Bridged IPAddress = 10.0.0.1 # Default => 0.0.0.0 SubnetMask = 255.255.255.0 # Default => 0.0.0.0 IPBroadcast = 0.0.0.0 RIPVersion = V1 OutFilters = InFilters =
Now that we are satisfied with the configuration, it must be written to the permanent configuration storage area in the router. The save command initiates that process and restarts the router.
*[ IP Ethernet 0 ]# save Save configuration to flash and restart router? y (Router writes configuration information and restarts....)
![]() |
Note Turning off a device in the middle of a save/restart will cause it to lose its operating software. Please wait at least 5 minutes before deciding that a download has failed to be stored in Flash ROM. |
| Command | Description |
|---|---|
Display device's text-based configuration and default parameters | |
edit config | Line editor for configuration |
reset config | Reset configuration with current or factory settings |
Save a new configuration and restart immediately |
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Wed Sep 27 10:32:12 PDT 2000
Copyright 1989-2000©Cisco Systems Inc.