各常见品牌交换机端口镜像方法集

Cisco    CATALYST交换机端口监听配置

Cisco    CATALYST交换机分为两 种,在CATALYST家族中称侦听端口为分析端 口(analysis  port)。
1、Catalyst  2900XL/3500XL/2950系列交换机端口监听配 置  (基于CLI)
以下命令配置端口监听:
port    monitor  
例 如,F0/1和F0/2、F0/3同属VLAN1,F0/1监听F0/2、F0/3端口:  
interface    FastEthernet0/1  
port    monitor    FastEthernet0/2  
port    monitor    FastEthernet0/3  
port    monitor    VLAN1

2、Catalyst  4000,5000    and    6000系列交换机端口监听配 置  (基于IOS)
以下命令配置端口监听:  
set    span  
例如,模块1中端口1和端口2同属VLAN1,端口3在VLAN2,端口4和5在VLAN2,端口2监听端 口1和3、4、5,  
set    span    1/1,1/3-5    1/2


3COM交换机端口监听配置

在3COM交换机中,端口监听被称为“Roving  Analysis”。 网络流量被监听的端口称作“监听口”(Monitor  Port),连接监听设备的端口称作“分析 口”(Analyzer  Port)。
以下命令配置端口监听:  
●  指定分析 口  
feature  rovingAnalysis  add,或缩 写  f  r  a,  
例 如:  
Select  menu  option:  feature  rovingAn alysis  add  
Select  analysis  slot:  1?& nbsp;
Select  analysis  port:  2  

●   指定监听口并启动端口监听  
feature  rovingAnalysis  start,或缩 写  f  r  sta,  
例 如:  
Select  menu  option:  feature  rovingAn alysis  start  
Select  slot  to  monitor  ?(1-12):  1  
Select  port  to  monitor&nb sp;?(1-8):  3  

●  停止端口监 听  
feature  rovingAnalysis  stop,或缩 写  f  r  sto,  


Intel交换机端口监听配置

Intel 称端口监听为“Mirror  Ports”。  网络流量被监听的端口称作“源端 口”(Source  Port),连接监听设备的端口称作“镜像 口”(Mirror  Port)。  
配置端口监听步骤如下:  
●  在 navigation菜单,点击Statistics下的Mirror  Ports,弹出Mirror  Ports信 息。  
●  在Configure  Source  列中点击端口来选择源端口, 弹出Mirror  Ports  Configuration。  
●  进行源端口设 置:  
源端口是镜像流量的来源口,镜像口是接收来自源端口流量的端 口。  
●  点击Apply确定  
可以选择三种监听的方 式:  
1.连续(Always):镜像全部流量。  
2.周期(Periodic):在一定周期内 镜像全部流量。镜像周期在Sampling  Interval  configuration中设置。  
3 .禁止(Disabled):关闭流量镜像。


Avaya交换机端口监听配置

在Avaya交换机用户手册中,端口监 听被称为“端口镜像”(Port  Mirror)。  
以下命令配置端口监听:  
{  set|clear  }  Port  Mirror
设置端口侦 听:set  port  mirror  <mod-port-range>  source-port&n bsp;?<mod-port-range>  mirror-port  <mod-port-spec>   sampling   {  always  |  disable  |  periodic  }   [  max-packets-sec  <  max-packets-sec-value>?& nbsp;]  [  piggyback-port  <mod-port-spec>  ]?&nb sp;
禁止端口监 听:clear  port  mirror  <mod-port-range>

命令 中,mod-port-range指定端口的范围;mod-port-spec指定特定的端口;piggyback-port指定双向镜像的端 口;sampling指定镜像周期;max-packets-sec仅在sampling设置为periodic时使用,指定监听口每秒最多的数据报数 量。

华为交换机端口监听配置

华为交换机用户手册中,端口监听被称为“端口镜 像”(Port  Mirroring)。  
使用Huawei  Lanswitch  View管 理系统添加一个镜像端口:  
●  选 择Device  Setup或Stack  Setup。  
●  点 击Port  Mirroring。  
●  点击Add按 钮。  
●  对于堆叠,点击Switch并从列表选择一个交换 机。  
●  点击Reflect  from并选择流量将被镜像的端 口。  
●  点击Reflect  to并选上面所选择的端口上的


 港湾
Harbour(config)#
Harbour(config)# config mirroring 1
add Add ports to mirroring group.
delete Delete ports from mirroring group.
disable Disable current mirroring group.
to Apply port mirroring group.
Harbour(config)# config mirroring 1 add port 5
Harbour(config)# config mirroring 1 to 13
Harbour(config)# show mirroring
Port Mirror Configurations:
Mirroring Group 1:
Source Port: 5
Target Port: 13
Harbour(config)# save configuration

Juniper
Juniper M 系列和 T 系列端口镜像配置方法
usen@router# show forwarding-options port-mirroring { input {family inet; rate ; run-    length ;} output interface {next-hop;} no-filter-check;} }
选择将抽样的流量发送到哪个目的端口
user@router# show firewall filter mirror-sample from {...} then {sample; accept;}
定义抽样过滤器,选择感兴趣的流量
user@router# show interface unit 0 family inet filter {input mirror-sample;}
选择将抽样的过滤器应用到某个端口
端口镜像的风险
加重交换机负载,造成设备不稳定
在某些情况下会丢包,不能保证 100% 镜像流量。例如,由于多个源端口镜像到一个目的端口,目的端口无法处理造成丢包

Nortel 8000
Software 3.2.0.0以前的版本,支持一组镜像,10个source,一个destination
Software 3.2.0.0后的版本,支持2组镜像,(说明:通常8个ethernet口为一个电路集成板,destination不可以在同一个板子上,即1-8口上只允许有一个destination),支持25个source(10个有效―――不懂,没有玩过这么高的版本)。
用户名/密码:rwa/rwa 超级用户
例如:2/6 2/6 2/8 镜像到2/1
config diag mirror-by-port 1 create in-port 2/4 out-port 2/1 (1是id号,范围1-10)
config diag mirror-by-port 1 enable ture
config diag mirror-by-port 2 create in-port 2/6 out-port 2/1
config diag mirror-by-port 2 enable ture
config diag mirror-by-port 3 create in-port 2/8 out-port 2/1
config diag mirror-by-port 3 enable ture
config diag mirror-by-port 1 mode both|tx|rx
save config
diag mirror-by-port id info (查看第id号镜像信息)
Nortel 交换机提供的镜像功能通常是rx的,不支持both方式(看cpu而定),所以ping包检测不到,只能检测到ping回答。 ?
Bay stack 450
Very easy,只要安装菜单按部就班。只支持2个source和1个destination。交换机软件版本3以上。
Ssr8000
SSR Command Line Interface Reference Manual 551
port mirroring
Command
Purpose
Apply port mirroring to one or more target ports on an SSR or to traffic specified by an
ACL profile.
Format
port mirroring monitor-port target-port |target-profile name>
Mode
Configure
Description
The port mirroring command allows you to monitor via a single port the activity of one
or more ports on an SSR or the traffic that is specified by an ACL.
Parameters
monitor-port
The port you will use to monitor activity.
target-port
The port(s) for which you want to monitor activity. You can specify a single port or a
comma-separated list of ports.
target-profile
The name of the ACL that specifies the profile of the traffic that you want to
monitor. The ACL must be a previously created IP ACL. The ACL may contain
either permit or deny keywords. The port mirroring command only looks at the
following ACL rule parameter values: protocol, source IP address, destination IP
address, source port, destination port, and TOS.

DELL
镜像端口设置方法:
  在交换机管理界面左边的树形菜单中,选中“Switch”(交换机)>>>“Ports”(端口)>>>“Port Mirroring”(端口镜像),右边将打开“Port Mirroring”(端口镜像)页面。该页面中的参数解释如下:
  Add(添加):添加端口镜像操作
  Destination Port(目的地端口):定义端口通信要镜像到的端口号;
  Source Port(源端口):定义被镜像端口的端口号。 最多可以将8个被镜像端口镜像到一个镜像端口;
  Type(类型):指定要镜像的端口通信类型。 可能的字段值包括:“RX”-表示镜像进入网络的数据;“TX”-表示镜像流出网络的数据;Both()-表示镜像所有数据。
  Status(状态):表示端口的状态。 可能的字段值包括: “Active”-表示端口被启用;“Not Active”-表示端口被禁用。
  Remove(删除):删除端口镜像会话。 可能的字段值包括: “已选取”-删除端口镜像会话;“未选取”-保留端口镜像会话。

具体端口镜像设置:
  1、在Port Mirroring对话框中的Destination Port中选中目的端口(镜像端口),再单击Add按钮;
  2、在系统将打开“Add Source Port”(添加源端口)页面中,定义“Source Port”(源端口)和“Type”(类型)字段,并单击“Apply Changes”(应用更改), 使系统接收更改。
  (注:如果需要从端口镜像会话删除副本端口,请打开“Port Mirroring”(端口镜像)页面,选取“Remove”(删除)复选框,再单击“Apply Changes”(应用更改)。 系统将删除端口镜像会话,并更新设备。)

以下是 CLI 命令实例:
  Console(config)# interface ethernet 1/e1
  Console(config-if)# port monitor 1/e8
  Console# show ports monitor
  Source port Destination Port Type Status
  ----------- ---------------- ----- -------
  1/e1 1/e8 RX, TX Active

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值