Print

S5000PV2/S5120係列交換機遠程端口鏡像

2019-09-21 發表

組網及說明

1 配置需求或說明

1.1適用產品係列

本案例適用於如S5008PV2-EIS5024PV2-EI-PWRS5048PV2-EI-HPWRS5120-52P-LIS5120-28P-SIS5120-48P-EIS5000PV2S5120係列的交換機。

1.2配置需求及實現的效果

在一個二層網絡中,SWA通過端口GigabitEthernet1/0/1連接PCSWC通過端口GigabitEthernet1/0/2連接server。通過配置二層遠程端口鏡像,使Server可以監控所有進、出PC的報文。

2 組網圖

配置步驟

3 配置步驟

1)配置SWC

配置端口GigabitEthernet1/0/1Trunk口,並允許VLAN 2的報文通過。

system-view

[SWC] interface gigabitethernet 1/0/1

[SWC-GigabitEthernet1/0/1] port link-type trunk

[SWC-GigabitEthernet1/0/1] port trunk permit vlan 2

[SWC-GigabitEthernet1/0/1] quit

創建遠程目的鏡像組2

[SWC] mirroring-group 2 remote-destination

創建VLAN 2作為遠程鏡像VLAN

[SWC] vlan 2

關閉VLAN 2MAC地址學習功能。

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

[SWC-vlan2] quit

配置遠程目的鏡像組2的遠程鏡像VLANVLAN 2,目的端口為GigabitEthernet1/0/2

在該端口上關閉生成樹協議並將其加入VLAN 2

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

[SWC] interface gigabitethernet 1/0/2

[SWC-GigabitEthernet1/0/2] mirroring-group 2 monitor-port

[SWC-GigabitEthernet1/0/2] undo stp enable

[SWC-GigabitEthernet1/0/2] port access vlan 2

[SWC-GigabitEthernet1/0/2] quit

(2)     配置SWB

創建VLAN 2作為遠程鏡像VLAN

system-view

[SWB] vlan 2

關閉VLAN 2MAC地址學習功能。

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

[SWB-vlan2] quit

配置端口GigabitEthernet1/0/1Trunk口,並允許VLAN 2的報文通過。

[SWB] interface gigabitethernet 1/0/1

[SWB-GigabitEthernet1/0/1] port link-type trunk

[SWB-GigabitEthernet1/0/1] port trunk permit vlan 2

[SWB-GigabitEthernet1/0/1] quit

配置端口GigabitEthernet1/0/2Trunk口,並允許VLAN 2的報文通過。

[SWB] interface gigabitethernet 1/0/2

[SWB-GigabitEthernet1/0/2] port link-type trunk

[SWB-GigabitEthernet1/0/2] port trunk permit vlan 2

[SWB-GigabitEthernet1/0/2] quit

(3)     配置SWA

創建遠程源鏡像組1

system-view

[SWA] mirroring-group 1 remote-source

創建VLAN 2作為遠程鏡像VLAN

[SWA] vlan 2

關閉VLAN 2MAC地址學習功能。

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

[SWA-vlan2] quit

配置遠程源鏡像組1的遠程鏡像VLANVLAN 2,源端口為GigabitEthernet1/0/1

出端口為GigabitEthernet1/0/2

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

[SWA] mirroring-group 1 mirroring-port gigabitethernet 1/0/1 both

[SWA] mirroring-group 1 monitor-egress gigabitethernet 1/0/2

配置端口GigabitEthernet1/0/2Trunk口,允許VLAN 2的報文通過,

並在該端口上關閉生成樹協議。

[SWA] interface gigabitethernet 1/0/2

[SWA-GigabitEthernet1/0/2] port link-type trunk

[SWA-GigabitEthernet1/0/2] port trunk permit vlan 2

[SWA-GigabitEthernet1/0/2] undo stp enable

[SWA-GigabitEthernet1/0/2] quit

4 驗證配置

顯示SWC上所有鏡像組的配置信息。

[SWC] display mirroring-group all

Mirroring group 2:

    Type: Remote destination

    Status: Active

    Monitor port: GigabitEthernet1/0/2

    Remote probe VLAN: 2

顯示SWA上所有鏡像組的配置信息。

[SWA] display mirroring-group all

Mirroring group 1:

    Type: Remote source

    Status: Active

    Mirroring port:

        GigabitEthernet1/0/1  Both

    Monitor egress port: Gigabitethernet1/0/2

    Remote probe VLAN: 2

配置關鍵點