首页 科技问答 H3C端口镜像问题(V7)

H3C端口镜像问题(V7)

科技问答 293
1675913166,

请教:

H3C V7的端口镜像中,

如果有镜像的源端口跟镜像的目的端口不在同一台交换机上的话,

配置的命令是怎样的呢?

如RT1.........(E0/1)SW1(E0/2)...........................(E0/3)SW2(E0/4).........PC1

E0/1是镜像的源(出与入方向)

而E0/4是镜像的目的口,

那么V7的命令是怎样的呢?谢谢。

(0)

最佳答案

             

二层远程端口镜像配置举例

1. 组网需求

·     在一个二层网络中,Device A、Device B、Device C及Server如下图所示连接。其中,Device A通过端口FortyGigE1/0/1连接市场部。

·     通过配置二层远程端口镜像,使Server可以监控所有进、出市场部的报文。

2. 组网图

图1-5 二层远程端口镜像配置组网图

 

3. 配置步骤

(1)     配置Device C

# 配置端口FortyGigE1/0/1为Trunk口,并允许VLAN 2的报文通过。

<DeviceC> system-view

[DeviceC] interface fortygige 1/0/1

[DeviceC-FortyGigE1/0/1] port link-type trunk

[DeviceC-FortyGigE1/0/1] port trunk permit VLAN 2

[DeviceC-FortyGigE1/0/1] quit

# 创建远程目的镜像组2。

[DeviceC] mirroring-group 2 remote-destination

# 创建VLAN 2作为远程镜像VLAN。

[DeviceC] vlan 2

# 关闭VLAN 2的MAC地址学习功能。

[DeviceC-vlan2] undo mac-address mac-learning enable

[DeviceC-vlan2] quit

# 配置远程目的镜像组2的远程镜像VLAN为VLAN 2,目的端口为FortyGigE1/0/2,在该端口上关闭生成树协议并将其加入VLAN 2。

[DeviceC] mirroring-group 2 remote-probe vlan 2

[DeviceC] interface fortygige 1/0/2

[DeviceC-FortyGigE1/0/2] mirroring-group 2 monitor-port

[DeviceC-FortyGigE1/0/2] undo stp enable

[DeviceC-FortyGigE1/0/2] port access vlan 2

[DeviceC-FortyGigE1/0/2] quit

(2)     配置Device B

# 创建VLAN 2作为远程镜像VLAN。

<DeviceB> system-view

[DeviceB] vlan 2

# 关闭VLAN 2的MAC地址学习功能。

[DeviceB-vlan2] undo mac-address mac-learning enable

[DeviceB-vlan2] quit

# 配置端口FortyGigE1/0/1为Trunk口,并允许VLAN 2的报文通过。

[DeviceB] interface fortygige 1/0/1

[DeviceB-FortyGigE1/0/1] port link-type trunk

[DeviceB-FortyGigE1/0/1] port trunk permit vlan 2

[DeviceB-FortyGigE1/0/1] quit

# 配置端口FortyGigE1/0/2为Trunk口,并允许VLAN 2的报文通过。

[DeviceB] interface fortygige 1/0/2

[DeviceB-FortyGigE1/0/2] port link-type trunk

[DeviceB-FortyGigE1/0/2] port trunk permit vlan 2

[DeviceB-FortyGigE1/0/2] quit

(3)     配置Device A

# 创建远程源镜像组1。

<DeviceA> system-view

[DeviceA] mirroring-group 1 remote-source

# 创建VLAN 2作为远程镜像VLAN。

[DeviceA] vlan 2

# 关闭VLAN 2的MAC地址学习功能。

[DeviceA-vlan2] undo mac-address mac-learning enable

[DeviceA-vlan2] quit

# 配置远程源镜像组1的远程镜像VLAN为VLAN 2,源端口为FortyGigE1/0/1,出端口为FortyGigE1/0/2。

[DeviceA] mirroring-group 1 remote-probe vlan 2

[DeviceA] mirroring-group 1 mirroring-port fortygige 1/0/1 both

[DeviceA] mirroring-group 1 monitor-egress fortygige 1/0/2

# 配置端口FortyGigE1/0/2为Trunk口,允许VLAN 2的报文通过,并在该端口上关闭生成树协议。

[DeviceA] interface fortygige 1/0/2

[DeviceA-FortyGigE1/0/2] port link-type trunk

[DeviceA-FortyGigE1/0/2] port trunk permit vlan 2

[DeviceA-FortyGigE1/0/2] undo stp enable

[DeviceA-FortyGigE1/0/2] quit

(0)

暂无评论

非常感谢。

(0)

暂无评论

,H3C端口镜像问题(V7)