端口镜像技术介绍:

端口镜像:是(port Mirroring)把交换机一个或多个端口(VLAN)的数据镜像到一个或多个端口的方法。由于部署 IDS 产品需要监听网络流量(网络分析仪同样也需要),但是在目前广泛采用的交换网络中监听所有流量有相当大的困难,因此需要通过配置交换机来把一个或多个端口(VLAN)的数据转发到某一个端口来实现对网络的监听

39dd2653-1

指定镜像源端口:

1
monitor session 1 source interface 【指定端口】{tx,rx,both}

monitor–配置端口镜像; session–配置一个端口镜像;镜像事号码<1-100> source–镜像源端口;destination–镜像目的端口;both–管理发送和接收的流量; rx–只管理接收的流量;tx–只管理发送的流量

指定镜像目的端口

1
monitor session 1 destination interface【指定端口】{tx,rx,both}

monitor–配置端口镜像; session–配置一个端口镜像;镜像事号码<1-100> source–镜像源端口;destination–镜像目的端口;both–管理发送和接收的流量; rx–只管理接收的流量;tx–只管理发送的流量

端口镜像实验

将交换机的13口镜像到20口:

1
2
3
SwitchA(Config)#monitor session 1 source interface ethernet 0/0/1
SwitchA(Config)#monitor session 1 source interface ethernet 0/0/3
SwitchA(Config)#monitor session 1 destination interface ethernet 0/0/20