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

网络 路由交换
交换机端口镜像就是把交换机一个或多个端口(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命令实例:

 

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

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

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

 

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

 

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

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

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

 

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

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

责任编辑:佚名 来源: 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

交换机配置常见命令

2010-01-08 16:36:10

华为交换机端口监听

2011-03-09 14:00:21

trunkVLAN

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-09-16 10:41:52

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

2011-12-30 13:16:31

2011-08-16 10:21:48

交换机端口安全

2010-01-04 16:52:51

点赞
收藏

51CTO技术栈公众号