路由器接口管理命令


1. clear port
清除接口统计信息。

clear port [ interface-type interface-number | interface-name ]

参数说明】

interface-type指接口类型,如Ethernet、Serial和Bri等。

interface-number指接口编号。

interface-name为接口名,为一字符串,内容为接口类型+接口编号。

缺省情况】

如果不指定相应接口,则清除全部接口的统计信息。

命令模式】

特权用户模式

使用指南】

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

举例】

清除接口Serial0的统计信息。

Quidway#clear port serial0

相关命令】

show interface

2. shutdown
关闭或重新启动物理接口。

[ no ] shutdown

缺省情况】

在路由器上电时,初始化并启动各物理接口。

命令模式】

接口配置模式

使用指南】

慎重使用关闭和重启接口命令,但在某些特殊情况下,如修改接口的工作参数时,不能立即生效,需要关闭和重启接口后,才能生效。

举例】

关闭接口Serial0。

Quidway(config-if-Serial0)#shutdown 
%Serial0 is shutdown 
%Interface Serial0 changed state to DOWN 
%Line protocol IP on interface Serial0 changed state to DOWN 

相关命令】

show interface

3. show interface
显示接口当前运行状态和接口统计信息。

show interface { interface-type interface-number | interface-name }

参数说明】

interface-type指接口类型,如Ethernet、Serial和Bri等。

interface-number指接口编号。

interface-name为接口名,为一字符串,内容为接口类型+接口编号。

命令模式】

特权用户模式

使用指南】

show interface命令显示信息包括:

接口的物? 态和协议状态
接口物理特性同异步、DTE/DCE、时钟选择,外接电缆等)
接口IP地址
接口封装的链路层协议以及链路层协议运行状态和统计信息等
接口的输入输出报文统计信息
用户可以根据这些信息进行流量统计和接口的故障诊断等。

举例】

查看接口Serial0封装PPP协议)的运行状态和统计信息。

#show interface serial 0 
Serial0 is up, line protocol is up 
physical layer is synchronous 
interface is DTE, clock is DTECLK1, cable type is V35 
Internet address is 10.3.0.158 255.255.255.252 
Encapsulation is PPP 
LCP opened, IPCP opened, IPXCP disabled 
Output queue 30/0, 33081 drops; Input queue 30/1, 0 drops. 
5 minutes input rate 1288.14 bytes/sec, 4.97 packets/sec 
5 minutes output rate 3077.11 bytes/sec, 4.94 packets/sec 
997074 packets input, 485012871 bytes, 0 no buffers 
1825361 packets output, 542976191 bytes, 0 no buffers 
1171945 input errors, 437713 CRC, 504161 frame errors 

相关内容