03-Interface Command Reference

HomeSupportSwitchesH3C S9500E Switch SeriesReference GuidesCommand ReferencesH3C S9500E Command Reference-Release1728-6W17003-Interface Command Reference
04-Loopback and Null Interface Commands
Title Size Download
04-Loopback and Null Interface Commands 92.57 KB

Loopback and null interface configuration commands

default

Syntax

default

View

Loopback interface view, null interface view

Default level

2: System level

Parameters

None

Description

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

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

 

CAUTION

CAUTION:

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

 

Examples

# Restore the default settings for interface loopback 1.

<Sysname> system-view

[Sysname] interface Loopback 1

[Sysname-Loopback1] default

This command will restore the default settings. Continue? [Y/N]:y

description

Syntax

description text

undo description

View

Loopback interface view, Null 0 interface view

Default level

2: System level

Parameters

text: Description of the interface, a string of 1 to 80 characters, which supports spaces, characters and symbols found in standard English (such as numbers and case-sensitive letters), special English, and other characters or symbols that conform to the Unicode standard.

 

 

NOTE:

·       An interface description can be a mixture of English characters and other Unicode characters. The mixed description cannot exceed the specified length.

·       To use a type of Unicode characters or symbols in an interface description, install the specific input method editor and log in to the switch through supported remote login software.

·       When the length of a description string reaches or exceeds the maximum line width on the terminal software, the software starts a new line, possibly breaking a Unicode character into two. As a result, garbled characters may be displayed at the end of a line.

·       Each non-English Unicode character or symbol (non-English characters) takes the space of two regular characters. When the length of a description string reaches or exceeds the maximum line width on the terminal software, the software starts a new line. This may break a Unicode character into two parts and create garbled characters at the end of a line.

 

Description

Use the description command to configure a description for the current interface.

Use the undo description command to restore the default.

By default, the description of a loopback or null interface is interface name Interface, for example, LoopBack2 Interface.

Related commands: display interface.

Examples

# Set the description of interface LoopBack2 to PIM-SM RP.

[Sysname] interface Loopback 2

[Sysname-LoopBack2] description PIM-SM RP

display interface loopback

Syntax

display interface [ loopback ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]

display interface loopback interface-number [ brief ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

interface-number: Loopback interface number, which can be the number of any existing Loopback interface.

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

down: Displays information about interfaces in DOWN state and the causes. If you do not specify this keyword, this command displays information about interfaces in all states.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

Use the display interface loopback command to display the information about a Loopback interface.

If you do not specify the loopback keyword, this command displays information about all interfaces on the device.

If you specify the loopback keyword without the interface-number argument, this command displays information about all created loopback interfaces.

Related commands: interface loopback.

Examples

# View the 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 Address is 2.2.2.2/32 Primary

Physical is Loopback

Last clearing of counters:  Never

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

    Last 300 seconds output rate: 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 loopback 0.

<Sysname> display interface Loopback 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

Loop0                UP   UP(s)    --

# Display brief information about all loopback interfaces in DOWN state.

<Sysname> display interface Loopback brief down

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

Link: ADM - administratively down; Stby - standby

Interface            Link Cause

Loop1                ADM  Administratively

Table 1 Output description

Field

Description

current state

Physical state (up or down) of the interface.

Line protocol current state

State of the data link layer protocol: UP (spoofing). Spoofing refers to the spoofing attribute of the interface. That is, when the network layer protocol state of the interface is displayed as up, the corresponding link may not exist, or the corresponding link is non-permanent and established on demand.

Description

Description string of the interface.

The Maximum Transmit Unit

Maximum transmission unit (MTU) of the interface.

Internet protocol processing

State (enabled or disabled) of the network layer protocol.

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 with the reset counters interface command since the switch starts, Never is displayed for this field.

Last 300 seconds input rate:  0 bytes/sec 0 packets/sec

Input rate during the latest 300 seconds, which is measured in bytes per second and packets per second.

Last 300 seconds output rate:  0 bytes/sec 0 packets/sec

Output rate during the latest 300 seconds, which is measured in bytes per second and packets per second.

0 packets input, 0 bytes, 0 drops

Total number and size (in bytes) of the input packets of the interface and the number of the dropped packets.

0 packets output, 0 bytes, 0 drops

Total number and size (in bytes) of the output packets of the interface and the number of the dropped packets.

The brief information of interface(s) under route mode

Brief information about Layer 3 interfaces.

Link: ADM - administratively down; Stby - standby

Link status:

·       ADMThe interface has been administratively shut down. To recover its physical state, perform the undo shutdown command.

·       StbyThe interface is operating as a backup interface.

Protocol: (s) - spoofing

If the network 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 (an s in parentheses).

Interface

Abbreviated interface name.

Link

Physical link state of the interface:

·       UPThe link is up.

·       ADMThe link has been administratively shut down. To recover its physical state, perform the undo shutdown command.

Protocol

Protocol connection state of the interface, which can be UP, DOWN, or UP(s).

Main IP

Main IP address of the interface.

Description

Description of the interface.

Cause

The cause of a DOWN physical link. If the port has been shut down with the shutdown command, this field displays Administratively. To restore the physical state of the interface, use the undo shutdown command.

 

display interface null

Syntax

display interface [ null ] [ brief [ down ] ] [ | { begin | exclude | include } regular-expression ]

display interface null 0 [ brief ] [ | { begin | exclude | include } regular-expression ]

View

Any view

Default level

1: Monitor level

Parameters

0: Specifies interface Null 0. The interface number is fixed at 0, because the switch has only one null interface.

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

down: Displays information about interfaces in DOWN state and the causes. If you do not specify this keyword, this command displays information about interfaces in all states.

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.

Description

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

If you do not specify the null keyword, this command displays information about all interfaces on the device.

If you specify the null keyword, this command displays information about interface Null 0 with or without the 0 keyword, because the device supports only one interface Null 0.

Related commands: interface null.

Examples

# View the information about interface Null 0.

<Sysname> display interface NULL 0

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 rate:  0 bytes/sec, 0 bits/sec, 0 packets/sec

    Last 300 seconds output rate:  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)    --

For the output description, see Table 1.

interface loopback

Syntax

interface loopback interface-number

undo interface loopback interface-number

View

System view

Default level

2: System level

Parameters

interface-number: Loopback interface number, ranging from 0 to 1023.

Description

Use the interface loopback command to create a Loopback interface or enter Loopback interface view.

Use the undo interface loopback command to remove a Loopback interface.

Related commands: display interface loopback.

Examples

# Create interface Loopback 5.

<Sysname> system-view

[Sysname] interface Loopback 5

[Sysname-LoopBack5]

interface null

Syntax

interface null 0

View

System view

Default level

2: System level

Parameters

0: Specifies interface Null 0.

Description

Use the interface null command to enter null interface view.

A switch has only one null interface, interface Null 0, which is always up, and cannot be disabled or removed.

Related commands: display interface null.

Examples

# Enter Null 0 interface view.

<Sysname> system-view

[Sysname] interface NULL 0

[Sysname-NULL0]

reset counters interface

Syntax

reset counters interface [ interface-type [ interface-number ] ]

View

User view

Default level

2: System level

Parameters

interface-type: Interface type.

interface-number: Interface number.

Description

Use the reset counters interface command to clear statistics for interfaces.

Before collecting statistics within a specific period of time on an interface, you must clear the existing statistics on it.

If no interface type is specified, this command clears the statistics of all interfaces.

If only the interface type is specified, this command clears the statistics of the interfaces of the specified type.

If both the interface type and interface number are specified, this command clears the statistics of the specified interface.

Examples

# Clear the statistics of Loopback 3.

<Sysname> reset counters interface Loopback 3

shutdown

Syntax

shutdown

undo shutdown

View

Loopback interface view

Default level

2: System level

Parameters

None

Description

Use the shutdown command to shut down the current loopback interface.

Use the undo shutdown command to bring up the current loopback interface.

By default, a loopback interface is up.

Examples

# Shut down loopback 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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网