vspan的建立.doc_第1页
vspan的建立.doc_第2页
vspan的建立.doc_第3页
vspan的建立.doc_第4页
vspan的建立.doc_第5页
已阅读5页,还剩2页未读 继续免费阅读

下载本文档

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

文档简介

span可以基于vlan使用,一个源vlan是一个为了网络流量分析的被监控的vlan.vspan使用一个或多个vlan作为span的源。源vlan中的所有端口成为源端口。对于vspan,只能监控进入的流量(rx流量)。2950系列交换机不能执行。 1) 进入全局配置模式 configure terminal 2) 清除先前配置的内容 no monitor session 会话号|all|local|remote 会话号:可以单独清除某个指定的会话,取值为1-66 all:所有的会话 local:清除本地span remote:远程的span 3) 指定监控的源端口 monitor session 会话号 source vlan vlan号 rx 会话号:取值为1-66 vlan号:取值为1-4094 rx:接收 4) 指定监控的目标端口 monitor session 会话号 destination inteface 接口号 encapsulation replicate 接口号:必须是物理接口,不能是vlan或以太通道 encapsulation replicate:目标端口的封装类型将取代源端口的封装类型,如果不设置将按照默认值将数据转发到native vlan(本地vlan,未标记的) 5) 验证结果 show monitor session 会话号 建立本地会话的目标端口的到达流量 配置过程: 1) 进入全局配置模式 configure terminal 2) 清除先前配置的内容 no monitor session 会话号|all|local|remote 3) 指定监控的源端口 monitor session 会话号 source interface 接口 4) 指定监控的目标端口 monitor session 会话号 destination inteface 接口号 encapsulation replicate ingress dot1q vlan vlan号|isl |untagged vlan vlan号 接口号:必须是物理接口,不能是vlan或以太通道 encapsulation replicate:目标端口的封装类型将取代源端口的封装类型,如果不设置将按照默认值将数据转发到native vlan(本地vlan,未标记的) 5) 验证结果 建立本地会话的过滤vlan 配置过程: 1) 进入全局模式 configure terminal 2) 清除先前的会话 no monitor session 会话号 1) 指定源会话 monitor session 会话号 source interface 接口号 接口号:必须是trunk端口 2) 指定过滤的vlan monitor session 会话号 filter vlan vlan号 , | - 3) 指定目标端口 monitor session 会话号destination interface 端口号 案例: switch(config)# no monitor session 2 switch(config)# monitor session 2 source interface gigabitethernet0/2 rx switch(config)# monitor session 2 filter vlan 1 - 5 , 9 switch(config)# monitor session 2 destination interface gigabitethernet0/1 switch(config)# end 将span源流量限制在vlan 1-5和9 = rspan(remote switched port anylzer network) rspan是设计用来支持跨越不同交换机的源端口、源vlan和目的端口的span实现。rspan允许跨越网络的多台交换机的远程监控。如图所示:在一些大型的测试中,往往接入层交换机(交换机a和b)与核心交换机(交换机d)在物理距离上很远,所以此时就需要一种remotespan 的技术来进行监控。 rspan工作原理 创建一个rspan会话的第一步是创建一个为所有参与交换机中特定会话指定的rspan vlan。rspan使用反射端口将位于远程交换机的源端口流量复制到本地交换机的目的端口上。除了rspan会话所需要的流量外,rspan反射端口的工作与rspan目的端口类似。反射端口只转发由源端口接收或发送的分组。他们不接收或转发其他的网络流量。 从源端口或源vlan来得rspan流量被交换到rsanp vlan,然后被转发到也在rspan vlan中的目的端口。在rspan会话中源(端口或vlan)在不同的源交换机上能不同。但是,如果因特网路由器,比如cisco7600系列路由器,被用作rspan会话的源,那么它们必须和rspan源有相同的vlan. rspan反射端口 反射端口仅用于所监控的数据拷贝到remote vlan,反射端口仅转发有关联的rspan 源端口的数据, 在配置成反射端口后,它将失去任何连通性,直到rspan的源监控会话被关闭为止。 反射端口的属性如下 1 不能配置成etherchannel组,不能为trunk,也不能配置任何协议过滤 2 配置成反射端口后,他不能成为span的源或者目的端口 3 一个端口被用作反射端口后,不能配置为一个span的源/目的端口。同时一个反射端口只能在同一时间支持一个监控会话。 4 反射端口会将所有的监控数据会泛洪到所有能够承载rspan vlan 的trunk接口上 5 stp在反射端口上会被禁用 6 当反射端口没有足够的流量来转发监控端口的流量时,它使用自己接口的最大速率进行转发 7 反射端口对于所有vlan是不可见的 8 反射端口是一个被设置为回环的端口 rspan与其他特性的相互影响 1 stp:反射端口在rspan会话活动时不能参与stp,stp可以在中继端口上激活以承载rspan vlan 2 vtp:vtp不能用在交换机之间对rspan vlan 进行裁剪 3 vlan 和中继:可以在任何时候修改反射端口的 vlan 成员或中继设置,直到 rspan 会话被禁用后才能生效 4 etherchannel:如果属于一个ethercannel组的物理端口是反射端口,并且该组是一个源, 那么端口将从etherchanel组合被监控端口列表中删除 配置过程 1 在vtp服务器交换机中配置remote vlan,该vlan将专用于rspan。如果采用透明模式,必须在域中所有设备中都一致地配置span 2 在源交换机和目标交换机中配置span会话,并且确保中间交换机能够跨越各个vlan干道承载rspan vlan 建立rspan vlan rspan vlan应在配置pspan源或目的会话之前创建并通过交换网络传播。如果在网络中启用了vtp,则可以在一台单一的vtp服务器交换机上创建rspan vlan,并将它传播给vtp域中的其他vtp交换机。如果还启用了vtp修剪特性,则由vlan中继剪除rspan流量并防止任何vlan-id低于1005的不想扩散的rspan流量穿过网络。在rspan vlan上禁止mac地址的学习。 配置: 1) 进入全局模式 configure terminal 2) 指定vlan vlan vlan号 vlan号:取值为2-1001和1006-4094,2-1001的可以通过vtp传播,扩展的vlan必须每台交换机建立 3) 指定该vlan为rspan vlan remote-span 案例: switch(config)# vlan 901 switch(config-vlan)# remote span switch(config-vlan)# end switch#show vlan remote-span remote span vlans - 10 建立rspan源会话 配置过程: 1) 进入全局模式 configure terminal 2) 清除先前配置的会话 no monitor session 会话号 | all | local | remote 3) 建立源会话 monitor session 会话号 source interface 接口号 | vlan vlan号 , | - both | rx | tx 4) 指定远程vlan和反射端口 monitor session 会话号 destination remote vlan 远程vlan号 reflector-port 端口 5) 验证结果 show running-config show monitor session 会话号 案例: switch(config)# no monitor session 1 switch(config)# monitor session 1 source interface gigabitethernet0/1 tx switch(config)# monitor session 1 source interface gigabitethernet0/2 rx switch(config)# monitor session 1 source interface port-channel 2 switch(config)# monitor session 1 destination remote vlan 901 switch(config)# end - 案例: switch(config)#no monitor session all switch(config)#monitor session 1 source interface f0/2 switch(config)#monitor session 1 destination remote vlan 10 reflector-port f0/5 switch#show monitor session 1 session 1 - type : remote source session source ports : both : fa0/2 reflector port : fa0/5 dest rspan vlan : 10 建立rspan目标会话 1) 进入全局模式 configure terminal 2) 建立远程vlan vlan vlan号 3) 制定为远程vlan remote-span 4) 清除先前配置的会话 no monitor session 会话号 | all | local | remote 5) 建立源会话 monitor session 会话号 source remote vlan 远程vlan号 6) 指定目标端口 monitor session 会话号 destination interface 端口号 7) 验证结果 show running-config show monitor session 会话号案例: switch(config)# monitor session 1 source remote vlan 901 switch(config)# monitor session 1 destination interface gigabitethernet0/1 switch(config)# end - 案例: switch(config)#no monitor session all switch(config)#monitor session 1 source remote vlan 10 switch(config)#monitor session 1 destination interface f0/10 switch#show monitor session 1 session 1 - type : remote destination session source rspan vlan : 10 destination ports : fa0/10 encapsulation : native ingress: disabled 建立rspan过滤 中继vlan过滤允许分析中继源端口上一组经挑选的vlan中的网络流量。中继vlan过滤可以与属于任何所选vlan的其他源端口结合。只能与中继源端口一起使用中继vlan过滤。如果中继vlan过滤结合了其他源端口,而这些端口所属的vlan没有包含在被选中的过滤vlan列表中,那么span只包括操作源中属于一个或多个被选中的vlan的端口 配置过程: 1) 进入全局模式 configure terminal 2) 清除先前的会话 no monitor session 会话号 3) 指定源会话 monitor session 会话号 source interface 接口号 接口号:必须是trunk端口 4) 指定过滤的vlan monitor session 会话号 filter vlan vlan号 , | - 5) 指定远程vlan monitor session 会话号destination remote vlan vlan号 案例: switch(config)# no monitor session 2 switch(config)# monitor session 2 source interface gigabitethernet0/2 rx switch(config)# monitor session 2 filter vlan 1 - 5 , 9 switch(config)# monitor session 2 destination remote vlan 902 switch(config)# end - 案例: ccie-lab(v148) 题目要求: make sure a network analyzer connected to sw2-fa0/16 can collect all bi-directional traffic on sw1-fa0/1. 配置:sw1和sw2之间要做到监控,这里就需要应用rspan sw1 configure terminal vlan 901 remote-span no minitor session all monitor session 1 source interface f0/1 monitor session 1 destination remote vlan 901 reflected-port f0/22 interface f0/23 switchport trunk allowed vlan add 901 interface f0/24 switchport trunk allowed vlan add 901 sw2 configure terminal no monitor session all monitor session 1 source remote vlan 901 mon

温馨提示

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

评论

0/150

提交评论