韩国vc针剂多少钱一盒:cisco交换技术

来源:百度文库 编辑:九乡新闻网 时间:2024/04/29 20:45:51
SPAN2011-01-27 18:00

 

vspan的建立
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
monitor session 1 destination interface f0/16
interface range f0/23 –24
  switchport trunk allowed vlan add 901
案例:
ccie-lab(v210)
题目要求:
traffic monitoring:rspan
   remote-vlan:500 
   source interface:sw2 f0/18
   destination interface:sw4 f0/19
配置:
sw1  (因为sw1是服务器模式)
configure terminal
vlan 500
   remote-span
sw2
configure terminal
no monitor session all
monitor session 1 source interfac f0/18
monitor session 1 destination remote vlan 500 reflected-port f0/22
interface range f0/23 –24
   switchport trunk allowed vlan add 500
sw4
configure terminal
no monitor session all
monitor session 1 source remote vlan 500
monitor session 1 destination interface f0/19
interface range f0/23 –24
   switchport trunk allowed vlan add 500

类别:cisco交换技术| 评论(0) | 浏览(232)