常见的几种交换机端口镜像配置详解

网络 路由交换
交换机端口镜像就是把交换机一个或多个端口(VLAN)的数据镜像到一个或多个端口的方法。所以本文就来为你介绍几种常见的交换机类型的配置实例。

端口镜像配置之DELL

交换机管理界面左边的树形菜单中,选中“Switch”(交换机)>>>“Ports”(端口)>>>“PortMirroring”(端口镜像),右边将打开“PortMirroring”(端口镜像)页面。该页面中的参数解释如下:

Add(添加):添加端口镜像操作

DestinationPort(目的地端口):定义端口通信要镜像到的端口号;

SourcePort(源端口):定义被镜像端口的端口号。最多可以将8个被镜像端口镜像到一个镜像端口;

Type(类型):指定要镜像的端口通信类型。可能的字段值包括:“RX”-表示镜像进入网络的数据;“TX”-表示镜像流出网络的数据;Both()-表示镜像所有数据。

Status(状态):表示端口的状态。可能的字段值包括:“Active”-表示端口被启用;“NotActive”-表示端口被禁用。

Remove(删除):删除端口镜像会话。可能的字段值包括:“已选取”-删除端口镜像会话;“未选取”-保留端口镜像会话。

具体端口镜像配置:

1.在PortMirroring对话框中的DestinationPort中选中目的端口(端口镜像),再单击Add按钮;

2.在系统将打开“AddSourcePort”(添加源端口)页面中,定义“SourcePort”(源端口)和“Type”(类型)字段,并单击“ApplyChanges”(应用更改),使系统接收更改。

(注:如果需要从端口镜像会话删除副本端口,请打开“PortMirroring”(端口镜像)页面,选取“Remove”(删除)复选框,再单击“ApplyChanges”(应用更改)。系统将删除端口镜像会话,并更新设备。)

以下是CLI命令实例:

 

Console(config)#interfaceethernet1/e1  
 
Console(config-if)#portmonitor1/e8  
 
Console#showportsmonitor  
 
SourceportDestinationPortTypeStatus  
 
---------------------------------------  
 
1/e11/e8RX,TXActive 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.

下面我们来看看具体的几种类型的交换机是如何进行端口镜像配置的:

Juniper交换机的端口镜像配置方法

JuniperM系列和T系列交换机端口镜像配置方法

usen@router#showforwarding-optionsport-mirroring{input{familyinet;rate;run-length;}outputinterface{next-hop;}no-filter-check;}}

选择将抽样的流量发送到哪个目的端口

user@router#showfirewallfiltermirror-samplefrom{...}then{sample;accept;}

定义抽样过滤器,选择感兴趣的流量

user@router#showinterfaceunit0familyinetfilter{inputmirror-sample;}

选择将抽样的过滤器应用到某个端口

Nortel8000交换机的端口镜像配置方法

Software3.2.0.0以前的版本,支持一组端口镜像,10个source,一个destination

Software3.2.0.0后的版本,支持2组镜像,(说明:通常8个ethernet口为一个电路集成板,destination不可以在同一个板子上,即1-8口上只允许有一个destination),支持25个source。

用户名/密码:rwa/rwa超级用户

例如:2/62/62/8镜像到2/1

 

configdiagmirror-by-port1createin-port2/4out-port2/1(1是id号,范围1-10)  
 
configdiagmirror-by-port1enableture  
 
configdiagmirror-by-port2createin-port2/6out-port2/1  
 
configdiagmirror-by-port2enableture  
 
configdiagmirror-by-port3createin-port2/8out-port2/1  
 
configdiagmirror-by-port3enableture  
 
configdiagmirror-by-port1modeboth|tx|rx  
 
saveconfig  
 
diagmirror-by-portidinfo(查看第id号镜像信息) 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.

 

Nortel交换机提供的镜像功能通常是rx的,不支持both方式(看cpu而定),所以ping包检测不到,只能检测到ping回答。?

Baystack450交换机的端口镜像配置方法

Veryeasy,只要安装菜单按部就班。只支持2个source和1个destination。交换机软件版本3以上。

 

Ssr8000  
 
SSRCommandLineInterfaceReferenceManual551  
 
portmirroring  
 
Command  
 
Purpose  
 
ApplyportmirroringtooneormoretargetportsonanSSRortotrafficspecifiedbyan  
 
ACLprofile.  
 
Format  
 
portmirroringmonitor-porttarget-port|target-profilename> 
 
Mode  
 
Configure  
 
Description  
 
Theportmirroringcommandallowsyoutomonitorviaasingleporttheactivityofone  
 
ormoreportsonanSSRorthetrafficthatisspecifiedbyanACL.  
 
Parameters  
 
monitor-port  
 
Theportyouwillusetomonitoractivity.  
 
target-port  
 
Theport(s)forwhichyouwanttomonitoractivity.Youcanspecifyasingleportora  
 
comma-separatedlistofports.  
 
target-profile  
 
ThenameoftheACLthatspecifiestheprofileofthetrafficthatyouwantto  
 
monitor.TheACLmustbeapreviouslycreatedIPACL.TheACLmaycontain  
 
eitherpermitordenykeywords.Theportmirroringcommandonlylooksatthe  
 
followingACLruleparametervalues:protocol,sourceIPaddress,destinationIP  
 
address,sourceport,destinationport,andTOS. 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.

端口镜像是一个经典的交换机配置过程,以上列出了几种常见的交换机品牌及型号的端口镜像配置实例,当然还有最常见的华为和思科交换机配置您可以阅读以下推荐文章了解。

责任编辑:佚名 来源: 51CTO整理
相关推荐

2011-09-13 11:14:12

端口镜像配置交换机华为交换机

2011-09-16 11:24:10

交换机端口镜像配置端口镜像

2010-01-07 14:48:28

交换机端口镜像配置

2010-01-04 14:40:39

交换机端口镜像配置

2010-01-18 09:59:46

交换机端口镜像配置

2011-08-16 09:27:50

端口镜像交换机

2010-01-05 14:58:00

交换机配置常见命令

2011-03-09 14:00:21

trunkVLAN

2010-01-08 16:36:10

华为交换机端口监听

2012-08-21 09:00:44

vSphere交换机

2010-01-18 15:02:10

交换机软故障

2010-01-08 16:01:16

华为交换机端口

2010-01-06 16:05:10

交换机端口设置

2018-10-26 13:57:32

交换机故障排障

2010-03-18 17:01:52

Cisco交换机

2011-03-08 10:17:14

VLAN

2011-12-30 13:16:31

2011-08-16 10:21:48

交换机端口安全

2010-01-04 16:52:51

2010-02-03 17:11:11

思科交换机
点赞
收藏

51CTO技术栈公众号