设为首页收藏本站网纵官网

网纵论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 29536|回复: 0
打印 上一主题 下一主题

Cisco交换机流量镜像配置

[复制链接]
跳转到指定楼层
楼主
发表于 2015-7-9 17:50:57 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

Cisco交换机流量镜像配置
注:本文说明基于接口与流的本地流量镜像配置步骤,仅限于使用命令行模式配置。
多个源端口的流量可以镜像到同一个目的端口;一个源端口流量不能镜像到多个目的端口。
配置举例部分的红色斜体字为变量参数,需要根据实际情况设定。
基本概念
Source(源端口):把从源端口经过的流量复制到目的端口;
Destination(目的端口):用于连接缓存大师服务器的镜像口,输出从源端口复制过来的流量。
网络拓扑

端口镜像
需要将G0/0/1口的全部流量镜像到G0/0/2口,即G0/0/1为源端口,G0/0/2为目的端口。
配置步骤
1、进入配置模式:config t;
2、配置镜像会话与源端口:monitor session 2 source interface
3、配置镜像会话与目的端口:monitor session 2 destination interface
配置举例
switch>config t
switch# monitor session 2 sourceinterface G0/0/1 both   (设置源端口,镜像可以根据实际情况灵活选择入方向、出方向及全部流量;both,全部流量;rx,入方向流量;tx,出方向流量)
switch# monitor session 2 destination interface G0/0/2   (设置目的端口)
注:若镜像口位于内网vlan环境中,镜像目的端口命令应加上dot1q的封装
switch# monitor session 2 destination interface G0/0/2 encapsulation dot1q


HTTP流镜像
    流镜像指将源端口指定的流量复制到目的端口。
需要将G0/0/1口的HTTP流量镜像到G0/0/2口,G0/0/1为源端口,G0/0/2为目的端口。
注:思科交换机支持流镜像的型号:2960,3560,3750X;软件版本要求:12.2(55)SE4及以后或15.0(1)SE1及以后
配置步骤
1、进入配置模式:config t;
2、配置ACL:access-list
3、配置镜像会话与源端口:monitor session 2 source interface
4、配置镜像会话与目的端口:monitor session 2 destination interface
5、配置镜像会话与流匹配策略:monitor session 2 filter ip access-group   
配置举例
switch>config t
switch#access-list 111 permit tcp any any eq www
switch# monitor session 2 sourceinterface G0/0/1 both   (设置源端口,镜像可以根据实际情况灵活选择入方向、出方向及全部流量;both,全部流量;rx,入方向流量;tx,出方向流量)
switch# monitor session 2 destination interface G0/0/2   (设置目的端口)

switch# monitor session 2 destination filter access-group 111   (设置目的端口)

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 转播转播 分享分享 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|网纵论坛 ( 粤ICP备12009713号  

GMT+8, 2024-4-19 22:16 , Processed in 0.028984 second(s), 28 queries .

Powered by Discuz! X3.2 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表