榕叶 发表于 2018-7-21 08:22:42

cisco、h3c端口镜像配置

  Cisco镜像端口
  一、 CISCO本地镜像端口
  1、 定义源端口
  Monitor session {session-number} source {interface interface-number | vlan vlan-ID}
  2、 定义目的端口
  Monitor session {session-number} destination {interface interface-number | vlan vlan-ID}
  3、 可以选择要监控的VLAN,多个VLAN可以用逗号连接
  Monitor session {session-number} filter vlan {vlan-list}
  例如:将G1/0/20端口接收到的流量镜像到G1/0/2。
  (config)#monitor session 1 source int g1/0/20 rx
  (config)#monitor session 1 destination int g1/0/2
  (config)#do show monitor
  Session 1
  ---------
  Type : Local Session
  Source Ports :
  RX Only : Gi1/0/20
  Destination Ports : Gi1/0/2
  Encapsulation : Native
  Ingress : Disabled
  二、 CISCO远端端口镜像
  原理是将源端口的流量镜像到本端VLAN中,然后通过TRUNK传送到目的设备。
  再将本地设备中VLAN中的数据镜像到指定的端口中。
  例如:
  (config)#vlan 777
  (config-vlan)#remote-span
  (config)#monitor session 1 source int g1/0/1
  (config)#monitor session 1 destination remote vlan 777
  将G1/0/1中端口的流量镜像到VLAN 777中
  (config)#vlan 777
  (config-vlan)#remote-span
  (config)#monitor session 1 source remote vlan 777
  (config)#monitor session 1 destination interface g1/0/10
  将VLAN 777中的流量镜像到G1/0/10,这时在G1/0/10上接设备就可以远程抓取数据包。
  H3C 端口镜像
  一、 H3C 本端镜像
  1、 创建镜像本端
  Mirroring-group mirror-number local
  2、 为本地镜像组配置源端口和目的端口
  Mirroring-group mirror-number mirroring-port interface interface
  Mirroring-group mirror-number monitor-port interface interface-number
  例如:
  Mirroring-group 1 local # 建立本地镜像组
  mirroring-group 1 mirroring-port e1/0/20 inbound # 建立本地镜像端口
  mirroring-group 1 monitor-port e1/0/21 # 建立目的端口
  将e1/0/20的端口的入流量镜像到时e1/0/21
  dis mirroring-group 1
  mirroring-group 1:
  type: local
  status: active
  mirroring port:
  Ethernet1/0/20 inbound
  monitor port: Ethernet1/0/21
  二、远程镜像端口
  原理和CISCO设备原理相同。
  例如:
  vlan 999 # 建立镜像VLAN
  remote-probe vlan enable #激活
  mirroring-group 1 remote-source #建立远端镜像源端组
  mirroring-group 1 mirroring-port e1/0/1 inbound #设置源端口及流量方向
  mirroring-group 1 reflector-port e1/0/4 #建立反射端口
  注意:反射端口不要有任何配置,关闭loopback-detection enable
  S3100-26TP-SI 在远程镜像中不支持both 参数,如果想抓取双向的数据包,可以和inbound和outband一起使用
  mirroring-group 1 remote-probe vlan 999
  dis mirroring-group 1
  mirroring-group 1:
  type: remote-source
  status: active
  mirroring port:
  Ethernet1/0/1 inbound
  reflector port: Ethernet1/0/4
  remote-probe vlan: 999
  vlan 999
  remote-probe vlan enable
  mirroring-group 1 remote-destination #建立远程目的端
  mirroring-group 1 monitor-port e1/0/19 #建立目的端端口
  mirroring-group 1 remote-probe vlan 999
  dis mirroring-group 1
  mirroring-group 1:
  type: remote-destination
  status: active
  monitor port: Ethernet1/0/19
  remote-probe vlan: 999
  注意:设备之间的互联必须是TRUNK,而且必须允许镜像VLAN通过。如果中间还有多台设备,只需要在该设备中填加VLAN,并填加remote-probe vlan enable。
http://www.iyunv.com/uploadfile/2011/0725/20110725105133251.jpg
页: [1]
查看完整版本: cisco、h3c端口镜像配置