打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
CISCO&H3C端口镜像实例

Cisco镜像端口

一、           CISCO本地镜像端口

1、  定义源端口

Monitor session {session-number} source {interface interface-number | vlan vlan-ID}  [rx|tx|both]

2、  定义目的端口

Monitor session {session-number} destination {interface interface-number | vlan vlan-ID} [rs|tx|both]

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 [to] interface [inbound|outbound|both]

Mirroring-group mirror-number monitor-port interface interface-number

例如:

Mirroring-group 1 local # 建立本地镜像组

[sw1]mirroring-group 1 mirroring-port e1/0/20 inbound # 建立本地镜像端口

 [sw1]mirroring-group 1 monitor-port e1/0/21 # 建立目的端口

将e1/0/20的端口的入流量镜像到时e1/0/21

[sw1]dis mirroring-group 1

mirroring-group 1:

    type: local

    status: active

    mirroring port:

        Ethernet1/0/20  inbound

    monitor port: Ethernet1/0/21

二、远程镜像端口

原理和CISCO设备原理相同。

 

例如:

[sw1]vlan 999  # 建立镜像VLAN

 [vlan999]remote-probe vlan enable #激活

 

[sw1]mirroring-group 1 remote-source  #建立远端镜像源端组

 [sw1]mirroring-group 1 mirroring-port e1/0/1 inbound #设置源端口及流量方向

[sw1]mirroring-group 1 reflector-port e1/0/4 #建立反射端口

注意:反射端口不要有任何配置,关闭loopback-detection enable

S3100-26TP-SI 在远程镜像中不支持both 参数,如果想抓取双向的数据包,可以和inbound和outband一起使用

[sw1]mirroring-group 1 remote-probe vlan 999

 

[sw1]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

 

[sw2]vlan 999

 [vlan999]remote-probe vlan enable

 

[sw2]mirroring-group 1 remote-destination #建立远程目的端

[sw2]mirroring-group 1 monitor-port e1/0/19 #建立目的端端口

[sw2]mirroring-group 1 remote-probe vlan 999

 

[sw2]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。

本文出自 “kkk” 博客

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
cisco交换技术
cisco 远程端口镜像
H3C S5560-EI
Cisco 3560G 交换机设置端口镜像
RSPAN的配置方针
端口镜像详解及配置
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服