配置cisco2950交换机的端口( 二 )


show interfaces [interface-id] switchport
显示二层端口的状态 , 可以用来决定此口是否为二层或三层口 。
show interfaces [interface-id] description
显示端口描述
show running-config interface [interface-id]
显示当前配置中的端口配置情况
show version
显示软硬件等情况
举例如下:
Switch# show interfaces statusSwitch# show interfaces fastethernet 0/1 switchportSwitch# show running-config interface fastethernet0/2刷新、重置端口及计数器Clear命令
目的
clear counters [interface-id]
清除端口计数器.
clear line [numberconsole 0vty number]
重置异步串口的硬件逻辑
Noteclear counters 命令只清除用show interface所显示的计数 , 不影响用snmp得到的计数

举例如下:
Switch# clear counters fastethernet0/5 Clear "show interface" counters on this interface [confirm] y Switch#*Sep 30 08:42:55: %CLEAR-5-COUNTERS: Clear counter on interface FastEthernet0/5by vty1 (171.69.115.10) 可使用clear line 命令来清除或重置某一端口或串口 , 在大部分情况下并不需要这样做:
Switch# clear interface fastethernet0/5 关闭和打开端口命令
目的
Step;1;
configure terminal
进入配置状态
Step;2;
interface {vlan vlan-id}{{fastethernetgigabitethernet} interface-id}{port-channel port-channel-number}
选择要关闭的端口
Step;3;
shutdown
关闭
Step;4;
end
退出
Step;5;
show running-config
验证
使用 no shutdown 命令重新打开端口.
举例如下:
Switch# configure terminalSwitch(config)# interface fastethernet0/5 Switch(config-if)# shutdown Switch(config-if)#Switch# configure terminalSwitch(config)# interface fastethernet0/5 Switch(config-if)# no shutdown Switch(config-if)# (完)

推荐阅读