Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2048784
  • 博文数量: 433
  • 博客积分: 4775
  • 博客等级: 上校
  • 技术积分: 8054
  • 用 户 组: 普通用户
  • 注册时间: 2009-10-19 16:15
文章存档

2014年(9)

2013年(20)

2012年(77)

2011年(323)

2009年(4)

分类: 系统运维

2011-10-20 00:35:08

接口的配置可能不会经常性的,但接口的监控管理则可能成为我们日常的设备管理的一项重要要事项。本节要向大家介绍的Cisco主流的几个以太局域网交换机系列的接口管理与维护。

1. 监控接口和计数器状态

Cisco 12.2版本IOS系统的Catalyst 3750/4500/6500系列交换机中,包含了一系列的监控接口和口计数器状态的特权模式命令,包括显示软件和硬件版本、计数器状态、接口统计信息。它们都是以show开头的,可以通过在特权模式提示符下键入show ?命令来查看当前交换机中可以使用的这些管理命令。监控接口和计数器可用的主要命令具体如表4-22所示。

4-22   监控接口和计数器状态可用的主要命令

命令

用途说明

show interfaces [interface-id]

显示所有,或者指定接口状态和配置

[interface-id] switchport

show interfaces [interface-id] description

显示指定或者所有接口的描述配置和接口状态

show ip interface [interface-id]

显示指定或所有配置了IP路由的接口的可用状态

show interface [interface-id] stats

显示通过指定接口或者所有接口的输入/输出包

interface-id detail

10G接口模块状态信息,如温度和警报状态

interface-id properties detail

10G模块的速率和双工设置

transceiver properties

[interface-id] [{transceiver properties | detail}] module number]

SFP模块的物理和运行状态

[interface-id]

RAM中的当前运行配置

show version

显示交换机的硬件配置、软件版本、交换机名称、配置文件资源和引导映象

show controllers ethernet-controller interface-id phy

显示指定或者所有接品上的auto-MDIX功能运行状态

Switch# show protocols interface-id

显示所有配置协议的全局和指定接口状态

show power inline [interface-id | module switch-number]

显示交换机或者交换机堆叠上指定接口或者特定堆叠成员上的PoE状态

下面是一个如何显示fa5/5接口协议配置状态的示例。

Switch# show protocols fa5/5

FastEthernet5/5 is up, line protocol is up

Switch#

2. 清除和重置接口设置

要清除在show interfaces命令中显示的接口计数器,可以使用clear counters [interface-id]特权模式命令进行。

以下是一个显示如何清除和重置fa5/5接口上的计数器的示例。

Switch# clear counters fa5/5

Clear "show interface" counters on this interface [confirm] y

Switch#

*Sep 30 08:42:55: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet5/5

by vty1 (171.69.115.10)

Switch#

【注意】如果使用没带任何参数的clear counters特权模式命令,则会从所有接口中清除所有接口的计数器。clear counters命令不清除用于检索SNMP的计数器,仅能清除显示在show interfaces命令输出的计数器。

3. 关闭和重启接口

你可以禁用一个接口,此时会禁用指定接口的所有功能,并在所有监控命令输出显示中标记该接口为不可用状态。这个信息会通过所有动态路由协议传达到其他网络服务器中。这样任何路由更新都不会与该接口关联了。

关闭和重启接口的步骤如表4-23所示。

4-23  关闭和重启接口的步骤

 

命令

用途说明

Step 1 

Switch(config)# interface {vlan vlan_ID} | {{fastethernet | gigabitethernet | tengigabitethernet} slot/port} | {port-channel

port_channel_number}

指定要配置的接口(包括VLAN接口、各种以太网物理接口、端口通道),并进入接口配置模式

关闭接口

重启接口

下面的示例显示了如何关闭fa5/5接口。

Switch(config)# interface fastethernet 5/5

Switch(config-if)# shutdown

Switch(config-if)#

*Sep 30 08:33:47: %LINK-5-CHANGED: Interface FastEthernet5/5, changed state to a

administratively down

Switch(config-if)#

下面的示例显示了如何重启上面示例的fa5/5接口。

Switch(config-if)# no shutdown

Switch(config-if)#

*Sep 30 08:36:00: %LINK-3-UPDOWN: Interface FastEthernet5/5, changed state to up

Switch(config-if)#

要验证接口是否被禁用了,可以键入show interfaces特权模式命令来查看。禁用了的接口将显示“administratively down”

本文摘自《(CiscoH3C交换机配置与管理完全手册)》第四章

阅读(1157) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~