端口镜像的建立方法

2025-04-15 00:33:16
推荐回答(1个)
回答1:

Cisco CATALYST交换机端口监听配置
Cisco CATALYST交换机分为两 种,在CATALYST家族中称侦听端口为分析端 口(analysis port)。
1、Catalyst 2900XL/3500XL/2950系列交换机端口监听配 置 (基于CLI)
以下命令配置端口监听:
port monitor
例 如,F0/1和F0/2、F0/3同属VLAN1,F0/1监听F0/2、F0/3端口:
interface FastEthernet0/1
port monitor FastEthernet0/2
port monitor FastEthernet0/3
port monitor VLAN1
2、Catalyst 4000,5000 and 6000系列交换机端口监听配 置 (基于IOS)
以下命令配置端口监听:
set span
例如,模块1中端口1和端口2同属VLAN1,端口3在VLAN2,端口4和5在VLAN2,端口2监听端 口1和3、4、5,
set span 1/1,1/3-5 1/2
2950/3550/3750
格式如下:
#monitor session number source interface mod_number/port_number both
#monitor session number destination interface mod_mnumber/port_number
//rx-->指明是进端口的流量,tx-->出端口的流量 both 进出的流量
for example:
第一条镜像,将第一模块中的源端口为1-10的镜像到端口12上面;
#monitor session 1 source interface 1/1-10 both
#monitor session 1 destination interface 1/12
第二条镜像,将第二模块中的源端口为13-20的镜像到端口24上面;
#monitor session 2 source interface 2/13-20 both
#monitor session 2 destination interface 2/24
当有多条镜像、多个模块时改变其中的参数即可。
Catalyst 2950 3550不支持port monitor
C2950#configure terminal
C2950(config)#
C2950(config)#monitor session 1 source interface fastEthernet 0/2
!--- Interface fa 0/2 is configured as source port.
C2950(config)#monitor session 1 destination interface fastEthernet 0/3
!--- Interface fa0/3 is configured as destination port.