華為交換機端口鏡像配置


華為交換機端口鏡像配置
 
端口鏡像
通過配置鏡像功能,可以將報文復制到特定的目的地進行分析,以進行網絡監控和故障定位。
鏡像是指將經過指定端口(源端口或者鏡像端口)的報文復制一份到另一個指定端口(目的端口或者觀察端口)。

 

 
 
配置舉例
1、  一對一本地端口鏡像(一個監控設備監控一個端口)

 

 
 
observe-port 1 interface GigabitEthernet1/0/2   // 觀察口
#
interface GigabitEthernet1/0/1 或者GigabitEthernet1/0/10 (上聯口)  //鏡像口
 port-mirroring to observe-port 1 inbound /outbound/both
 
2、多對一端口本地端口鏡像(多個監控設備同時監控一個端口)

 

 
 
方法一:(單個配置觀察端口)
observe-port 1 interface GigabitEthernet1/0/2               // 觀察口1
observe-port 2 interface GigabitEthernet1/0/3               // 觀察口2
observe-port 3 interface GigabitEthernet1/0/4               // 觀察口3
#
interface GigabitEthernet1/0/1 或者 GigabitEthernet1/0/10 (上聯口 )     //鏡像口
port-mirroring to observe-port 1 inbound /outbound/both
 port-mirroring to observe-port 2 inbound /outbound/both
 port-mirroring to observe-port 3 inbound /outbound/both
 
方法二:(批量配置觀察端口)
observe-port 1 interface-range GigabitEthernet1/0/2 to GigabitEthernet1/0/4  // 端口2到4為觀察口
#
interface GigabitEthernet1/0/1 或者 GigabitEthernet1/0/10 (上聯口)        //鏡像口
 port-mirroring to observe-port 1 inbound/outbound /both
 
3、一對多端口鏡像配置(一個監控設備監控多個端口)

 

 
 observe-port 1 interface GigabitEthernet1/0/4               //觀察口
#
interface GigabitEthernet1/0/1                //鏡像口1
 port-mirroring to observe-port 1 inbound/outbound/both
#
interface GigabitEthernet1/0/2                //鏡像口2
 port-mirroring to observe-port 1 inbound/outbound/both
#
interface GigabitEthernet1/0/3                //鏡像口3
 port-mirroring to observe-port 1 inbound/outbound/both
#
注:inboundoutbound可綁定的端口數量要根據設備、或者板卡的型號而定


免責聲明!

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



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