思科交換機配置端口鏡像


思科交換機配置遠程端口鏡像

 

遠程端口鏡像簡介:

  遠程端口鏡像,源端口和目的端口位於不同交換機上

  原理是將源端口的流量鏡像到本端VLAN中,然后通過TRUNK傳送到目的設備。

  再將本地設備中VLAN中的數據鏡像到指定的端口中。

 

 

實驗拓撲圖:

 

要求:

  將SW1 e0/0的出站入站流量鏡像到SW2 e0/1供IDS進行數據分析。

 

 

SW1的配置:

  Switch(config)#monitor session 1 source interface e0/0 both

  Switch(config)#monitor session 1 destination remote vlan 100

  Switch(config)#vlan 100

  Switch(config-vlan)#remote-span

  SW1與SW2相連的接口要配置為trunk。

  Switch(config)#interface e0/2

  Switch(config-if)#switchport trunk encapsulation dot1q

  Switch(config-if)#switchport mode trunk

 

SW2的配置:

  Switch(config)#monitor session 1 source remote vlan 100

  Switch(config)#monitor session 1 destination interface ethernet 0/1

  Switch(config)#vlan 100

  Switch(config-vlan)#remote-span
  SW1與SW2相連的接口要配置為trunk。

  Switch(config)#interface e0/0

  Switch(config-if)#switchport trunk encapsulation dot1q

  Switch(config-if)#switchport mode trunk

 

 

測試:

  兩個VPC之間使用ping,抓取SW2 e0/1的包查看實驗是否成功吧。

 

 

重要參數介紹:

  both 出接口和入接口的流量

  rx      入接口的流量

  tx 出接口的流量

 


免責聲明!

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



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