03-Interface Command Reference

HomeSupportSwitchesH3C S12500 Switch SeriesReference GuidesCommand ReferencesH3C S12500 Command Reference-Release7128-6W71003-Interface Command Reference
02-Loopback and null interface commands
Title Size Download
02-Loopback and null interface commands 96.46 KB

Loopback and null interface commands

default

Use default to restore the default settings for a loopback or null interface.

Syntax

default

Views

Loopback interface view, null interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

 

CAUTION

CAUTION:

The default command might interrupt ongoing network services. Make sure you are fully aware of the impacts of this command before using it on a live network.

 

This command might fail to restore the default settings for some commands for reasons such as command dependencies and system restrictions. Use the display this command in interface view to identify these commands, and then use their undo forms or follow the command reference to individually restore their default settings. If your restoration attempt still fails, follow the error message instructions to resolve the problem.

Examples

# Restore the default settings for interface loopback 1.

<Sysname> system-view

[Sysname] interface loopback 1

[Sysname-LoopBack1] default

description

Use description to set a description for an interface.

Use undo description to restore the default.

Syntax

description text

undo description

Default

The description of a loopback or null interface is the interface name plus Interface (for example, LoopBack1 Interface).

Views

Loopback interface view, null interface view

Predefined user roles

network-admin

mdc-admin

Parameters

text: Specifies an interface description, a string of 1 to 80 characters.

Usage guidelines

Configure a description for an interface for easy identification and management purposes.

You can use the display interface command to view the configured description.

Examples

# Set the description to for RouterID for interface loopback 1.

<Sysname> system-view

[Sysname] interface loopback 1

[Sysname-LoopBack1] description for RouterID

display interface loopback

Use display interface loopback to display information about the specified or all existing loopback interfaces.

Syntax

display interface [ loopback [ interface-number ] ] [ brief [ description ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

interface-number: Specifies a loopback interface by its number, which can be the number of any existing loopback interface. If you do not specify this argument, the command displays information about all existing loopback interfaces on the device.

brief: Displays brief interface information. If you do not specify this keyword, the command displays detailed interface information.

description: Displays the full description of the specified interface. When the keyword is not specified, only the first 27 characters of an interface description are displayed if the interface description is longer than 27 characters. When the keyword is specified, all characters of the interface description are displayed.

Usage guidelines

This command is supported only after a loopback interface is created.

If the loopback keyword is not specified, the command displays information about all interfaces of the device.

If the loopback keyword is specified but the interface-number argument is not specified, the command displays information about all existing loopback interfaces.

Examples

# Display detailed information about interface loopback 0.

<Sysname> display interface loopback 0

LoopBack0 current state: UP

Line protocol current state: UP (spoofing)

Description: LoopBack0 Interface

The Maximum Transmit Unit is 1536

Internet protocol processing : disabled

Physical is Loopback

Last clearing of counters:  Never

    Last 300 seconds input:  0 bytes/sec, 0 bits/sec, 0 packets/sec

    Last 300 seconds output:  0 bytes/sec, 0 bits/sec, 0 packets/sec

    0 packets input, 0 bytes, 0 drops

    0 packets output, 0 bytes, 0 drops

Table 1 Command output

Field

Description

current state

State of the loopback interface:

·       UPThe loopback interface can receive and transmit packets.

·       Administratively DOWN—The interface was manually shut down by using the shutdown command.

Line protocol current state

State of the data link layer protocol. If the link layer protocol state of an interface is shown as UP but its link is an on-demand link or not present at all, its protocol attribute includes the spoofing flag.

Description

Description string of the interface.

The Maximum Transmit Unit

MTU of the interface.

Internet protocol processing: disabled

Indicates that the interface cannot process Layer 3 packets (displayed when the interface is not configured with an IP address).

Internet Address is 1.1.1.1/32 Primary

Primary IP address of the interface (displayed when the interface is configured with a primary IP address).

Physical is Loopback

The physical type of the interface is loopback.

Last clearing of counters

Time when statistics on the logical interface were last cleared by using the reset counters interface command.

If the statistics of the interface have never been cleared by using the reset counters interface command since the device started, this field displays Never.

Last 300 seconds input:  0 bytes/sec, 0 bits/sec, 0 packets/sec

Average input rate during the last 300 seconds (displayed when the interface supports traffic statistics collection):

·       packets/secAverage number of packets received per second.

·       bytes/secAverage number of bytes received per second.

·       bits/secAverage number of bits received per second.

Last 300 seconds output:  0 bytes/sec, 0 bits/sec, 0 packets/sec

Average output rate over the last 300 seconds (displayed when the interface supports traffic statistics collection):

·       packets/secAverage number of packets sent per second.

·       bytes/secAverage number of bytes sent per second.

·       bits/secAverage number of bits sent per second.

0 packets input, 0 bytes, 0 drops

Amount of incoming traffic in packets and in bytes, and the total number of dropped incoming packets (displayed when the interface supports traffic statistics collection).

0 packets output, 0 bytes, 0 drops

Total number and size (in bytes) of output packets of the interface and the number of dropped packets (displayed when the interface supports traffic statistics collection).

 

# Display brief information about all loopback interfaces.

<Sysname> display interface loopback brief

The brief information of interface(s) under route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Main IP         Description

Loop1                UP   UP(s)    --              aaaaaaaaaaaaaaaaaaaaaaaaaaa

# Display brief information about all existing loopback interfaces, including the full description of each loopback interface.

<Sysname> display interface loopback brief description

The brief information of interface(s) under route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Main IP         Description

Loop1                UP   UP(s)    --              aaaaaaaaaaaaaaaaaaaaaaaaaaaaa

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Table 2 Command output

Field

Description

The brief information of interface(s) under route mode:

Brief information about loopback interfaces.

Link: ADM - administratively down; Stby - standby

·       ADM—The interface has been shut down by the network administrator. To recover its physical layer state, run the undo shutdown command.

·       Stby—The interface is a standby interface.

Protocol: (s) – spoofing

If the network layer protocol of an interface is UP but its link is an on-demand link or not present at all, this field displays UP (s), where s represents the spoofing flag. This attribute is typical of interface Null 0 and loopback interfaces.

Interface

Interface name.

Link

Physical link state of the interface:

·       UP—The link is up.

·       DOWN—The link is physically down.

·       ADM—The link has been administratively shut down. To recover its physical state, run the undo shutdown command.

·       Stby—The interface is a standby interface.

Protocol

Protocol connection state of the interface:

·       UP.

·       DOWN.

·       UP(s)—The link of the interface is an on-demand link or not present at all.

Description

Interface description configured by using the description command. If the description keyword is not specified in the display interface brief command, the Description field is of up to 27 characters. If the  description keyword is specified in the display interface brief command, the field displays the full interface description.

 

Related commands

·           interface loopback

·           reset counters interface loopback

display interface null

Use display interface null to display information about the null interface.

Syntax

display interface [ null [ 0 ] ] [ brief [ description ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

mdc-admin

mdc-operator

Parameters

0: Specifies interface Null 0.

brief: Displays brief interface information. If you do not specify this keyword, the command displays detailed interface information.

description: Displays the full description of the specified interface. When the keyword is not specified, only the first 27 characters of an interface description are displayed if the interface description is longer than 27 characters. When the keyword is specified, all characters of the interface description are displayed.

Usage guidelines

The device has only one null interface (Null 0). The null interface number is fixed at 0.

If the null keyword is not specified, the command displays information about all interfaces of the device.

If the null keyword is specified but the 0 keyword is not specified, the command displays information about interface Null 0, because the device has only one null interface Null 0.

Examples

# Display detailed information about interface Null 0.

<Sysname> display interface null 0

NULL0 current state: UP

Line protocol current state: UP (spoofing)

Description:  NULL0 Interface

The Maximum Transmit Unit is 1500

Internet protocol processing: disabled

Physical is NULL DEV

Last clearing of counters: Never

    Last 300 seconds input:  0 bytes/sec, 0 bits/sec, 0 packets/sec

    Last 300 seconds output:  0 bytes/sec, 0 bits/sec, 0 packets/sec

    0 packets input, 0 bytes, 0 drops

    0 packets output, 0 bytes, 0 drops

# Display brief information about interface Null 0.

<Sysname> display interface null 0 brief

The brief information of interface(s) under route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Main IP         Description

NULL0                UP   UP(s)    --              aaaaaaaaaaaaaaaaaaaaaaaaaaa

# Display brief information about interface Null 0 including the full description of the null interface.

<Sysname> display interface null 0 brief description

The brief information of interface(s) under route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Main IP         Description

NULL0                UP   UP(s)    --              aaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

For the command output, see Table 1 and Table 2.

Related commands

·           interface null

·           reset counters interface null

interface loopback

Use interface loopback to create a loopback interface and enter loopback interface view.

Use undo interface loopback to remove a loopback interface.

Syntax

interface loopback interface-number

undo interface loopback interface-number

Default

No loopback interface exists.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

interface-number: Specifies a loopback interface by its number, which is in the range of 0 to 1023.

Usage guidelines

The physical layer state and link layer protocols of a loopback interface are always up unless the loopback interface is manually shut down. You can establish a connection to a loopback interface to prevent the connection from being affected by the physical state of the interface and to improve the reliability of the connection. For example, you can configure a loopback interface as the source interface for establishing an FTP connection or use the loopback interface address as the Router ID in BGP.

Examples

# Create interface loopback1.

<Sysname> system-view

[Sysname] interface loopback 1

[Sysname-LoopBack1]

interface null

Use interface null to enter null interface view.

Syntax

interface null 0

Default

A device has only one null interface (Null 0), which cannot be created or deleted.

Views

System view

Predefined user roles

network-admin

mdc-admin

Parameters

0: Specifies interface Null 0. The null interface number is fixed at 0.

Examples

# Enter Null 0 interface view.

<Sysname> system-view

[Sysname] interface null 0

[Sysname-NULL0]

reset counters interface loopback

Use reset counters interface loopback to clear the statistics on the specified or all loopback interfaces.

Syntax

reset counters interface loopback [ interface-number ]

Views

User view

Predefined user roles

network-admin

mdc-admin

Parameters

interface-number: Specifies a loopback interface by its number, which can be the number of any existing loopback interface. If you do not specify the interface-number argument, the command clears the statistics on all loopback interfaces.

Usage guidelines

To determine whether a loopback interface works correctly within a period by collecting the traffic statistics within that period, first use the reset counters interface [ loopback [ interface-number ] ] command to clear the statistics, and then have the interface automatically collect the statistics.

This command is available only if at least one loopback interface has been created.

Examples

# Clear the statistics on loopback interface Loopback 1.

<Sysname> reset counters interface loopback 1

Related commands

display interface loopback

reset counters interface null

Use reset counters interface null to clear the statistics on the null interface.

Syntax

reset counters interface [ null [ 0 ] ]

Views

User view

Predefined user roles

network-admin

mdc-admin

Parameters

0: Specifies the number of the null interface, which is fixed at 0.

Usage guidelines

To determine whether the null interface works correctly within a period by collecting the traffic statistics within that period, first use the reset counters interface [ null [ 0 ] ] command to clear the statistics, and then have the interface automatically collect the statistics.

Examples

# Clear the statistics on interface Null 0.

<Sysname> reset counters interface null 0

Related commands

display interface null

shutdown

Use shutdown to shut down a loopback interface.

Use undo shutdown to bring up a loopback interface.

Syntax

shutdown

undo shutdown

Default

A loopback interface is up.

Views

Loopback interface view

Predefined user roles

network-admin

mdc-admin

Usage guidelines

Use the shutdown command with caution, because the command disconnects the connection of the interface and disables the interface from communicating.

Examples

# Shut down interface loopback 1.

<Sysname> system-view

[Sysname] interface loopback 1

[Sysname-LoopBack1] shutdown

 

 

 

 

  • 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
新华三官网