• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

01-接入分册

目录

04-Loopback接口和Null接口命令

本章节下载 04-Loopback接口和Null接口命令  (150.21 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/Blade/B5500/Command/Command_Manual/H3C_Blade5500_CR-5W100/01/201011/698067_30005_0.htm

04-Loopback接口和Null接口命令


1 Loopback接口和NULL接口配置命令

1.1  Loopback接口和NULL接口配置命令

1.1.1  description

【命令】

description text

undo description

【视图】

Loopback接口视图/Null 0接口视图

【缺省级别】

2:系统级

【参数】

text:描述接口的描述字符串,可支持的描述字符包括英文可以包含标准字符(区分大小写的字母、数字)、英文特殊字符、空格、以及符合unicode编码规范的其他文字和符号,为1~80个字符的字符串。

l    一个英文字符占用一个字符长度,一个unicode编码的字符占用两个字符长度,用户可以在描述字符串中混合输入英文字符和unicode字符,但字符串总长度不能超过规定的长度范围。

l    如果用户在设置描述字符时需要使用unicode编码的某种文字或符号,则必须具有相应的输入法软件,并使用支持该字符的远程登录软件登录到设备上进行配置。

l    一个unicode编码的字符占用两个字符长度,所以当所配置的描述信息长度达到或超过终端软件最大列宽时,终端软件会进行自动换行,此时可能导致unicode字符被截断,终端软件会在换行处之后显示乱码。

 

【描述】

description命令用来设置当前接口的描述信息。undo description命令用来恢复缺省情况。

缺省情况下,接口的描述信息为“接口名 interface”,比如:Loopback1 Interface。

相关配置可参考命令display interface

【举例】

# 设置Loopback 1的描述信息为“loopback1”。

<Sysname> system-view

[Sysname] interface loopback 1

[Sysname- loopback1] description loopback1

1.1.2  display interface loopback

【命令】

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

【视图】

任意视图

【缺省级别】

1:监控级

【参数】

interface-number:Loopback接口的编号,取值范围为已创建的Loopback接口的编号。

|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“系统分册”中的“系统基本配置”。

begin:从包含指定正则表达式的行开始显示。

exclude:只显示不包含指定正则表达式的行。

include:只显示包含指定正则表达式的行。

regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。

【描述】

display interface loopback命令用来显示Loopback接口的相关信息。如果不指定接口编号,将显示所有已创建的Loopback接口的相关信息。

相关配置可参考命令interface loopback

【举例】

# 查看指定接口Loopback0的状态。

<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

表1-1 display interface loopback命令显示信息描述表

字段

描述

current state

接口当前的物理状态:(UP/Administrtely DOWN)

Line protocol current state

链路层协议状态:UP (Spoofing:接口的欺骗属性,即接口的网络层协议状态显示是up的,但实际可能没有对应的链路,或者所对应的链路不是永久存在而是按需建立)

Description

接口的描述字符串

The Maximum Transmit Unit

接口的最大传输单元

Internet protocol processing

网络层协议处理状况:disabled和enabled(状态显示为Internet Address is X.X.X.X/XX Primary)

Physical is Loopback

接口的物理类型是Loopback

Last clearing of counters

最近一次使用reset counts interface命令清除接口下的统计信息的时间(如果从设备启动一直没有执行reset counts interface命令清除过该接口下的统计信息,则显示Nerver

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

最近300秒钟的平均输入速率:bytes/sec表示平均每秒输入的字节数,bits/sec表示平均每秒输入的比特数,packets/sec表示平均每秒输入的包数

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

最近300秒钟的平均输出速率:bytes/sec表示平均每秒输出的字节数,bits/sec表示平均每秒输出的比特数,packets/sec表示平均每秒输出的包数

0 packets input, 0 bytes, 0 drops

接口输入的报文总数(分别以包和字节为单位进行了统计),输入报文中丢弃的报文数

0 packets output, 0 bytes, 0 drops

接口输出的报文总数(分别以包和字节为单位进行了统计),输出报文中丢弃的报文数

 

Blade5500系列刀片交换机不支持对loopback接口的平均输入/输出速率和输入/输出报文进行统计,其对应项在显示信息中的结果为“0”。

 

1.1.3  display interface loopback brief

【命令】

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

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

【视图】

任意视图

【缺省级别】

1:监控级

【参数】

interface-number:Loopback接口的编号,取值范围为已创建的Loopback接口的编号。

down:显示当前状态为DOWN的Loopback接口的信息以及DOWN的原因。

|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“系统分册”中的“系统基本配置”。

begin:从包含指定正则表达式的行开始显示。

exclude:只显示不包含指定正则表达式的行。

include:只显示包含指定正则表达式的行。

regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。

【描述】

display interface loopback brief命令用来显示Loopback接口的概要信息。

相关配置可参考命令interface loopback

【举例】

# 显示接口Loopback0的概要信息。

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

# 显示所有状态为down的Loopback接口的概要信息。

<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

表1-2 display interface loopback brief命令显示信息描述表

字段

描述

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

三层模式下(route)的接口的概要信息,即三层接口的概要信息

Link: ADM - administratively down; Stby - standby

如果某接口的Link属性值为“ADM”,则表示该接口被管理员手工关闭了,需要在该接口下执行undo shutdown命令才能恢复端口本身的物理状态

如果某接口的Link属性值为“Stby”,则表示该接口是一个备份接口

Protocol: (s) - spoofing

如果某接口的Protocol属性值中带有“(s)”字符串,则表示该接口的网络层协议状态显示是UP的,但实际可能没有对应的链路,或者所对应的链路不是永久存在而是按需建立

Interface

接口名称缩写

Link

接口物理连接状态,取值可能为:

l      UP

l      ADM

Protocol

接口协议连接状态,取值为UP(s)

Main IP

接口主IP地址

Description

接口的描述信息

Cause

接口物理连接状态为DOWN的原因,取值为Administratively时表示本链路被手工关闭了,需要执行undo shutdown命令才能恢复真实的物理状态

 

1.1.4  display interface null

【命令】

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

【视图】

任意视图

【缺省级别】

1:监控级

【参数】

0:Null接口的编号,取值固定为0。

|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“系统分册”中的“系统基本配置”。

begin:从包含指定正则表达式的行开始显示。

exclude:只显示不包含指定正则表达式的行。

include:只显示包含指定正则表达式的行。

regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。

【描述】

display interface null命令用来查看Null接口的状态信息。由于只存在一个Null接口Null0,所以,如果不指定参数,显示的也是Null0的状态信息。

相关配置可参考命令interface null

【举例】

# 查看指定接口Null0的状态信息。

<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 interface null命令字段描述请参见“1-1”。

Blade5500系列刀片交换机不支持对Null0接口的平均输入/输出速率和输入/输出报文进行统计,其对应项在显示信息中的结果为“0”。

 

1.1.5  display interface null brief

【命令】

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

【视图】

任意视图

【缺省级别】

1:监控级

【参数】

0:Null接口的编号,取值固定为0。

|:使用正则表达式对显示信息进行过滤。有关正则表达式的详细介绍,请参见“系统分册”中的“系统基本配置”。

begin:从包含指定正则表达式的行开始显示。

exclude:只显示不包含指定正则表达式的行。

include:只显示包含指定正则表达式的行。

regular-expression:表示正则表达式,为1~256个字符的字符串,区分大小写。

【描述】

display interface null brief命令用来显示Null接口的概要信息。

相关配置可参考命令interface null

【举例】

# 显示接口Null0的概要信息。

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

表1-3 display interface loopback brief命令显示信息描述表

字段

描述

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

三层模式下(route)的接口的概要信息,即三层接口的概要信息

Link: ADM - administratively down; Stby - standby

Link属性值“ADM”表示该接口被管理员手工关闭了

Link属性值“Stby”表示该接口是一个备份接口

Protocol: (s) - spoofing

如果某接口的Protocol属性值中带有“(s)”字符串,则表示该接口的网络层协议状态显示是UP的,但实际可能没有对应的链路,或者所对应的链路不是永久存在而是按需建立

Interface

接口名称缩写

Link

接口状态,Null接口永远处于up状态

Protocol

接口协议连接状态,取值为UP(s)

Main IP

接口主IP地址

Description

接口的描述信息

 

1.1.6  interface loopback

【命令】

interface loopback interface-number

undo interface loopback interface-number

【视图】

系统视图

【缺省级别】

2:系统级

【参数】

interface-numberLoopback接口的编号,取值范围为0~127。

【描述】

interface loopback命令用来创建Loopback接口,并进入指定的Loopback接口视图。undo interface loopback命令用来删除指定的Loopback接口。

相关配置可参考命令display interface loopback

【举例】

# 创建Loopback接口5。

<Sysname> system-view

[Sysname] interface loopback 5

[Sysname-LoopBack5]

1.1.7  interface null

【命令】

interface null 0

【视图】

系统视图

【缺省级别】

2:系统级

【参数】

0:Null接口的编号。

【描述】

interface null命令用来进入Null接口的视图。

Null接口只有一个,固定为Null0。该接口始终处于up状态,不能被关闭或删除。

相关配置可参考命令display interface null

【举例】

# 进入Null0接口的视图。

<Sysname> system-view

[Sysname] interface null 0

[Sysname-NULL0]

1.1.8  reset counters interface

【命令】

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

【视图】

用户视图

【缺省级别】

2:系统级

【参数】

interface-type:逻辑接口类型。

interface-number:逻辑接口编号。

【描述】

reset counters interface命令用来清除指定逻辑接口的统计信息。

在某些情况下,需要统计一定时间内某逻辑接口的流量,这就需要在统计开始前清除该逻辑接口原有的统计信息,重新进行统计。

l              如果不指定interface-typeinterface-number,则清除所有接口的统计信息;

l              如果指定interface-type而不指定interface-number,则清除所有该类型逻辑接口的统计信息;

l              如果同时指定interface-typeinterface-number,则清除指定逻辑接口的统计信息。

【举例】

# 清除接口Loopback 5的统计信息。

<Sysname> reset counters interface loopback 5

1.1.9  shutdown

【命令】

shutdown

undo shutdown

【视图】

Loopback视图

【缺省级别】

2:系统级

【参数】

【描述】

shutdown命令用来关闭Loopback接口。undo shutdown命令用来打开以Loopback接口。

缺省情况下,Loopback接口为打开状态。

【举例】

# 关闭接口Loopback 1。

<Sysname> system-view

[Sysname] interface loopback 1

[Sysname-Loopback1] shutdown


不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们