< Home

clear configuration this

Function

The clear configuration this command deletes configurations on an interface at a time to restore the default configurations.

Format

clear configuration this

Parameters

None

Views

Interface view (excluding tunnel interface view, stack-port interface view, and port group view)

Default Level

3: Management level

Usage Guidelines

Usage Scenario

To configure an interface on a device for other use, original configurations on the interface need to be deleted one by one. If the interface has a large number of configurations, deleting these configurations one-by-one takes a long time and increases the maintenance workload. To reduce the maintenance workload and simplify the deletion operation, you can use this command to perform one-touch configuration clearance on an interface.

You can also run the clear configuration interface interface-type interface-num command in the system view to delete configurations on a specified interface.

Configuration Impact

After you run the clear configuration this command, the system displays a message, asking you whether to delete the configurations on the specified interface. If you enter Y, all configurations on the specified interface are deleted and the interface status becomes shutdown.

Running the clear configuration this command on an interface is similar to running undo commands on the interface in batches.

Precautions

The execution of this command takes a long time. To terminate the running command, press Ctrl+C.

In general, after the clear configuration this command is run on an interface to clear the configuration, the default configuration is restored. If special configurations exist on the interface on which the clear configuration this command is run, the configuration may be displayed in the undo command format.

As some commands correlate to each other, if you run the undo command to delete the configurations of a command, the configurations of the correlated command are also deleted. After the clear configuration this command is run on an interface, the statistics in the command output may be inconsistent with actual clearance results. Refer to the actual clearance results in real-world applications.

Example

# Perform one-touch configuration clearance on GigabitEthernet0/0/1.

<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] display this
#
interface GigabitEthernet0/0/1
 description abc
 port link-type access
#
return
[HUAWEI-GigabitEthernet0/0/1] clear configuration this
Warning: All configurations of the interface will be cleared, and its state will be shutdown. Continue? [Y/N] :y
Info: Total 2 command(s) executed, 2 successful, 0 failed.
[HUAWEI-GigabitEthernet0/0/1] display this
#
interface GigabitEthernet0/0/1
 shutdown
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >