H3C交换机流量镜像

今天需要对交换机进行本地流量镜像,在此记录:

交换机:H3C S5120

 

配置本地端口镜像时,用户首先要创建一个本地镜像组,然后为本地镜像组配置源端口和目的端口。

表1-1 配置本地端口镜像

操作

命令

说明

进入系统视图

system-view

-

创建本地镜像组

mirroring-group group-id local

必选

为镜像组配置源端口

在系统视图下配置源端口

mirroring-group group-id mirroring-port mirroring-port-list { both inbound |outbound }

必选

用户可以在系统视图下同时配置多个源端口,也可以在具体的端口视图下配置源端口,两种视图下的配置效果相同

在端口视图下配置源端口

interface interface-type interface-number

[ mirroring-group group-id ] mirroring-port { both | inbound | outbound }

quit

为镜像组配置目的端口

在系统视图下配置目的端口

mirroring-group group-id monitor-portmonitor-port-id

二者必选其一

两种视图下的配置效果相同

在端口视图下配置目的端口

interface interface-type interface-number

[ mirroring-group group-id ] monitor-port

 

l    本地镜像组需要配置源端口、目的端口才能生效。

l    一个镜像组中可以配置多个源端口,但只能配置一个目的端口。

l    一个端口只能被一个镜像组使用。

l    建议用户不要在目的端口上使能STP、MSTP和RSTP,否则会影响设备的正常使用。

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

1、使用PC连接Console端口,与交换机建立连接。

2、在Win7可以下载一个超级终端Hyper Terminal

 

system-view		//进入系统视图
#display mac-address	//显示mac地址列表。如果不知道网口对应的交换器端口,通过mac地址列表可以获得
# 创建本地镜像组。
mirroring-group 1 local
# 为本地镜像组配置源端口和目的端口。
mirroring-group 1 mirroring-port gigabitethernet 1/0/22 both
mirroring-group 1 monitor-port gigabitethernet 1/0/13
# 显示所有镜像组的配置信息。
display mirroring-group all

 

如果想修改镜像的源端口或者目的端口,使用undo指令,然后重新添加。例如修改镜像源端口为1/0/21

undo mirroring-group 1 mirroring-port gigabitethernet 1/0/22 both

mirroring-group 1 mirroring-port gigabitethernet 1/0/21 both

详细介绍可以参看H3C官方文档:http://www.h3c.com.cn/Service/Document_Center/Switches/Catalog/S5120/S5120-SI/Configure/Operation_Manual/H3C_S5120-SI_CG-Release_1101-6W104/201108/723439_30005_0.htm

本文为Eliot,转载请注明出处:http://blog.csdn.net/xyw_blog/article/details/13790111

posted on 2013-10-31 21:28  you Richer  阅读(1536)  评论(0编辑  收藏  举报