思科交换机配置端口镜像

思科交换机配置远程端口镜像

 

远程端口镜像简介:

  远程端口镜像,源端口和目的端口位于不同交换机上

  原理是将源端口的流量镜像到本端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 出接口的流量

 

posted @ 2020-10-09 09:28  sec_j  阅读(2473)  评论(0编辑  收藏  举报