当前位置: 首页 > article >正文

[网络][CISCO]CISCO_华为网络设备端口镜像配置

CISCO 华为网络设备端口镜像配置大全

isco交换机通常支持2组镜像,4000系列有支持6组镜象的。支持所全端口镜像。

Cisco catylist2820

有2个菜单选项

先进入menu选项,enable port monitor

进入cli模式,

en

conf term

interface fast0/x  镜像口

port monitor fast0/x 被镜像口

exit

wr

Cisco catylist2924、2948 Cisco catylist 3524、3548

Switch>En

Switch#Conf term

Switch(config)#Interface fast mod/port

Switch(config-if)#Port monitor mod/port

Switch(config-if)#Exit

Switch(config)#Wr

Cisco catylist 2950 Cisco catylist 3550

支持2组monitor session

en password

config term

Switch(config)#monitor session 1 destination interface fast0/4(1为session id,id范围为1-2)

Switch(config)#monitor session 1 source interface fast0/1 , fast0/2 , fast0/3 (空格,逗号,空格)

Switch(config)#exit

Switch#copy running-conf startup-conf

Switch#show port-monitor

Cisco catylist 4000/5000系列 Cisco catylist 6000 系列支持2组镜像

En

Show module (确认端口所在的模块)

Set span source(mod/port) destination(mod/port) in|out|both inpkts enable

Write tern all

Show span

注:多个source:mod/port,mod/port-mod/port  连续端口用横杆“-”,非连续端口用逗号“,”

set span enable 允许镜像

set span disable 禁止镜像

set span source destination in|out|both inpkts enable create (create用于建立第二组镜像)

Huawei(华为)s2403h

en           

conf  term    

monitor ethernet source_mod/port to ethernet source_mod/port obser ethernet dest_mod/port

exit

write

show monitor-port

注:不可以将非连续端口作为souce,如果镜像单个端口,则不用to,直接到obs ether。。。。。

删除镜像

en

conf t

no monitort ethernet 源 to enternet 源 obser enternet 目的

exit

show monitor-port

write

huawei 6500

S6506_A>en

Password:

S6506_A#

S6506_A#conf t

Enter configuration commands, one per line.  End with Ctrl+Z.

S6506_A(config)#

S6506_A(config)#set mirr WORD1 input GigabitEthernet1/0/3 GigabitEthernet1/0/4 mirror-port GigabitEthernet1/0/6

S6506_A(config)#exit

S6506_A#show mirror all

mirror name:        WORD1

   slot no:         1/0

   port mask:       gigabitethernet1/0/3 gigabitethernet1/0/4

   mirror direction:input

mirror port:     gigabitethernet1/0/6

Nortel 交换机

Nortel 1100、2000

支持一组镜像,2个source和1个destination

默认用户名/密码: 12/12

config

mirror

input1 (mod/port) enable

input2 (mod/port) enable

output (mod/port) enable

save configure ture

Nortel 8000 series 

Software 3.2.0.0以前的版本,支持一组镜像,10个source,一个destination

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

用户名/密码: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 <port number> target-port <port list>|target-profile <acl

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 <port number>

The port you will use to monitor activity.

target-port <port list>

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 <acl name>

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.

3COM交换机端口监听配置

在3COM交换机中,端口监听被称为“Roving Analysis”。网络流量被监听的端口称作“监听口”(Monitor Port),连接监听设备的端口称作“分析口”(Analyzer Port)。

以下命令配置端口监听: 

● 指定分析口 

feature rovingAnalysis add,或缩写 f r a, 

例如: 

Select menu option: feature rovingAnalysis add 

Select analysis slot: 1 

Select analysis port: 2 

● 指定监听口并启动端口监听 

feature rovingAnalysis start,或缩写 f r sta, 

例如: 

Select menu option: feature rovingAnalysis start 

Select slot to monitor (1-12): 1 

Select port to monitor (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 <mod-port-range> mirror-port <mod-port-spec> sampling { always | disable | periodic } [ max-packets-sec < max-packets-sec-value> ] [ piggyback-port <mod-port-spec> ] 

禁止端口监听:clear port mirror <mod-port-range>

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

港湾flax24

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  (source)

Harbour(config)# config mirroring 1 to 13    (target)

Harbour(config)# show mirroring

Port Mirror Configurations:

Mirroring Group 1:

        Source Port:   5

        Target Port:  13

Harbour(config)# save configuration

港湾6802

!Ethernet port config

interface ethernet 1/11

  mirror ingress 1/10 egress 1/10 

exit

 

Extreme alpine 3802

Alpine3804: # enable mirroring to port 2:10 

Alpine3804: # configure mirror add port 2:32

Alpine3804: # configure mirror add port 2:1

2005-6-28 13:20 newid10

华为交换机的命令全部改了,这是华为的手册,仅供参考。

『端口镜像的数据流程』

基于端口的镜像是把被镜像端口的进出数据报文完全拷贝一份到镜像端口,这样来进行流量观测或者故障定位。

【3026等交换机镜像】

S2008/S2016/S2026/S2403H/S3026等交换机支持的都是基于端口的镜像,有两种方法:

方法一

1、配置镜像(观测)端口

[SwitchA]monitor-port e0/8

2、配置被镜像端口

[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2

方法二

1、可以一次性定义镜像和被镜像端口

[SwitchA]port mirror Ethernet 0/1 to Ethernet 0/2 observing-port Ethernet 0/8

【8016交换机端口镜像配置】

1、假设8016交换机镜像端口为E1/0/15,被镜像端口为E1/0/0,设置端口1/0/15为端口镜像的观测端口。

[SwitchA] port monitor ethernet 1/0/15

2、设置端口1/0/0为被镜像端口,对其输入输出数据都进行镜像。

[SwitchA] port mirroring ethernet 1/0/0 both ethernet 1/0/15

也可以通过两个不同的端口,对输入和输出的数据分别镜像

1、设置E1/0/15和E2/0/0为镜像(观测)端口

[SwitchA] port monitor ethernet 1/0/15

2、设置端口1/0/0为被镜像端口,分别使用E1/0/15和E2/0/0对输入和输出数据进行镜像。

[SwitchA] port mirroring gigabitethernet 1/0/0 ingress ethernet 1/0/15

[SwitchA] port mirroring gigabitethernet 1/0/0 egress ethernet 2/0/0

 

『基于流镜像的数据流程』

基于流镜像的交换机针对某些流进行镜像,每个连接都有两个方向的数据流,对于交换机来说这两个数据流是要分开镜像的。

【3500/3026E/3026F/3050】

〖基于三层流的镜像〗

1、定义一条扩展访问控制列表

[SwitchA]acl num 100

2、定义一条规则报文源地址为1.1.1.1/32去往所有目的地址

[SwitchA-acl-adv-101]rule 0 permit ip source 1.1.1.1 0 destination any

3、定义一条规则报文源地址为所有源地址目的地址为1.1.1.1/32

[SwitchA-acl-adv-101]rule 1 permit ip source any destination 1.1.1.1 0

4、将符合上述ACL规则的报文镜像到E0/8端口

[SwitchA]mirrored-to ip-group 100 interface e0/8

 

〖基于二层流的镜像〗

1、定义一个ACL

[SwitchA]acl num 200 

2、定义一个规则从E0/1发送至其它所有端口的数据包

[SwitchA]rule 0 permit ingress interface Ethernet0/1 egress interface Ethernet0/2

3、定义一个规则从其它所有端口到E0/1端口的数据包

[SwitchA]rule 1 permit ingress interface Ethernet0/2 egress interface Ethernet0/1

4、将符合上述ACL的数据包镜像到E0/8

[SwitchA]mirrored-to link-group 200 interface e0/8

 

【5516/6506/6503/6506R】

目前该三款产品支持对入端口流量进行镜像

1、定义镜像端口

[SwitchA]monitor-port Ethernet 3/0/2  

2、定义被镜像端口

[SwitchA]mirroring-port Ethernet 3/0/1 inbound  

 

【补充说明】

1、镜像一般都可以实现高速率端口镜像低速率端口,例如1000M端口可以镜像100M端口,反之则无法实现

2、8016支持跨单板端口镜像

 


http://www.kler.cn/news/304471.html

相关文章:

  • Cache Aside pattern
  • EG边缘计算网关连接纵横云3.0物联网平台(MQTT协议)
  • Notepad++插件:TextFX 去除重复行
  • 快速理解Redis
  • 【系统规划与管理师】【案例分析】【考点】【问题篇】第5章 IT服务部署实施
  • MiniCPM-V: A GPT-4V Level MLLM on Your Phone
  • Ansys HFSS的边界条件与激励端口
  • 【Linux入门】iptables的安装与配置应用实例
  • pg \d 在不同模式下有同名表时注意事项
  • 828华为云征文|华为云Flexus X实例docker部署Jitsi构建属于自己的音视频会议系统
  • 软件工程毕业设计开题汇总
  • 如何在 DigitalOcean Droplet 云服务器上部署 Next.js 应用
  • 技术周刊 | Vue3.5、Replit Agent、Cursor 使用技巧、React 19 中的新功能、8 月 Web 平台的新功能
  • 9.11 QT ( Day 4)
  • oracle数据库安装和配置详细讲解
  • 个人学习笔记6-2:动手学深度学习pytorch版-李沐
  • Qt使用UDP进行单波通信
  • 实习项目|苍穹外卖|day9
  • mmseqs2进行pdb蛋白质序列聚类分析
  • 在云服务器上安装 RabbitMQ:从零到一的最佳实践
  • 机械学习—零基础学习日志(Python做数据分析03)
  • JS函数 匿名函数(ES6箭头函数)弄得懂吗?
  • linux 定时将固态硬盘数据备份至机械硬盘
  • 测试质量体系的风险评估和应对措施有哪些
  • UART 16550的使用
  • Git常用命令备忘
  • 【数据结构和算法实践-树-LeetCode110-平衡二叉树】
  • 【STM32 HAL库】IIC通信与CubeMX配置
  • InfiniBand (IB) 和 RDMA over Converged Ethernet (RoCE)
  • S32G EB tresos AutoCore下载和激活方法