• 产品与解决方案
  • 行业解决方案
  • 服务
  • 支持
  • 合作伙伴
  • 新华三人才研学中心
  • 关于我们

11-网络管理和监控配置举例

04-H3C_镜像典型配置举例

本章节下载 04-H3C_镜像典型配置举例  (906.95 KB)

docurl=/cn/Service/Document_Software/Document_Center/Switches/Catalog/S7500E/S7500X-G/Configure/Typical_Configuration_Example/H3C_S7500X-G_CE-R7724-6W100/11/201807/1091775_30005_0.htm

04-H3C_镜像典型配置举例

镜像典型配置举例

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright ©2018新华三技术有限公司 版权所有,保留一切权利。

H3C_彩色.emf

 



1  简介

本文介绍了端口镜像和流镜像的典型配置举例。

2  配置前提

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文假设您已了解镜像特性。

3  本地端口镜像典型配置举例

3.1  组网需求

图1所示,某公司内部各部门使用不同网段的IP地址,其中研发部使用10.1.1.0/24网段,市场部使用12.1.1.0/24网段。现要求通过配置本地端口镜像功能,使用数据监测设备对研发部和市场部访问Internet的流量以及两个部门之间互访的流量进行监控。

图1 本地端口镜像组网图

 

3.2  使用版本

本举例是在S7500XG-CMW710-R7724版本上进行配置和验证的。

3.3  配置注意事项

·     本地镜像组需要配置源端口、目的端口才能生效。其中目的端口不能是现有镜像组的成员端口。

·     目的端口收到的报文包括复制自源端口的报文和来自其他端口的正常转发报文。为了保证数据监测设备只对源端口的报文进行分析,请将目的端口只用于端口镜像,不作其他用途。

3.4  配置步骤

# 创建VLAN10,并向VLAN 10中添加端口Ten-GigabitEthernet1/0/25。

<DeviceA> system-view

[DeviceA] vlan 10

[DeviceA-vlan10] port ten-gigabitethernet 1/0/25

[DeviceA-vlan10] quit

# 创建VLAN20,并向VLAN 20中添加端口Ten-GigabitEthernet1/0/26。

[DeviceA] vlan 20

[DeviceA-vlan20] port ten-gigabitethernet 1/0/26

[DeviceA-vlan20] quit

# 创建VLAN30,并向VLAN 20中添加端口Ten-GigabitEthernet1/0/28。

[DeviceA] vlan 30

[DeviceA-vlan30] port ten-gigabitethernet 1/0/28

[DeviceA-vlan30] quit

# 配置接口Vlan-interface10的IP地址为10.1.1.1。

[DeviceA] interface vlan-interface 10

[DeviceA-Vlan-interface10] ip address 10.1.1.1 24

[DeviceA-Vlan-interface10] quit

# 请参考以上方法配置图1中其他接口的IP地址,配置步骤这里省略。

# 创建本地镜像组。

[DeviceA] mirroring-group 1 local

# 将Ten-GigabitEthernet1/0/25和Ten-GigabitEthernet1/0/26配置为镜像源端口,对这两个端口接收的报文进行镜像。

[DeviceA] mirroring-group 1 mirroring-port ten-gigabitethernet 1/0/25 ten-gigabitethernet 1/0/26 inbound

# 将Ten-GigabitEthernet1/0/27配置为镜像目的端口。

[DeviceA] mirroring-group 1 monitor-port ten-gigabitethernet 1/0/27

# 关闭目的端口Ten-GigabitEthernet1/0/27上的生成树协议。

[DeviceA] interface ten-gigabitethernet 1/0/27

[DeviceA-Ten-GigabitEthernet1/0/27] undo stp enable

[DeviceA-Ten-GigabitEthernet1/0/27] quit

3.5  验证配置

# 在完成上述配置后,在DeviceA上显示镜像组1的配置信息。

[DeviceA] display mirroring-group 1

Mirroring group 1:

    Type: Local

    Status: Active

    Mirroring port:

        Ten-GigabitEthernet1/0/25  Inbound

        Ten-GigabitEthernet1/0/26  Inbound

    Monitor port: Ten-GigabitEthernet1/0/27

# 以研发部某台主机10.1.1.2通过ping方式访问56.56.56.6为例,进行镜像测试,数据监测设备的抓包数据如图2所示。

图2 Wireshark的抓包数据

 

以上抓包信息表明,配置的本地镜像功能生效,数据监测设备可以成功对需要监控的流量进行监控。

3.6  配置文件

#

 mirroring-group 1 local

#

vlan 10

#

vlan 20

#

vlan 30

#

interface Vlan-interface10

 ip address 10.1.1.1 255.255.255.0

#

interface Vlan-interface20

 ip address 12.1.1.1 255.255.255.0

#

interface Vlan-interface30

 ip address 56.56.56.5 255.255.255.0

#

interface Ten-GigabitEthernet1/0/25

 port access vlan 10

 mirroring-group 1 mirroring-port inbound

#

interface Ten-GigabitEthernet1/0/26

 port access vlan 20

 mirroring-group 1 mirroring-port inbound

#

interface Ten-GigabitEthernet1/0/27

 undo stp enable

 mirroring-group 1 monitor-port

#

interface Ten-GigabitEthernet1/0/28

 port access vlan 30

#

4  二层远程端口镜像典型配置举例

4.1  组网需求

图3所示,某公司内部各部门通过二层网络连接到核心设备Device A,各部门使用不同网段的IP地址,其中研发部使用10.1.1.0/24网段,市场部使用12.1.1.0/24网段。现要求通过配置二层远程端口镜像功能,使用数据监测设备对研发部发送的报文进行监控。

图3 二层远程端口镜像组网图

 

4.2  配置思路

·     为确保源设备与目的设备之间的镜像报文可以二层转发,中间设备连接到源设备和目的设备方向的端口上需允许远程镜像VLAN通过。

·     建议用户先配目的设备,再配中间设备,最后配源设备,以保证镜像流量的正常转发。

4.3  使用版本

本举例是在S7500XG-CMW710-R7724版本上进行配置和验证的。

4.4  配置注意事项

配置远程端口镜像的目的设备和源设备时均需要注意:

·     配置远程镜像VLAN时:

¡     要求该VLAN为静态VLAN并预先创建。

¡     要求该VLAN不用做其他用途,仅用于远程镜像功能。

¡     要求该VLAN只能被一个远程源镜像组使用。

·     源设备和目的设备上的远程镜像组必须使用相同的远程镜像VLAN。

配置远程端口镜像的目的设备时需要注意:

·     目的端口不能是现有镜像组的成员端口。

·     目的端口不用做其他用途,仅用于端口镜像。

配置远程端口镜像的源设备时需要注意:

·     请不要将源端口加入到远程镜像VLAN中,否则会影响镜像功能的正常使用。

·     请不要在出端口上配置下列功能:生成树协议、802.1X、IGMP Snooping、静态ARP和MAC地址学习,否则会影响镜像功能的正常使用。

·     出端口不能是现有镜像组的成员端口。

·     一个镜像组内只能配置一个出端口。

4.5  配置步骤

1. Device A的配置(目的设备)

# 创建业务VLAN 2和VLAN 3。

<DeviceA> system-view

[DeviceA] vlan 2 to 3

# 创建VLAN 2接口和VLAN 3接口并配置IP地址作为相应VLAN的网关。

[DeviceA] interface vlan-interface 2

[DeviceA-Vlan-interface2] ip address 10.1.1.1 24

[DeviceA-Vlan-interface2] quit

[DeviceA] interface vlan-interface 3

[DeviceA-Vlan-interface3] ip address 12.1.1.1 24

[DeviceA-Vlan-interface3] quit

# 配置端口Ten-GigabitEthernet 1/0/25的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。

<DeviceA> system-view

[DeviceA] interface ten-gigabitethernet 1/0/25

[DeviceA-Ten-GigabitEthernet1/0/25] port link-type trunk

[DeviceA-Ten-GigabitEthernet1/0/25] port trunk permit vlan 2 3 5

[DeviceA-Ten-GigabitEthernet1/0/25] quit

# 配置端口Ten-GigabitEthernet1/0/26的端口类型为Trunk端口,允许业务VLAN 2和镜像VLAN 5的报文通过。

[DeviceA] interface ten-gigabitethernet 1/0/26

[DeviceA-Ten-GigabitEthernet1/0/26] port link-type trunk

[DeviceA-Ten-GigabitEthernet1/0/26] port trunk permit vlan 2 5

[DeviceA-Ten-GigabitEthernet1/0/26] quit

# 创建远程目的镜像组1。

[DeviceA] mirroring-group 1 remote-destination

# 创建VLAN 5作为远程镜像VLAN。

[DeviceA] vlan 5

[DeviceA-vlan5] quit

# 为远程目的镜像组1配置远程镜像VLAN为VLAN 5,及配置连接数据监测设备的端口Ten-GigabitEthernet 1/0/27为目的端口。

[DeviceA] mirroring-group 1 remote-probe vlan 5

[DeviceA] mirroring-group 1 monitor-port ten-gigabitethernet 1/0/27

# 将镜像目的端口加入远程镜像VLAN。将镜像数据发送给监测设备时,不需要携带远程镜像VLAN的VLAN Tag,因此将该端口配置为Access端口。

[DeviceA] interface ten-gigabitethernet 1/0/27

[DeviceA-Ten-GigabitEthernet1/0/27] port access vlan 5

# 关闭目的端口Ten-GigabitEthernet1/0/27上的生成树协议。

[DeviceA-Ten-GigabitEthernet1/0/27] undo stp enable

[DeviceA-Ten-GigabitEthernet1/0/27] quit

2. Device B的配置(中间设备)

# 创建业务VLAN 2和VLAN 3。

<DeviceB> system-view

[DeviceB] vlan 2 to 3

# 创建VLAN 5作为远程镜像VLAN。

[DeviceB] vlan 5

[DeviceB-vlan5] quit

# 配置端口Ten-GigabitEthernet 1/0/25的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。

[DeviceB] interface ten-gigabitethernet 1/0/25

[DeviceB-Ten-GigabitEthernet1/0/25] port link-type trunk

[DeviceB-Ten-GigabitEthernet1/0/25] port trunk permit vlan 2 3 5

[DeviceB-Ten-GigabitEthernet1/0/25] quit

# 配置端口Ten-GigabitEthernet 1/0/26的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。

[DeviceB] interface ten-gigabitethernet 1/0/26

[DeviceB-Ten-GigabitEthernet1/0/26] port link-type trunk

[DeviceB-Ten-GigabitEthernet1/0/26] port trunk permit vlan 2 3 5

[DeviceB-Ten-GigabitEthernet1/0/26] quit

3. Device C的配置(源设备)

# 创建业务VLAN 2和VLAN 3。

<DeviceC> system-view

[DeviceC] vlan 2 to 3

# 将端口Ten-GigabitEthernet 1/0/25加入VLAN 2。

[DeviceC] interface ten-gigabitethernet 1/0/25

[DeviceC-Ten-GigabitEthernet1/0/25] port access vlan 2

[DeviceC-Ten-GigabitEthernet1/0/25] quit

# 将端口Ten-GigabitEthernet 1/0/26加入VLAN 3。

[DeviceC] interface ten-gigabitethernet 1/0/26

[DeviceC-Ten-GigabitEthernet1/0/26] port access vlan 3

[DeviceC-Ten-GigabitEthernet1/0/26] quit

# 创建远程源镜像组1。

[DeviceC] mirroring-group 1 remote-source

# 创建VLAN 5作为远程镜像VLAN。

[DeviceC] vlan 5

[DeviceC-vlan5] quit

# 配置远程源镜像组1的远程镜像VLAN为VLAN 5,源端口为Ten-GigabitEthernet1/0/25,出端口为Ten-GigabitEthernet1/0/27。

[DeviceC] mirroring-group 1 remote-probe vlan 5

[DeviceC] mirroring-group 1 mirroring-port ten-gigabitethernet 1/0/25 inbound

[DeviceC] mirroring-group 1 monitor-egress ten-gigabitethernet 1/0/27

# 配置端口Ten-GigabitEthernet 1/0/27的端口类型为Trunk端口,允许业务VLAN 2、VLAN 3和镜像VLAN 5的报文通过。

[DeviceC] interface ten-gigabitethernet 1/0/27

[DeviceC-Ten-GigabitEthernet1/0/27] port link-type trunk

[DeviceC-Ten-GigabitEthernet1/0/27] port trunk permit vlan 2 3 5

[DeviceC-Ten-GigabitEthernet1/0/27] quit

# 关闭出端口Ten-GigabitEthernet1/0/27上的生成树协议、MAC地址学习功能。

[DeviceC-Ten-GigabitEthernet1/0/27] undo stp enable

[DeviceC-Ten-GigabitEthernet1/0/27] undo mac-address mac-learning enable

[DeviceC-Ten-GigabitEthernet1/0/27] quit

4. Device D的配置(源设备)

# 创建业务VLAN 2。

<DeviceD> system-view

[DeviceD] vlan 2

[DeviceD-vlan2] quit

# 将端口Ten-GigabitEthernet 1/0/25加入VLAN 2。

[DeviceD] interface ten-gigabitethernet 1/0/25

[DeviceD-Ten-GigabitEthernet1/0/25] port access vlan 2

[DeviceD-Ten-GigabitEthernet1/0/25] quit

# 创建远程源镜像组1。

[DeviceD] mirroring-group 1 remote-source

# 创建VLAN 5作为远程镜像VLAN。

[DeviceD] vlan 5

[DeviceD-vlan5] quit

# 配置远程源镜像组1的远程镜像VLAN为VLAN 5,对源端口Ten-GigabitEthernet1/0/25入方向进行镜像,出端口为Ten-GigabitEthernet1/0/26。

[DeviceD] mirroring-group 1 remote-probe vlan 5

[DeviceD] mirroring-group 1 mirroring-port ten-gigabitethernet 1/0/25 inbound

[DeviceD] mirroring-group 1 monitor-egress ten-gigabitethernet 1/0/26

# 配置端口Ten-GigabitEthernet 1/0/26的端口类型为Trunk端口,允许业务VLAN 2和镜像VLAN 5的报文通过。

[DeviceD] interface ten-gigabitethernet 1/0/26

[DeviceD-Ten-GigabitEthernet1/0/26] port link-type trunk

[DeviceD-Ten-GigabitEthernet1/0/26] port trunk permit vlan 2 5

# 关闭出端口Ten-GigabitEthernet1/0/26上的生成树协议、MAC地址学习功能。

[DeviceD-Ten-GigabitEthernet1/0/26] undo stp enable

[DeviceD-Ten-GigabitEthernet1/0/26] undo mac-address mac-learning enable

[DeviceD-Ten-GigabitEthernet1/0/26] quit

4.6  验证配置

# 在完成上述配置后,在DeviceC上显示镜像组1的配置信息。

[DeviceC] display mirroring-group 1

Mirroring group 1:

    Type: Remote source

    Status: Active

    Mirroring port:

        Ten-GigabitEthernet1/0/25  Inbound

    Monitor egress port: Ten-GigabitEthernet1/0/27

        Remote probe VLAN: 5

# 在DeviceA上显示镜像组1的配置信息。

[DeviceA] display mirroring-group 1

Mirroring group 1:

    Type: Remote destination

    Status: Active

    Monitor port: Ten-GigabitEthernet1/0/27

    Remote probe VLAN: 5

# 以研发部某台主机10.1.1.2通过ping方式访问市场部某台主机12.1.1.2为例,进行镜像测试,数据监测设备的抓包数据如图4所示。

图4 Wireshark的抓包数据

 

以上抓包信息表明,配置的二层远程端口镜像功能生效,数据监测设备可以成功对对研发部发送的报文进行监控。

4.7  配置文件

·     设备Device A:

#

 mirroring-group 1 remote-destination

 mirroring-group 1 remote-probe vlan 5

#

vlan 2 to 3

#

vlan 5

#

interface Vlan-interface2

 ip address 10.1.1.1 255.255.255.0

#

interface Vlan-interface3

 ip address 12.1.1.1 255.255.255.0

#

interface Ten-GigabitEthernet1/0/25

 port link-type trunk

 port trunk permit vlan 1 to 3 5

#

interface Ten-GigabitEthernet1/0/26

 port link-type trunk

 port trunk permit vlan 1 to 2 5

#

interface Ten-GigabitEthernet1/0/27

 port access vlan 5

 undo stp enable

 mirroring-group 1 monitor-port

#

·     设备Device B:

#

vlan 2 to 3

#

vlan 5

#

interface Ten-GigabitEthernet1/0/25

 port link-type trunk

 port trunk permit vlan 1 to 3 5

#

interface Ten-GigabitEthernet1/0/26

 port link-type trunk

 port trunk permit vlan 1 to 3 5

#

·     设备Device C:

#

 mirroring-group 1 remote-source

 mirroring-group 1 remote-probe vlan 5

#

vlan 2 to 3

#

vlan 5

#

interface Ten-GigabitEthernet1/0/25

 port access vlan 2

 mirroring-group 1 mirroring-port inbound

#

interface Ten-GigabitEthernet1/0/26

 port access vlan 3

#

interface Ten-GigabitEthernet1/0/27

 port link-type trunk

 port trunk permit vlan 1 to 3 5

 mirroring-group 1 monitor-egress

·     设备Device D:

#

 mirroring-group 1 remote-source

 mirroring-group 1 remote-probe vlan 5

#

vlan 2

#

vlan 5

#

interface Ten-GigabitEthernet1/0/25

 port access vlan 2

 mirroring-group 1 mirroring-port inbound

#

interface Ten-GigabitEthernet1/0/26

 port link-type trunk

 port trunk permit vlan 1 to 2 5

 mirroring-group 1 monitor-egress

5  本地流镜像典型配置举例

5.1  组网需求

图5所示,某公司内部各部门使用不同网段的IP地址,其中研发部使用10.1.1.0/24网段,市场部使用12.1.1.0/24网段,公共服务器群使用14.1.1.0/24网段。现要求通过配置本地流镜像功能,使用数据监测设备对以下两种数据进行监控:

·     研发部主机访问Internet时发送的HTTP流量

·     在工作日的非工作时间段(工作时间段为8:30至18:00),市场部从公共服务器群接收到的报文

图5 本地流镜像组网示意图

 

5.2  配置思路

配置本地流镜像功能时,首先需要根据报文特点制定需要镜像报文的分类规则,然后,在设备上对以上分类的报文采用镜像到指定端口(连接数据监测设备的端口)的动作,即可以实现组网需求。

5.3  使用版本

本举例是在S7500XG-CMW710-R7724版本上进行配置和验证的。

5.4  配置步骤

(1)     配置Device A的接口IP地址。

# 创建VLAN10,并向VLAN 10中添加端口Ten-GigabitEthernet1/0/25。

<DeviceA> system-view

[DeviceA] vlan 10

[DeviceA-vlan10] port ten-gigabitethernet 1/0/25

[DeviceA-vlan10] quit

# 创建VLAN20,并向VLAN 20中添加端口Ten-GigabitEthernet1/0/27。

[DeviceA] vlan 20

[DeviceA-vlan20] port ten-gigabitethernet 1/0/27

[DeviceA-vlan20] quit

# 配置接口Vlan-interface10的IP地址为35.35.35.5。

[DeviceA] interface vlan-interface 10

[DeviceA-Vlan-interface10] ip address 35.35.35.5 24

[DeviceA-Vlan-interface10] quit

# 配置接口Vlan-interface20的IP地址为56.56.56.5。

[DeviceA] interface vlan-interface 20

[DeviceA-Vlan-interface20] ip address 56.56.56.5 24

[DeviceA-Vlan-interface20] quit

# 请参考以上方法配置图5中其他接口的IP地址,配置步骤这里省略。

(2)     定义对研发部上网流量进行镜像的QoS策略

# 创建ACL 3000,匹配研发部的上网流量。

[DeviceA] acl number 3000

[DeviceA-acl-adv-3000] rule permit tcp destination-port eq 80 source 10.1.1.0 0.0.0.255

[DeviceA-acl-adv-3000] quit

# 创建流分类classifier_research,匹配ACL 3000。

[DeviceA] traffic classifier classifier_research

[DeviceA-classifier-classifier_research] if-match acl 3000

[DeviceA-classifier-classifier_research] quit

# 定义流行为behavior_research,动作为镜像至端口Ten-GigabitEthernet 1/0/26。

[DeviceA] traffic behavior behavior_research

[DeviceA-behavior-behavior_research] mirror-to interface ten-gigabitethernet 1/0/26

[DeviceA-behavior-behavior_research] quit

# 定义策略policy_research,为类classifier_research指定流行为behavior_research。

[DeviceA] qos policy policy_research

[DeviceA-qospolicy-policy_research] classifier classifier_research behavior behavior_research

[DeviceA-qospolicy-policy_research] quit

(3)     定义对市场部主机从公共服务器获取的数据进行镜像的QoS策略

# 定义两个非工作时间段,分别为工作日的0:00至8:30和18:00至24:00,并分别命名为“off-work1”和“off-work2”。

[DeviceA] time-range off-work1 0:00 to 8:30 working-day

[DeviceA] time-range off-work2 18:00 to 24:00 working-day

# 创建ACL 3001,通过两条规则来匹配公共服务器在非工作时间段发往市场部主机的数据。

[DeviceA] acl number 3001

[DeviceA-acl-adv-3001] rule permit ip destination 12.1.1.0 0.0.0.255 source 14.1.1.0 0.0.0.255 time-range off-work1

[DeviceA-acl-adv-3001] rule permit ip destination 12.1.1.0 0.0.0.255 source 14.1.1.0 0.0.0.255 time-range off-work2

[DeviceA-acl-adv-3001] quit

# 创建流分类classifier_market,匹配ACL 3001。

[DeviceA] traffic classifier classifier_market

[DeviceA-classifier-classifier_market] if-match acl 3001

[DeviceA-classifier-classifier_market] quit

# 定义流行为behavior_market,动作为镜像至端口Ten-GigabitEthernet 1/0/26。

[DeviceA] traffic behavior behavior_market

[DeviceA-behavior-behavior_market] mirror-to interface ten-gigabitethernet 1/0/26

[DeviceA-behavior-behavior_market] quit

# 定义策略policy_market,为类classifier_market指定流行为behavior_market。

[DeviceA] qos policy policy_market

[DeviceA-qospolicy-policy_market] classifier classifier_market behavior behavior_market

[DeviceA-qospolicy-policy_market] quit

(4)     应用QoS策略

# 将policy_research策略应用到Ten-GigabitEthernet1/0/25端口的入方向。

[DeviceA] interface ten-gigabitethernet 1/0/25

[DeviceA-Ten-GigabitEthernet1/0/25] qos apply policy policy_research inbound

[DeviceA-Ten-GigabitEthernet1/0/25] quit

# 将policy_market策略应用到Ten-GigabitEthernet1/0/27端口的入方向。

[DeviceA] interface ten-gigabitethernet 1/0/27

[DeviceA-Ten-GigabitEthernet1/0/27] qos apply policy policy_market inbound

[DeviceA-Ten-GigabitEthernet1/0/27] quit

5.5  验证配置

# 在完成上述配置后,在DeviceA上验证流镜像的配置信息。

[DeviceA] display qos policy interface

  Interface: Ten-GigabitEthernet1/0/25

  Direction: Inbound

  Policy: policy_research

   Classifier: classifier_research

     Operator: AND

     Rule(s) :

      If-match acl 3000

     Behavior: behavior_research

      Mirroring:

        Mirror to the interface: Ten-GigabitEthernet1/0/26

 

  Interface: Ten-GigabitEthernet1/0/27

  Direction: Inbound

  Policy: policy_market

   Classifier: classifier_market

     Operator: AND

     Rule(s) :

      If-match acl 3001

     Behavior: behavior_market

      Mirroring:

        Mirror to the interface: Ten-GigabitEthernet1/0/26

# 以研发部某台主机10.1.1.2 通过Telnet方式访问46.46.46.4的80端口为例,进行镜像测试,数据监测设备的抓包数据如图6所示。

图6 HTTP流量的Wireshark抓包数据

 

以上抓包信息表明,数据监测设备可以成功对研发部主机访问Internet时发送的HTTP流量进行监控。

# 以市场部某台主机12.1.1.2在非工作时段通过ping方式访问服务器14.1.1.2为例,进行镜像测试,数据监测设备的抓包数据如图7所示。

图7 对服务器的Wireshark抓包数据

 

以上抓包信息表明,在工作日的非工作时间段(工作时间段为8:30至18:00),数据监测设备可以成功对市场部从公共服务器群接收到的报文进行监控。

5.6  配置文件

#

vlan 10

#

vlan 20

#

 time-range off-work1 00:00 to 08:30 working-day

 time-range off-work2 18:00 to 24:00 working-day

#

acl number 3000

 rule 0 permit tcp source 10.1.1.0 0.0.0.255 destination-port eq www

#

acl number 3001

 rule 0 permit ip source 14.1.1.0 0.0.0.255 destination 12.1.1.0 0.0.0.255 time-range off-work1

 rule 5 permit ip source 14.1.1.0 0.0.0.255 destination 12.1.1.0 0.0.0.255 time-range off-work2

#

traffic classifier classifier_research operator and

 if-match acl 3000

#

traffic classifier classifier_market operator and

 if-match acl 3001

#

traffic behavior behavior_research

 mirror-to interface Ten-GigabitEthernet1/0/26

#

traffic behavior behavior_market

 mirror-to interface Ten-GigabitEthernet1/0/26

#

qos policy policy_research

 classifier classifier_research behavior behavior_research

#

qos policy policy_market

 classifier classifier_market behavior behavior_market

#

interface Vlan-interface10

 ip address 35.35.35.5 255.255.255.0

#

interface Vlan-interface20

 ip address 56.56.56.5 255.255.255.0

#

interface Ten-GigabitEthernet1/0/25

 port access vlan 10

 qos apply policy policy_research inbound

#

interface Ten-GigabitEthernet1/0/27

 port access vlan 20

 qos apply policy policy_market inbound

#

6  相关资料

·     H3C S7500X-G系列交换机 网络管理和监控配置指导-R7724

·     H3C S7500X-G系列交换机 网络管理和监控命令参考-R7724

不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!

新华三官网
联系我们