H3C S9500 Command Manual-Release1648[v1.24]-08 System Volume

HomeSupportSwitchesH3C S9500 Series SwitchesReference GuidesCommand ReferencesH3C S9500 Command Manual-Release1648[v1.24]-08 System Volume
12-Configuration File Management Commands
Title Size Download
12-Configuration File Management Commands 42.25 KB

Chapter 1  Configuration File Management Commands

1.1.1  display current-configuration

Syntax

display current-configuration [ controller | interface interface-type interface-number | configuration [ configuration ] ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Parameters

controller: Views the configuration information of controllers.

interface: Views the configuration information of interfaces.

interface-type: Type of the interface, including Aux, Ethernet, GigabitEthernet, NULL, VLAN-interface, M-Ethernet, and Loopback.

interface-number: Number of the interface.

configuration configuration: Views the pre-positive and post-positive configuration information. The value of configuration is the keyword of the configuration, such as:

l           system: Views the host name.

l           timerange: Views the configuration information of time range.

|: Filters the configuration information to be output by regular expression.

begin: Begins with the line that matches the regular expression.

exclude: Excludes lines that match the regular expression.

include: Includes lines that match the regular expression.

regular-expression: Defines the regular expression.

Table 1-1 Special characters in the regular expression

Special characters

Description

Restriction

_

Underscore, similar to a wildcard and can stand for these characters:

(^|$|[,(){} ])

A space, the beginning of the input string, the end of the input string

If the first character in the regular expression is not an underscore, then there is no restriction on the number of underscores (but it is restricted by the command length).

If the first character in the regular expression is an underscore, then there should be less than five consecutive underscores.

If the underscores in a command are discrete, the first group of underscores are filtered for the output information, but not the subsequent underscores.

(

Left parenthesis, push flag in program

It is recommended not to use this character in the regular expression.

 

Description

Use the display current-configuration command to display the currently effective configuration parameters of the switch.

If some running configuration parameters are the same with the default operational parameters, they will not be displayed.

After finishing a set of configurations, you can use the display current-configuration command to view the currently effective parameters, verifying whether the configurations are correct. As for some configured parameters, if the corresponding functions have not taken effect, they will not be displayed.

When there is much configuration information, you can use the regular expression to filter the output information. For specific rules about the regular expression, refer to the corresponding operation manual.

 

&  Note:

If there is a large amount of information, it will take a long period to filter the output information using a regular expression.

 

Related commands: save, reset saved-configuration, display saved-configuration.

Examples

# View the running configuration parameters of the switch.

<H3C> display current-configuration

#

 sysname H3C

#

radius scheme system

 server-type nec

 primary authentication 127.0.0.1 1645

 primary accounting 127.0.0.1 1646

 user-name-format without-domain

 

domain system

 radius-scheme system

 access-limit disable

 state active

 idle-cut disable

 domain default enable system

#

 local-server nas-ip 127.0.0.1

#

 router id 2.2.2.2

#

 stp timer hello 500

#

vlan 1

#

vlan 2

#

interface Vlan-interface1

#

interface Vlan-interface2

 ip address 10.1.1.2 255.255.255.0

#

interface Aux0/0

interface Aux0/0/1

#

interface M-Ethernet0/0/0

#

interface Ethernet4/1/1

#

interface Ethernet4/1/2

#

interface Ethernet4/1/3

#

interface Ethernet4/1/4

#

interface Ethernet4/1/5

#

interface Ethernet4/1/6

#

interface Ethernet4/1/7

#

interface NULL0

#

ospf

 #

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

#

user-interface aux 0

user-interface vty 0 4

#

return

# View the line containing the string 10*.1, where ”*” indicates that the character 0 in the string before it can appear multiple times or does not appear.

<H3C> display current-configuration | include 10*.1

remote-ip 10.10.0.2                                                       

  peer 10.10.0.2                                                         

 primary authentication 127.0.0.1 1645                                    

 primary accounting 127.0.0.1 1646                                       

 primary authentication 127.0.0.1 1645                                   

 primary accounting 127.0.0.1 1646                                        

 ip address 10.10.0.1 255.255.255.0                                      

 t1 1 unframed                                                           

 t1 1 unframed                                                           

interface Serial12/1/1/1:0                                               

interface GigabitEthernet1/1/1                                           

interface GigabitEthernet1/1/2                                           

interface GigabitEthernet1/1/3                                           

interface GigabitEthernet1/1/4                                           

interface GigabitEthernet1/1/5                                           

interface GigabitEthernet1/1/6                                            

interface GigabitEthernet1/1/7                                           

interface GigabitEthernet1/1/8                                           

interface GigabitEthernet10/1/1                                          

interface GigabitEthernet10/1/2                                          

interface GigabitEthernet10/1/3                                          

interface GigabitEthernet10/1/4                                          

  network 10.10.0.0 0.0.0.255

# View configuration information beginning with user.

<H3C> display current-configuration | include ^user

user-interface con 0

user-interface aux 0

user-interface vty 0 3

user-interface vty 4  

# View the pre-positive and post-positive configuration information.

<H3C> display current-configuration configuration

#

 sysname H3C

#

radius scheme system

 server-type nec

 primary authentication 127.0.0.1 1645

 primary accounting 127.0.0.1 1646

 user-name-format without-domain

 

domain system

 radius-scheme system

 access-limit disable

 state active

 idle-cut disable

 

 domain default enable system

#

 local-server nas-ip 127.0.0.1

#

 router id 2.2.2.2

#

 stp timer hello 500

#

ospf

 #

 area 0.0.0.0

  network 10.1.1.0 0.0.0.255

#

user-interface aux 0

user-interface vty 0 4

#

return

1.1.2  display saved-configuration

Syntax

display saved-configuration

View

Any view

Parameters

None

Description

Use the display saved-configuration command to view the configuration files in the flash memory or CF card of a switch.

If the switch works abnormally after being powered on, execute the display saved-configuration command to view the startup configuration of the switch.

Related commands: save, reset saved-configuration, display current-configuration.

Examples

# Display configuration files in flash memory or CF card of the switch.

<H3C> display saved-configuration

#

 sysname H3C

#

local-user abc password simple abc

#

 tcp window 8

#

interface Aux7/1/1

 link-protocol ppp

#

interface Ethernet2/1/1

#

interface Ethernet2/1/2

#

interface Ethernet2/1/3

 ip address 10.110.101.17 255.255.255.0

#

interface NULL0

#

ospf 1

#

 ip route-static 10.12.0.0 255.255.0.0 Ethernet 12/1/0

#

user-interface con 0

user-interface aux 0

user-interface vty 0 4

 authentication-mode none

#

return

From top down are the global configurations, port configurations, and user interface configurations.

1.1.3  display this

Syntax

display this

View

Any view

Parameters

None

Description

Use the display this command to display the running configuration of the current view.

After finishing a set of configurations, you can use the display this command to view the currently effective parameters, verifying whether the configurations are correct.

Some effective parameters are not displayed if they are the same with the default ones. As for some configured parameters, if the corresponding functions have not taken effect, they will not be displayed. For example, if X.25 is encapsulated at the data link layer on an interface, you can configure PPP parameter on the interface, but cannot view the configuration information when executing the display this command.

Associated configuration of the interface is displayed when you execute the command in different interface views; related configuration of the protocol view is displayed when you execute this command in different protocol views; and all the configuration of the protocol view is displayed when you execute this command in protocol sub-views.

Related commands: save, reset saved-configuration, display current-configuration, display saved-configuration.

Examples

# Display the running configuration parameters in the current view.

<H3C> display this

1.1.4  display startup

Syntax

display startup

View

Any view

Parameters

None

Description

Use the display startup command to display the related system software and configuration filenames used for the current and the next startups.

This command is used to display the following information: the user-configured filename of the system software for the current startup, the filename of the system software actually used for the current startup, the filename of the system software configured for the next startup, the configuration filename used for the current startup, the configuration filename configured for the next startup.

Related commands: startup saved-configuration.

Examples

# Display the filenames related to the current and the next startup.

<H3C> display startup

MainBoard:

  Startup saved-configuration file:          flash:/9500.cfg

  Next startup saved-configuration file:     flash:/9500.cfg

1.1.5  reset saved-configuration

Syntax

reset saved-configuration

View

User view

Parameters

None

Description

Use the reset saved-configuration command to erase configuration files from the flash memory of the switch.

Perform this command with caution. It is suggested to consult technical support personnel first.

Generally, this command is used in the following situations:

l           After upgrade of software, configuration files in flash memory may not match the new version software. Perform the reset saved-configuration command to erase the old configuration files.

l           If a used switch is applied to the new circumstance and the original configuration files cannot meet the new requirements, the switch should be configured again. Erase the original configuration files for reconfiguration.

If the configuration files do not exist in the flash memory when the switch is powered on and initialized, default values will be used for initialization.

Related commands: save, display current-configuration, display saved-configuration.

Examples

# Erase the configuration files from the flash memory of the switch.

<H3C> reset saved-configuration

The saved configuration will be erased.

Are you sure?[Y/N]

1.1.6  save

Syntax

save [ file-name ]

View

User view

Parameters

file-name: Name of the configuration file with the extension .cfg. It is a character string of 5 to 56 characters.

Description

Use the save command to save the current configuration files to Flash memory.

After finishing a group of configurations, you should get the current configuration files stored in the flash memory.

Even if the problems like reboot and power-off occur during saving, the configuration can still be saved to Flash.

Related commands: reset saved-configuration, display current-configuration, display saved-configuration.

Examples

# Get the current configuration files stored in the flash memory.

<H3C> save

The configuration will be written to flash:/config.cfg

Are you sure?[Y/N]y  

Now saving current configuration to the device.

Saving configuration flash:/config.cfg. Please wait..

 

Configuration is saved successfully.

1.1.7  startup saved-configuration

Syntax

startup saved-configuration cfgfile

View

User view

Parameters

cfgfile: Name of the configuration file. It is a string with a length of 5 to 56 characters.

Description

Use the startup saved-configuration command to configure the configuration file used for starting up the system for the next time.

The configuration file must have “.cfg” as its extension name and must be saved under the root directory of the Flash.

Related commands: display startup.

Examples

# Configure the configuration file for the next startup

<H3C> startup saved-configuration config.cfg

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网