CISCO交换机端口镜像配置.doc_第1页
CISCO交换机端口镜像配置.doc_第2页
CISCO交换机端口镜像配置.doc_第3页
CISCO交换机端口镜像配置.doc_第4页
CISCO交换机端口镜像配置.doc_第5页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

CISCO交换机端口镜像配置CISCO交换机端口镜像配置 先解释一下端口镜像:端口镜像简单的说,就是把交换机一个(数个)端口(源端口)的流量完全拷贝一份,从另外一个端口(目的端口)发 出去,以便网络管理人员从目的端口通过分析源端口的流量来找出网络存在问题的原因。 cisco的端口镜像叫做SWITCHED PORT ANALYZER,简称SPAN(仅在IOS系统中,下同),因此,端口镜像仅适用于以太网交换端口。Cisco的SPAN 分成三种,SPAN、RSPAN和VSPAN,简单的说,SPAN是指源和目的端口都在同一台机器上、RSPAN指目的和源不在同一交换机上,VSPAN可以镜像 整个或数个VLAN到一个目的端口。 配置方法: 1. SPAN (1) 创建SPAN源端口 monitor session session_number source interface interface-id , | - both | rx | tx monitor session 1 source interface Gi1/0/3 - 23 monitor session 2 source interface Gi1/0/24*session_number,SPAN会话号,我记得3550支持的最多本地SPAN是2个,即1或者2。 *interface-id , | -源端口接口号,即被镜像的端口,交换机会把这个端口的流量拷贝一份,可以输入多个端口,多个用“,”隔开, 比如我的3750G 设置:先查询镜像端口:show interfaceGigabitEthernet1/0/1 is down, line protocol is down (monitoring)Hardware is Gigabit Ethernet, address is 001b.53d1.f681 (bia 001b.53d1.f681)MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec, reliability 255/255, txload 1/255, rxload 1/255Encapsulation ARPA, loopback not setKeepalive set (10 sec)Auto-duplex, Auto-speed, media type is 10/100/1000BaseTXinput flow-control is off, output flow-control is unsupported ARP type: ARPA, ARP Timeout 04:00:00Last input never, output 01:24:41, output hang neverLast clearing of show interface counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: fifoOutput queue: 0/40 (size/max)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts (0 multicast) 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 watchdog, 0 multicast, 0 pause input 0 input packets with dribble condition detected 45270775 packets output, 3124068592 bytes, 0 underruns 0 output errors, 0 collisions, 1 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier, 0 PAUSE output 0 output buffer failures, 0 output buffers swapped outGigabitEthernet1/0/2 is up, line protocol is down (monitoring)Hardware is Gigabit Ethernet, address is 001b.53d1.f682 (bia 001b.53d1.f682)MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec, reliability 255/255, txload 25/255, rxload 1/255Encapsulation ARPA, loopback not setKeepalive set (10 sec)Full-duplex, 1000Mb/s, media type is 10/100/1000BaseTXinput flow-control is off, output flow-control is unsupported ARP type: ARPA, ARP Timeout 04:00:00Last input never, output 00:27:32, output hang neverLast clearing of show interface counters neverInput queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0Queueing strategy: fifoOutput queue: 0/40 (size/max)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 101566000 bits/sec, 13900 packets/sec 0 packets input, 0 bytes, 0 no buffer Received 0 broadcasts (0 multicast) 0 runts, 0 giants, 0 throttles 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored 0 watchdog, 0 multicast, 0 pause input 0 input packets with dribble condition detected 56333567 packets output, 4143302191 bytes, 0 underruns 0 output errors, 0 collisions, 1 interface resets 0 babbles, 0 late collision, 0 deferred 0 lost carrier, 0 no carrier, 0 PAUSE output 0 output buffer failures, 0 output buffers swapped out我们用端口镜像1来镜像3-23号端口,镜像端口来镜像24号端口:monitor session 1 source interface Gi1/0/3 - 23monitor session 1 destination interface Gi1/0/1monitor session 2 source interface Gi1/0/24monitor session 2 destination interface Gi1/0/2连续的用“-”连接。 *both | rx | tx,可选项,是指拷贝源端口双向的(both)、仅进入(rx)还是仅发出(tx)的流量,默认是both。 (2)创建SPAN目的端口 monitor session session_number destination interface interface-id encapsulation dot1q ingress vlan vlan id | ISL monitor session 1 destination interface Gi1/0/1monitor session 2 destination interface Gi1/0/2ingress | ingress vlan vlan id *一样的我就不说了。 *session_number要和上面的一致。 *interface-id目的端口,在源端口被拷贝的流量会从这个端口发出去,端口号不能被包含在源端口的范围内。 *encapsulation dot1q | isl,可选,指被从目的端口发出去时是否使用802.1q和isl封装,当使用802.1q时,对于本地VLAN不进行封 装,其VLAN封装,ISL则全部封装。 2.VSPAN (1)创建VSPAN源VLAN monitor session session_number source vlan vlan-id , | - rx *一样的也不说了,基本和SPAN相同,只是接口号变成了VLAN号,而且只能镜像接收的流量。 (2)创建VSPAN目的端口 monitor session session_number destination interface interface-id encapsulation dot1q | isl *和SPAN的一样。 3.RSPAN RSPAN的配置较为复杂,其流程可以这样来看,交换机把要镜像的端口流量复制一份,然后发到本机的一个反射端口上(reflector-port ) ,在由反射端口将其通过网络转发到目的交换机中的VLAN上(一般情况下,这个VLAN是专为镜像而设的,不要作为客户端接入所用),再在目 的交换机中配置VSPAN,将该VLAN的流量镜像到目的端口,要注意的是,一旦这种RSPAN被使用,该镜像专用VLAN的信息会被转发到所有的VLAN 主干上,造成网络带宽的浪费,因此要配置VLAN修剪(pruning),另外RSPAN也可以镜像VLAN。 (1)在源交换机上创建RSPAN源端口 *同SPAN或VSPAN (2)在源交换机上创建VSPAN反射端口和目的VLAN monitor session session_number destination remote vlan vlan-id reflector-port interface *vlan-id 目的交换机上转为镜像而设的VLAN *reflector-port interface源交换机上的镜像端口 (3)在目的交换机上创建VSPAN源VLAN monitor session session_number source remote vlan vlan-id *vlan-id就是上面的镜像专用VLAN (4)在目的交换机上创建VSPAN目的端口 monitor session session_number destination interface interface-id encapsulation dot1q | isl *同SPAN 4.其他 (1)端口镜像的过滤,端口镜像是可以做Filter的。 monitor session session_numbe

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论