03-Interface

HomeSupportResource CenterH3C Access Controllers Command References(E5208P03 E5215P01 R5215P01)-6W10203-Interface
03-Loopback, null, and inloopback interface commands

Loopback, null, and inloopback interface commands

bandwidth

Use bandwidth to configure the expected bandwidth of an interface.

Use undo bandwidth to restore the default.

Syntax

bandwidth bandwidth-value

undo bandwidth

Default

The expected bandwidth of a loopback interface is 0 kbps.

Views

Loopback interface view

Predefined user roles

network-admin

Parameters

bandwidth-value: Specifies the expected bandwidth in the range of 1 to 400000000 kbps.

Usage guidelines

The expected bandwidth is an informational parameter used only by higher-layer protocols for calculation. You cannot adjust the actual bandwidth of an interface by using this command.

Examples

# Set the expected bandwidth of Loopback 0 to 1000 kbps.

<Sysname> system-view

[Sysname] interface loopback 0

[Sysname-LoopBack0] bandwidth 1000

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

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 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 0.

<Sysname> system-view

[Sysname] interface loopback 0

[Sysname-LoopBack0] 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, LoopBack0 Interface).

Views

Loopback interface view

Null interface view

Predefined user roles

network-admin

Parameters

text: Specifies an interface description, a case-sensitive string of 1 to 255 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 0.

<Sysname> system-view

[Sysname] interface loopback 0

[Sysname-LoopBack0] description for RouterID

display interface inloopback

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

Syntax

display interface [ inloopback [ 0 ] ] [ brief [ description | down ] ]

Views

Any view

Predefined user roles

network-admin

network-operator

Parameters

0: Specifies interface Inloopback 0.

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

description: Displays complete interface descriptions. If you do not specify this keyword, the command displays only the first 27 characters of interface descriptions. The description of an inloopback interface is always InLoopBack0 Interface and cannot be configured.

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

Usage guidelines

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

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

Examples

# Display detailed information about interface Inloopback 0.

<Sysname> display interface inloopback

InLoopBack0

Current state: UP

Line protocol state: UP(spoofing)

Description: InLoopBack0 Interface

Maximum transmit unit: 1536

Physical: InLoopBack

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

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

Table 1 Command output

Field

Description

Current state

Physical layer state of the interface, which is always UP, meaning that the inloopback interface can receive and transmit packets.

Line protocol state

Data link layer protocol state of the interface, which is always UP(spoofing). UP(spoofing) means that the data link layer protocol state of the interface is up, but the link is an on-demand link or is not present.

Description

Description string of the interface, which is always InLoopBack0 Interface and cannot be configured.

Maximum transmit unit

MTU of the interface, which is always 1536 and cannot be configured

Physical: InLoopBack

The physical type of the interface is inloopback.

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

·     bytes/sec—Average number of bytes received per second.

·     bits/sec—Average number of bits received per second.

·     packets/sec—Average number of packets received per second.

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

·     bytes/sec—Average number of bytes sent per second.

·     bits/sec—Average number of bits sent per second.

·     packets/sec—Average number of packets sent per second.

Input: 0 packets, 0 bytes, 0 drops

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

Output: 0 packets, 0 bytes, 0 drops

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

 

# Display brief information about interface Inloopback 0.

<Sysname> display interface inloopback 0 brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP         Description

InLoop0              UP   UP(s)    --

Table 2 Command output

Field

Description

Brief information on interfaces in route mode:

Brief information about the inloopback interface.

Link: ADM - administratively down; Stby - standby

Explains the Link field values:

·     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. To view the primary interface information, run the display interface-backup state command.

Protocol: (s) - spoofing

Explains the Protocol field value.

(s) represents spoofing. If the data link layer protocol of an interface is up, but its link is an on-demand link or is not present, the Protocol field displays UP(s). This attribute is typical of interface Null 0, Inloopback 0, and loopback interfaces.

Interface

Interface name.

Link

Physical layer state of the interface, which is always UP, meaning that the link is physically up.

Protocol

Data link layer protocol state of the interface, which is always UP(s).

Primary IP

IP address of the interface.

Because inloopback interfaces do not support CLI configuration, this field does not display a value.

Description

Interface description configured by using the description command. Because inloopback interfaces do not support CLI configuration, this field does not display a value.

 

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 | down ] ]

Views

Any view

Predefined user roles

network-admin

network-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 complete interface descriptions. If you do not specify this keyword, the command displays only the first 27 characters of interface descriptions.

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

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. (Suppose the loopback interface supports traffic statistics collection.)

<Sysname> display interface loopback 0

LoopBack0

Current state: UP

Line protocol state: UP(spoofing)

Description: LoopBack0 Interface

Bandwidth: 1000kbps

Maximum transmit unit: 1536

Internet protocol processing: Disabled

Physical: 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

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# Display detailed information about interface loopback 0. (Suppose the loopback interface does not support traffic statistics collection.)

<Sysname> display interface loopback 0

LoopBack0

Current state: UP

Line protocol state: UP(spoofing)

Description: LoopBack0 Interface

Maximum transmit unit: 1536

Internet protocol processing : Disabled

Physical: Loopback

Last clearing of counters:  Never

Table 3 Command output

Field

Description

Current state

Physical layer state of the interface:

·     UP—The loopback interface can receive and transmit packets.

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

Line protocol state

Data link layer protocol state of the interface. UP (spoofing) means that the data link layer protocol state of the interface is up, but the link is an on-demand link or is not present.

Description

Description string of the interface.

Bandwidth

Expected bandwidth of the interface. This field is not displayed when the value is 0.

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: 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 rate:  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):

·     bytes/sec—Average number of bytes received per second.

·     bits/sec—Average number of bits received per second.

·     packets/sec—Average number of packets received per second.

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

·     bytes/sec—Average number of bytes sent per second.

·     bits/sec—Average number of bits sent per second.

·     packets/sec—Average number of packets sent per second.

Input: 0 packets, 0 bytes, 0 drops

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

Output: 0 packets, 0 bytes, 0 drops

Total number and size (in bytes) of outgoing 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

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP         Description

Loop1                UP   UP(s)    --              forLAN1

# Display information about all loopback interfaces in down state and the causes.

<Sysname> display interface loopback brief down

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Interface            Link Cause

Loop1                ADM  Administratively

Table 4 Command output

Field

Description

Brief information on interfaces in route mode:

Brief information about loopback interfaces.

Link: ADM - administratively down; Stby - standby

Explains the Link field values:

·     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. To view the primary interface information, run the display interface-backup state command.

Protocol: (s) - spoofing

Explains the Protocol field value.

(s) represents spoofing. If the data link layer protocol of an interface is up, but its link is an on-demand link or is not present, the Protocol field displays UP(s). This attribute is typical of interface Null 0, Inloopback 0, and loopback interfaces.

Interface

Interface name.

Link

Physical layer state of the interface:

·     UP—The interface is up.

·     DOWN—The interface is physically down.

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

·     Stby—The interface is a standby interface.

Protocol

Data link layer protocol state of the interface.

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 allows a maximum of 27 characters. If the description keyword is specified in the display interface brief command, the field displays the complete interface description.

Cause

Cause of the interface down event. If the interface has been shut down by using the shutdown command, this field displays Administratively. To restore the physical state of the interface, execute the undo shutdown command.

 

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 | down ] ]

Views

Any view

Predefined user roles

network-admin

network-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 complete interface descriptions. If you do not specify this keyword, the command displays only the first 27 characters of interface descriptions.

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

Usage guidelines

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. This is because the device has only one null interface Null 0.

Examples

# Display detailed information about interface Null 0. (Suppose the null interface supports traffic statistics collection.)

<Sysname> display interface null 0

NULL0

Current state: UP

Line protocol state: UP(spoofing)

Description: NULL0 Interface

Bandwidth: 1000000kbps

Maximum transmit unit: 1500

Internet protocol processing: Disabled

Physical: 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

Input: 0 packets, 0 bytes, 0 drops

Output: 0 packets, 0 bytes, 0 drops

# Display detailed information about interface Null 0. (Suppose the null interface does not support traffic statistics collection.)

<Sysname> display interface null 0

NULL0

Current state: UP

Line protocol state: UP(spoofing)

Description:  NULL0 Interface

Maximum transmit unit: 1500

Internet protocol processing: Disabled

Physical: NULL DEV

Last clearing of counters: Never

# Display brief information about interface Null 0.

<Sysname> display interface null 0 brief

Brief information on interfaces in route mode:

Link: ADM - administratively down; Stby - standby

Protocol: (s) - spoofing

Interface            Link Protocol Primary IP         Description

NULL0                UP   UP(s)    --             

For the command output, see Table 3 and Table 4.

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

Parameters

interface-number: Specifies a loopback interface by its number. The value is 0.

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 use a loopback interface to achieve the following purposes:

·     Prevent the connection from being affected by the physical state of the interface.

·     Improve the reliability of the connection.

Examples

# Create interface loopback 0.

<Sysname> system-view

[Sysname] interface loopback 0

[Sysname-LoopBack0]

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

Parameters

0: Specifies interface Null 0. The null interface number is always 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

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. Then have the interface automatically collect the statistics.

This command is available only if a minimum of one loopback interface has been created.

Examples

# Clear the statistics on loopback interface Loopback 0.

<Sysname> reset counters interface loopback 0

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

Parameters

0: Specifies the number of the null interface, which is always 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. 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

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 0.

<Sysname> system-view

[Sysname] interface loopback 0

[Sysname-LoopBack0] shutdown