clear configuration interface

Function

The clear configuration interface command deletes configurations on an interface at one time.

Format

clear configuration interface { interface-type interface-number | interface-name }

Parameters

Parameter Description Value
interface-type

Deletes configurations on a specified type interface.

-

interface-number

Deletes configurations on a specified number interface.

-

interface-name

Deletes configurations on a specified name interface.

-

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
cli write

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 this command in the interface view to delete configurations on a specified interface.

Configuration Impact

  • After you run the clear configuration interface 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.
  • Running the clear configuration interface command on an interface is similar to running undo commands on the interface in batches.
  • To delete configurations on an interface at one time and restore the default configuration, run the clear configuration interface command. The command takes effect immediately without being committed using the commit command. Exercise caution when running the clear configuration interface command.

Example

# Delete configurations on GigabitEthernet 0/1/1 at one time.
<HUAWEI> system-view
[~HUAWEI] clear configuration interface GigabitEthernet 0/1/1
Warning: All running configurations of the interface will be cleared immediately. Continue? [Y/N]:y
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >