指示灯和端口规格
· 系统状态:绿色(正常)/红色(故障)
· 交换机负载利用率:总交换使用率在1%到100%之间
· 控制端口:RJ-45凹式端口
· 重启(交换机隐含保护)
· 管理端口:10/100BASE-TX(RJ-45凹式)数据终端设备(DTE);绿色(工作正常)/橙色(禁用)/关闭(没有连接)
其它功能:
支持以下的GBIC模块:
· 1000BASE-SX GBIC: 光纤最长1804 feet (550 m)
· 1000BASE-LX/LH GBIC: 光纤最长32,808 feet (6 miles or 10 km)
· 1000BASE-ZX GBIC: 光纤最长328,084 feet (62 miles or 100 km)
配置端口
配置一组端口
命令 目的
Step 1 configure terminal 进入配置状态
Step 2 Switch(config)# interface range {vlan vlan_ID - vlan_ID} | {{fastethernet | gigabitethernet } slot/interface - interface} [, {vlan vlan_ID - vlan_ID} {{fastethernet | gigabitethernet } slot/interface - interface}] 进入组配置状态
Step 3 可以使用平时的端口配置命令进行配置
Step 4 end 退回
Step 5 show interfaces [interface-id] 验证配置
Step 6 copy running-config startup-config 保存
当使用interface range命令时有如下的规则:
· 有效的组范围:
o vlan从1 到4094
o fastethernet 槽位/{first port} - {last port}
o gigabitethernet槽位/{first port} - {last port}
· 端口号之间需要加入空格,如:interface range fastethernet 2/1 – 5 是有效的,而interface range fastethernet 2/1-5 是无效的.
· interface range 命令只能配置已经存在的interface vlan
· 所有在同一组的端口必须是相同类别的。
见以下例子:
4006# configure terminal
4006(config)# interface range fastethernet2/1 - 5
4006(config-if-range)# no shutdown
40065(config-if-range)#
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet2/1, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet2/2, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet2/3, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet2/4, changed state to up
*Oct 6 08:24:35: %LINK-3-UPDOWN: Interface FastEthernet2/5, changed state to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet2/05,
changed state to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet2/3, changed
state to up
*Oct 6 08:24:36: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet2/4, changed
state to up
以下的例子显示使用逗号来配置不同类型端口的组:
4006# configure terminal
4006(config)# interface range fastethernet2/1 – 3, gigabitethernet3/1 - 2
4006(config-if-range)# no shutdown
4006(config-if-range)#
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet2/1, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet2/2, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface FastEthernet2/3, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet3/1, changed state to up
*Oct 6 08:29:28: %LINK-3-UPDOWN: Interface GigabitEthernet3/2, changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/ 1,
changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 2,
changed state to up
*Oct 6 08:29:29: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/ 3,
changed state to up
Use the no description interface configuration command to delete the description.
This example shows how to add a description on Fast Ethernet interface 0/4 and to verify the description:
4006# config terminal
Enter configuration commands, one per line. End with CNTL/Z.
4006(config)# interface fastethernet2/4
4006(config-if)# description Connects to Marketing
4006(config-if)# end
4006# show interfaces fastethernet2/4 description
Interface Status Protocol Description
Fa2/4 up down Connects to Marketing
配置三层口
Catalyst 4006支持三种类型的三层端口:
· SVIs: 即interface vlan
Enter configuration commands, one per line. End with CNTL/Z.
4006(config)# interface gigabitethernet3/2
4006(config-if)# no switchport
4006(config-if)# ip address 192.20.135.21 255.255.255.0
4006(config-if)# no shutdown
4006(config-if)# end
show ip interface命令:
4006# show ip interface gigabitethernet3/2
GigabitEthernet3/2 is up, line protocol is up
Internet address is 192.20.135.21/24
Broadcast address is 255.255.255.255
Address determined by setup command
MTU is 1500 bytes
Helper address is not set
Directed broadcast forwarding is disabled
<output truncated>;
监控及维护端口
监控端口和控制器的状态
主要命令见下表:
Show Commands for Interfaces Command 目的
show interfaces [type slot/interface] 显示所有端口或某一端口的状态和配置.
show interfaces interface-id status [err-disabled] 显示一系列端口的状态或错误-关闭的状态
show interfaces [interface-id] switchport 显示二层端口的状态,可以用来决定此口是否为二层或三层口。
show interfaces [interface-id] description 显示端口描述
show protocols [type slot/interface] 显示在任何已配置协议下全局和接口的状态
show running-config interface [interface-id] 显示当前配置中的端口配置情况
show version 显示软硬件等情况
举例如下:
Switch#show interfaces status
Port Name Status Vlan Duplex Speed Type
Gi1/1 notconnect 1 auto auto No Gbic
Gi1/2 notconnect 1 auto auto No Gbic
Gi5/1 notconnect 1 auto auto 10/100/1000-TX
Gi5/2 notconnect 1 auto auto 10/100/1000-TX
Gi5/3 notconnect 1 auto auto 10/100/1000-TX
Gi5/4 notconnect 1 auto auto 10/100/1000-TX
Fa6/1 connected 1 a-full a-100 10/100BaseTX
Fa6/2 connected 2 a-full a-100 10/100BaseTX
Fa6/3 notconnect 1 auto auto 10/100BaseTX
Fa6/4 notconnect 1 auto auto 10/100BaseTX
Switch#
This example shows how to display the status of interfaces in error-disabled state:
Switch# show interfaces status err-disabled
Port Name Status Reason
Fa9/4 err-disabled link-flap
informational error message when the timer expires on a cause
--------------------------------------------------------------
5d04h:%PM-SP-4-ERR_RECOVER:Attempting to recover from link-flap err-disable state on Fa9/4
Switch#
Switch# show protocols fastethernet 5/5
FastEthernet5/5 is up, line protocol is up
Switch#
使用 no shutdown 命令重新打开端口.
举例如下:
Switch# configure terminal
Switch(config)# interface fastethernet2/5
Switch(config-if)# shutdown
Switch(config-if)#
*Sep 30 08:33:47: %LINK-5-CHANGED: Interface FastEthernet2/5, changed state to a
administratively down
Switch# configure terminal
Switch(config)# interface fastethernet2/5
Switch(config-if)# no shutdown
Switch(config-if)#
*Sep 30 08:36:00: %LINK-3-UPDOWN: Interface FastEthernet2/5, changed state to up
使用 default interface slot/port还原到缺省配置状态。
举例如下:
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)# interface fastethernet2/1
配置EtherChannel
以太通道捆绑几个以太端口为一个独立的逻辑链路。在三代引擎的确4006与其它交换机之间,可提供达1600Mbps(百兆双工以太通道)或16Gbps(千兆以太通道)的带宽。一台4006交换机最多可支持64个以太通道。
你可以捆绑在4006任何模块上最多8个兼容的具有相同速率的端口。
每个以太通道具有一个port-channel端口号。要捆绑一个以太通道时,会产生一个逻辑port-channel端口,逻辑端口下的配置可影响与之捆绑的物理端口,但物理端口下的配置不能影响逻辑端口的配置。
三层以太通道配置
Command Purpose
Step 1 configure terminal 进入Switch 1配置状态
Step 2 Switch(config)# interface port-channelport_channel_number 产生一个逻辑端口
Step 3 Switch(config-if)# ip address ip_address mask 配置IP地址
Step 4 end 退出
Step 5 Switch# show running-config interfaceport-channel port_channel_number 确认配置
例子:
Switch# configure terminal
Switch(config)# interface port-channel 1
Switch(config-if)# ip address 172.32.52.10 255.255.255.0
Switch(config-if)# end
Switch# show running-config interface port-channel 1
Building configuration...
Current configuration:
!
interface Port-channel1
ip address 172.32.52.10 255.255.255.0
no ip directed-broadcast
end
Switch#
三层物理端口配置
Command Purpose
Step 1 configure terminal 进入Switch 1配置状态
Step 2 Switch(config)# interface {fastethernet |gigabitethernet} slot/port 进入物理端口配置模式
Step 3 Switch(config-if)# no switchport 改变该端口为三层接口
Step 4 Switch(config-if)# no ip address 确认接口没有配置IP地址
Step 5 Switch(config-if)# channel-group port_channel_numbermode {auto | desirable | on} 将该物理端口加入一个以太通道中,并确定PagP模式
Step 6 end 退出
Step 7 Switch# show running-config interface port-channelport_channel_numberSwitch# show running-config interface {fastethernet| gigabitethernet} slot/portSwitch# show interfaces {fastethernet |gigabitethernet} slot/port etherchannelSwitch# show etherchannel 1 port-channel 确认配置
例子:
Switch# configure terminal
Switch(config)# interface range fastethernet 5/4 - 5 (Note: Space is mandatory.)
Switch(config-if)# no switchport
Switch(config-if)# no ip address
Switch(config-if)# channel-group 1 mode desirable
Switch(config-if)# end
二层以太通道配置
Command Purpose
Step 1 configure terminal 进入Switch 1配置状态
Step 2 Switch(config)# interface {fastethernet | gigabitethernet}slot/port 进入物理端口
Step 3 Switch(config-if)# channel-group port_channel_numbermode {auto | desirable | on} 将该物理端口加入一个以太通道中,并确定PagP模式
Step 4 end 退出
Step 5 Switch# show running-config interface {fastethernet |gigabitethernet} slot/portSwitch# show interface {fastethernet | gigabitethernet}slot/port etherchannel 确认配置
例子:
Switch# configure terminal
Switch(config)# interface range fastethernet 5/6 - 7 (注意: 空格是必需的)
Switch(config-if-range)# channel-group 2 mode desirable
Switch(config-if-range)# end
Switch# show running-config interface port-channel 2
Building configuration...
Current configuration:
!
interface Port-channel2
switchport access vlan 10
switchport mode access
end
Switch#
下面两个例子是如何确认Fast Ethernet interface 5/6的配置的:
Switch# show running-config interface fastethernet 5/6
Building configuration...
Current configuration:
!
interface FastEthernet5/6
switchport access vlan 10
switchport mode access
channel-group 2 mode desirable
end
Switch# show interfaces fastethernet 5/6 etherchannel
Port state = EC-Enbld Up In-Bndl Usr-Config
Channel group = 1 Mode = Desirable Gcchange = 0
Port-channel = Po1 GC = 0x00010001
Port indx = 0 Load = 0x55
Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
Timers: H - Hello timer is running. Q - Quit timer is running.
S - Switching timer is running. I - Interface timer is running.
Local information:
Hello Partner PAgP Learning Group
Port Flags State Timers Interval Count Priority Method Ifindex
Fa5/6 SC U6/S7 30s 1 128 Any 56
Partner's information:
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Fa5/6 JAB031301 0050.0f10.230c 2/47 18s SAC 2F
Age of the port in the current state: 00h:10m:57s
下面例子显示如何确认接口配置后的port-channel interface 2 配置的:
Switch# show etherchannel 2 port-channel
Port-channels in the group:
----------------------
Port-channel: Po2
------------
Age of the Port-channel = 00h:23m:33s
Logical slot/port = 10/2 Number of ports in agport = 2
GC = 0x00020001 HotStandBy port = null
Port state = Port-channel Ag-Inuse
Ports in the Port-channel:
Index Load Port
-------------------
1 00 Fa5/6
0 00 Fa5/7
Time since last port bundled: 00h:23m:33s Fa5/6
Switch#
例子:
Switch(config)# port-channel load-balance src-dst-ip
Switch(config)# end
Switch(config)#
This example shows how to verify the configuration:
Switch# show etherchannel load-balance
Source XOR Destination IP address
Switch#
配置SPAN
理解SPAN
SPAN通过诸如SwitchProbe设备或其它Remote Monitoring (RMON) probe等的网络分析仪来选择分析网络流量。SPAN从任意VLAN上的一个或多个源端口来镜像流量作为分析。如下图所示:所有从E5(源端口)的流量被镜像到E10。在E10上的一个网络分析仪可以在没有与E5端直接物理互连的情况接受到它的所有网络流量。对于进行SPAN配置,所有的源和目标端口必须在同一个交换机上。SPAN不影响源端口的网络流量的交换;一个由源接口接收或传输的复制会送到目标接口。