2950上怎么设定监控端口

--------------------------------------------------------------------------------

This example shows how to create SPAN session 1 to monitor both sent and received traffic on source
port 1 on destination port 8:


Switch(config)# monitor session 1 source interface fastethernet0/1 both
Switch(config)# monitor session 1 destination interface fastethernet0/8
This example shows how to delete a destination port from an existing SPAN session:
Switch(config)# no monitor session 2 destination fastethernet0/4
This example shows how to configure RSPAN session 1 to monitor multiple source interfaces and to
configure the destination RSPAN VLAN and the reflector-port:
Switch(config)# monitor session 1 source interface fastethernet0/10 tx
Switch(config)# monitor session 1 source interface fastethernet0/2 rx
Switch(config)# monitor session 1 source interface port-channel 102 rx
Switch(config)# monitor session 1 destination remote vlan 901 reflector-port
fastethernet0/1
Switch(config)# end
This example shows how to configure the destination port for ingress traffic on VLAN 5 by using a
security device that does not support IEEE 802.1Q encapsulation:
Switch(config)# monitor session 1 destination interface fastethernet0/5 ingress vlan 5
This example shows how to configure the destination port for ingress traffic on VLAN 5 by using a
security device that supports IEEE 802.1Q encapsulation:
Switch(config)# monitor session 1 destination interface fastethernet0/5 encapsulation
dot1q ingress vlan 5
This example shows how to disable ingress traffic forwarding on the destination port:
Switch(config)# monitor session 1 destination interface fastethernet0/5 encapsulation
dot1q
You can verify your settings by entering the show monitor privileged EXEC command

___________________________________________

2950上设定监控端口

--------------------------------------------------------------------------------

Cisco Catalyst 2900XL/3500XL/2950 系列交换机,配置命令为:
Switch(config-if)#port monitor interface
注:interface 是指侦听端口。
举例:我们要将接口Fa0/1 设置为侦听口,Fa0/2 及Fa0/5 设置为被侦听口,基本过程如下:
1、在配置模式下,首先选择接口Fa0/1:
Switch(config)#int fa0/1
输入被侦听端口:
Switch(config-if)#port monitor fastEthernet 0/2
Switch(config-if)#port monitor fastEthernet 0/5
指定管理端口:
Switch(config-if)#port monitor VLAN 1
这条命令并不意味着接口Fa0/1 将侦听vlan 1 的所有端口,它只是用来指定管理接口。
退出保存后,接口Fa0/1 设置为侦听口,接口Fa0/2,Fa0/5 设置为被侦听口。连接在接口Fa0/1 上的机器将能接收到通过接口Fa0/2,Fa0/5 的流量。
可以用命令Switch# show port monitor 来查看设置的结果:
Switch#show port monitor
Monitor Port Port Being Monitored
FastEthernet0/1 VLAN1
FastEthernet0/1 FastEthernet0/2
FastEthernet0/1 FastEthernet0/5
注:侦听口与被侦听口必须属于同一个vlan。