華為S5300交換機配置基於接口的本地端口鏡像


配置思路

1、  將Ethernet0/0/20接口配置為觀察端口(監控端口)

2、  將Ethernet0/0/1----Ethernet0/0/10接口配置為鏡像端口

 

配置步驟

1、  配置觀察端口

<Switch> system-view

[Switch] observe-port 1 interface  GigabitEthernet 0/0/20

命令格式:

observe-port index interface  interface-type interface-number [ vlan vlan-id ]

參數說明:

參數

參數說明

取值

index

指定觀察接口的索引。

S5300EI系列產品取值范圍為1~4。

S5300SI系列產品取值為1。

interface-type interface-number

指定S5300設備上的接口類型和接口編號,

接口類型為GigabitEthernet和XGigabitEthernet。

-

vlan vlan-id

用來指定遠程鏡像VLAN。

IP方式時,配置的vlan-id用來為GRE隧道的二層頭添加Tag。

整數形式,取值范圍為1~4094。

配置觀察端口時,如果不指定vlan,則觀察端口的類型為本地鏡像;如果指定vlan,則觀察端口的類型為遠端鏡像。

 

 

2、  配置鏡像端口

#將Ethernet0/0/1----Ethernet0/0/10接口配置為鏡像端口

[Switch] interface  GigabitEthernet 0/0/1

[Switch-Ethernet0/0/1] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/2

[Switch-Ethernet0/0/2] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/3

[Switch-Ethernet0/0/3] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/4

[Switch-Ethernet0/0/4] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/5

[Switch-Ethernet0/0/5] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/6

[Switch-Ethernet0/0/6] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/7

[Switch-Ethernet0/0/7] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/8

[Switch-Ethernet0/0/8] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/9

[Switch-Ethernet0/0/9] port-mirroring to observe-port 1 both

[Switch] interface  GigabitEthernet 0/0/10

[Switch-Ethernet0/0/10] port-mirroring to observe-port 1 both

 

命令格式:

port-mirroring to observe-port index { both | inbound | outbound }

參數說明:

參數

參數說明

取值

index

表示全局觀察接口的索引。

S5300EI系列產品取值范圍為1~4。

S5300SI系列產品取值為1。

both

支持出/入雙方向的接口鏡像。

-

 

3、  檢查配置結果

查看觀察端口的使用情況

display observe-port

查看接口鏡像信息列表

display port-mirroring

 

再查看Switch的配置文件

[Switch] dis curr


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM