Myluzh Blog

Strive to become a dream architect.

主流交换机端口镜像配置

发布时间: 2022-12-1 文章作者: myluzh 分类名称: NETWORK


华为
# 配置GigabitEthernet0/0/1为镜像接口,GigabitEthernet0/0/2为观察接口,观察接
口索引号为1。镜像GigabitEthernet0/0/1上的双向业务流量到GigabitEthernet0/0/2
上。
<Quidway> system-view
[Quidway] observe-port 1 interface gigabitethernet 0/0/2
[Quidway] interface gigabitethernet 0/0/1
[Quidway-GigabitEthernet0/0/1] port-mirroring to observe-port 1 both
1. 执行命令system-view,进入系统视图。
2. 执行命令observe-port index interface interface-type interface-number ,配置观
察接口。
3. 执行命令interface interface-type interface-number,进入镜像接口的接口视图。
4. 执行命令port-mirroring to observe-port index { both | inbound | outbound } ,配
置接口镜像。

华三
# 配置GigabitEthernet0/0/1为镜像接口,GigabitEthernet0/0/2为观察接口,观察接
口索引号为1。镜像GigabitEthernet0/0/1上的双向业务流量到GigabitEthernet0/0/2
上。
<sysname>system-view
[sysname] mirroring-group 1 local
[sysname] mirroring-group 1 mirroring-port G0/0/1 both
[sysname] mirroring-group 1 monitor-port G0/0/2
1. 执行命令system-view,进入系统视图。
2. 执行命令mirroring-group number local ,建立一个镜像组。
3. 执行命令mirroring-group 1 mirroring-port G0/0/1 { both | inbound | outbound },
将端口加入到镜像组中,镜像可以根据实际情况灵活选择入方向、出方向及全部
流量;both,全部流量;inbound,入方向流量;outbound,出方向流量
4. 执行命令mirroring-group 1 monitor-port G0/0/2 ,设置镜像的目的端口

锐捷
# 配置fa0/1为镜像接口,fa0/2为观察接口,观察接口索引号为1。镜像fa0/1上的双
向业务流量到fa0/2上。
Switch# configure terminal
Switch(config)#monitor session 1 source interface fa0/1 both
Switch(config)#monitor session 1 destination interface fa 0/2
5. 执行命令configure terminal,进入全局配置模式。
6. 执行命令monitor session 1 source interface fa0/1 { both | inbound | outbound } ,
建立观察接口索引号为1,并将fa0/1加入该索引,镜像可以根据实际情况灵活选
择入方向、出方向及全部流量;both,全部流量;inbound,入方向流量;outbound,
出方向流量。
7. 执行命令monitor session 1 destination interface fa 0/2 设置fa0/2为监控口。

思科
# 配置fa0/1为镜像接口,fa0/2为观察接口,观察接口索引号为1。镜像fa0/1上的双
向业务流量到fa0/2上。
Switch# configure terminal
Switch(config)# monitor session 1 source interface fastethernet 0/1 both
Switch(config)# monitor session 1 destination interface fastethernet 0/2
8. 执行命令configure terminal,进入全局配置模式。
9. 执行命令monitor session 1 source interface fa0/1 { both | inbound | outbound } ,
建立观察接口索引号为1,并将fa0/1加入该索引,镜像可以根据实际情况灵活选
择入方向、出方向及全部流量;both,全部流量;inbound,入方向流量;outbound,
执行命令monitor session 1 destination interface fa 0/2 设置fa0/2为监控口

标签: 华为交换机 端口镜像 镜像口

发表评论