该文档摘自:Home > CCIE Routing and Switching Study Group > Discussions

由 Deben 于 2015-2-6 上午6:50 创建,最后由 Deben 于 2015-2-6 上午9:51 修改。

SPAN, RSPAN, ERSPAN

Switch port Analyzer (SPAN) is an efficient, high performance traffic monitoring system. It directs or mirrors traffic from a source port or VLAN to a destination port. This is sometimes referred to as session monitoring. SPAN is used for troubleshooting connectivity issues and calculating network utilization and performance, among many others. There are three types of SPANs supported on Cisco products …

   a.      SPAN or local SPAN.

     b.      Remote SPAN (RSPAN).

     c.      Encapsulated remote SPAN (ERSPAN).

SPAN / traffic mirroring / port mirroring is used for many purposes, below includes some.

-          Implementing IDS/IPS in promiscuous mode.

-          VOIP call recording solutions.

-          Security compliance reasons to monitor and analyze traffic.

-          Troubleshooting connection issues, monitoring traffic.

Regardless the SPAN type running, SPAN source can be any type of port i.e. a routed port, physical switch port, an access port, trunk, VLAN (all active ports are monitored of the switch), an EtherChannel  (either a port or entire port-channel interfaces) etc. Note that a port configured for SPAN destination CANNOT be part of a SPAN source VLAN.

SPAN sessions support the monitoring of ingress traffic (ingress SPAN), egress traffic (egress SPAN), or traffic flowing in both directions.

    • Ingress SPAN (RX) copies traffic received by the source ports and VLANs to the destination port. SPAN copies the traffic before any modification (for example before any VACL or ACL filter, QoS or ingress or egress policing).
    • Egress SPAN (TX) copies traffic transmitted from the source ports and VLANs to the destination port. All relevant filtering or modification by VACL or ACL filter, QoS or ingress or egress policing actions are taken before the switch forwards traffic to SPAN destination port.
    • When the both keyword is used, SPAN copies the network traffic received and transmitted by the source ports and VLANs to the destination port.
    • SPAN/RSPAN usually ignores CDP, STP BPDU, VTP, DTP and PAgP frames. However these traffic types can be forwarded if the encapsulation replicate command is configured.

SPAN or Local SPAN

SPAN mirrors traffic from one or more interface on the switch to one or more interfaces on the same switch; hence SPAN is mostly referred to as LOCAL SPAN.

Guidelines or restrictions to local SPAN:

    • Both Layer 2 switched ports and Layer 3 ports can be configured as source or destination ports.
    • The source can be either one or more ports or a VLAN, but not a mix of these.
    • Trunk ports are valid source ports mixed with non-trunk source ports.
    • Up to 64 SPAN destination ports can be configured on a switch.
    • When we configure a destination port, its original configuration is overwritten. If the SPAN configuration is removed, the original configuration on that port is restored.
    • When configure a destination port, the port is removed from any EtherChannel bundle if it were part of one. If it were a routed port, the SPAN destination configuration overrides the routed port configuration.
    • Destination ports do not support port security, 802.1x authentication, or private VLANs.
    • A port can act as the destination port for only one SPAN session.
    • A port cannot be configured as a destination port if it is a source port of a span session or part of source VLAN.
    • Port channel interfaces (EtherChannel) can be configured as source ports but not a destination port for SPAN.
    • Traffic direction is “both” by default for SPAN sources.
    • Destination ports never participate in a spanning-tree instance. Cannot support DTP, CDP etc. Local SPAN includes BPDUs in the monitored traffic, so any BPDUs seen on the destination port are copied from the source port. Hence never connect a switch to this type of SPAN as it could cause a network loop.
    • When VLAN is configured as SPAN source (mostly referred to as VSPAN) with both ingress and egress options configured, forward duplicate packets from the source port only if the packets get switched in the same VLAN. One copy of the packet is from the ingress traffic on the ingress port, and the other copy of the packet is from the egress traffic on the egress port.
    • VSPAN monitors only traffic that leaves or enters Layer 2 ports in the VLAN.

Remote SPAN (RSPAN)

Remote SPAN (RSPAN) is similar to SPAN, but it supports source ports, source VLANs, and destination ports on different switches, which provide remote monitoring traffic from source ports distributed over multiple switches and allows destination centralize network capture devices. Each RSPAN session carries the SPAN traffic over a user-specified dedicated RSPAN VLAN in all participating switches. This VLAN is then trunked to other switches, allowing the RSPAN session traffic to be transported across multiple switches and delivered to destination capturing station. RSPAN consists of an RSPAN source session, an RSPAN VLAN, and an RSPAN destination session.

Guidelines or restrictions to RSPAN:

    • A specific VLAN must be configured for SPAN destination which will traverse across the intermediate switches via trunk links toward destination port.
    • Can create same source type – at least one port or at least one VLAN but cannot be the mix.
    • The destination for the session is RSPAN VLAN rather than the single port in switch, so all ports in RSPAN VLAN will receive the mirrored traffic.
    • Configure any VLAN as an RSPAN VLAN as long as all participating network devices support configuration of RSPAN VLANs, and use the same RSPAN VLAN for each RSPAN session
    • VTP can propagate configuration of VLANs numbered 1 through 1024 as RSPAN VLANs , must manually configure VLANs numbered higher than 1024 as RSPAN VLANs on all source, intermediate, and destination network devices.
    • MAC address learning is disabled in the RSPAN VLAN.

Encapsulated remote SPAN (ERSPAN)

Encapsulated remote SPAN (ERSPAN) brings generic routing encapsulation (GRE) for all captured traffic and allows it to be extended across Layer 3 domains.

ERSPAN is a Cisco proprietary feature and is available only to Catalyst 6500, 7600, Nexus, and ASR 1000 platforms to date. The ASR 1000 supports ERSPAN source (monitoring) only on Fast Ethernet, Gigabit Ethernet, and port-channel interfaces.

Guidelines or restrictions to ERSPAN:

    • ERSPAN source sessions do not copy ERSPAN GRE-encapsulated traffic from source ports. Each ERSPAN source session can have either ports or VLANs as sources, but not both.
    • Regardless of any configured MTU size, ERSPAN creates Layer 3 packets that can be as long as 9,202 bytes. ERSPAN traffic might be dropped by any interface in the network that enforces an MTU size smaller than 9,202 bytes.
    • ERSPAN does not support packet fragmentation. The "do not fragment" bit is set in the IP header of ERSPAN packets. ERSPAN destination sessions cannot reassemble fragmented ERSPAN packets.
    • The ERSPAN ID differentiates the ERSPAN traffic arriving at the same destination IP address from various different ERSPAN source sessions; configured ERSPAN ID must match on source and destination devices.
    • For a source port or a source VLAN, the ERSPAN can monitor the ingress, egress, or both ingress and egress traffic. By default, ERSPAN monitors all traffic, including multicast and Bridge Protocol Data Unit (BPDU) frames.
    • Tunnel interface supported as source ports for an ERSPAN source session are GRE, IPinIP, SVTI, IPv6, IPv6 over IP tunnel, Multipoint GRE (mGRE) and Secure Virtual Tunnel Interfaces (SVTI).
    • The filter VLAN option is not functional in an ERSPAN monitoring session on WAN interfaces.
    • ERSPAN on Cisco ASR 1000 Series Routers supports only Layer 3 interfaces. Ethernet interfaces are not supported on ERSPAN when configured as Layer 2 interfaces.
    • When a session is configured through the ERSPAN configuration CLI, the session ID and the session type cannot be changed. To change them, you must first use the no form of the configuration command to remove the session and then reconfigure the session.
    • Cisco IOS XE Release 3.4S :- Monitoring of non-IPsec-protected tunnel packets is supported on IPv6 and IPv6 over IP tunnel interfaces only to ERSPAN source sessions, not to ERSPAN destination sessions.
    • Cisco IOS XE Release 3.5S, support was added for the following types of WAN interfaces as source ports for a source session: Serial (T1/E1, T3/E3, DS0) , Packet over SONET (POS) (OC3, OC12) and  Multilink PPP ( multilink, pos, and serial keywords were added to the source interface command).

Using ERSPAN as Local SPAN:

To use ERSPAN to monitor traffic through one or more ports or VLANs in same device, we must have to create an ERSPAN source and ERSPAN destination sessions in same device, data flow takes place inside the router, which is similar to that in local SPAN.

The following factors are applicable while using ERSPAN as a local SPAN:

    • Both sessions have the same ERSPAN ID.
    • Both sessions have the same IP address. This IP address is the routers own IP address; that is, the loopback IP address or the IP address configured on any port.

(config)# monitor session   10 type erspan-source

(config-mon-erspan-src)#   source interface Gig0/0/0

(config-mon-erspan-src)#   destination

(config-mon-erspan-src-dst)#   ip address 10.10.10.1

(config-mon-erspan-src-dst)#   origin ip address 10.10.10.1

(config-mon-erspan-src-dst)#   erspan-id 100

SPAN, RSPAN, ERSPAN的更多相关文章

  1. Cisco交换机SPAN&RSPAN调试实录

    Cisco交换机SPAN&RSPAN设置实录   本文出自 "李晨光原创技术博客" 博客,请务必保留此出处http://chenguang.blog.51cto.com/3 ...

  2. Openvswitch手册(1): 架构,SSL, Manager, Bridge

    Openvswitch是一个virutal swtich, 支持Open Flow协议,当然也有一些硬件Switch也支持Open Flow协议,他们都可以被统一的Controller管理,从而实现物 ...

  3. openvswith Frequently Asked Questions

    Open vSwitch <http://openvswitch.org> 参考地址:http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=ope ...

  4. [转载]抓包,端口镜像,monitor session命令(转)

    原文地址:抓包,端口镜像,monitor session命令(转)作者:浮云皓月 一.SPAN简介 SPAN技术主要是用来监控交换机上的数据流,大体分为两种类型,本地SPAN和远程SPAN. --Lo ...

  5. Open vSwitch安装及配置

    一. Open vSwitch简介 1.1概述 Open vSwitch是一个高质量的.多层虚拟交换机,使用开源Apache 2.0许可协议,由Nicira Networks开发,主要实现代码为可移植 ...

  6. 从三个开源项目认识OpenFlow交换机 - OVS

    在SDN/NFV的网络革新技术浪潮的引领下,催生了诸多数据面开源方案的诞生.业界知名度较高的有OVS(Open vSwitch).FD.io (Fast Data I/O).ODP(Open Data ...

  7. Openvswitch手册(4): Mirror

    这一节我们来分析Mirror Mirror就是配置一个bridge,将某些包发给指定的mirrored ports 对于包的选择: select_all,所有的包 select_dst_port se ...

  8. VMware vSphere 5.x 与 vSphere 6.0各版本功能特性对比

    各版本中的新特性及功能对比:   VMware vSphere 5.0 VMware vSphere 5.1 VMware vSphere 5.5 VMware vSphere 6.0 ESXi 5. ...

  9. OpenStack若干概念

    近期在部署OpenStack时涉及到各个服务之间的诸多概念,这里简要记录其中的一些作为备忘. 服务(service) 在OpenStack中,一个服务有若干端点,用户通过端点访问服务并使用服务提供的功 ...

随机推荐

  1. 十分钟理解JavaScript引擎的执行机制

    关注专栏写文章 十分钟理解JavaScript引擎的执行机制 方伟景 千锋前端开发推动市场提升的学习研究者. 4 人赞同了该文章 首先,请牢记2点: JS是单线程语言 JS的Event Loop是JS ...

  2. 对象Bean与Map互转问题

    一.摘要 在实际开发过程中,经常碰到需要进行对象与map之间互转的问题,其实对于对象.Map 之间进行互转有很多种方式,下面我们一起来梳理一下: 利用 JSON 工具包,将对象转成字符串,之后再转成 ...

  3. linq和隐式类型var

    隐式类型 var 强类型,声明的时候必须给变量赋值,编译器会根据值来确定其类型.只能出现在局部变量或脚本代码中. 使用范围: 简单类型:如int string等 复杂类型:如数组.类等 逻辑语句:fo ...

  4. 【NOIP2012普及组】质因数分解

    P1075 质因数分解 假期第一天就给一道入门难度的题写题解…… 这道题一开始就被我想复杂了:埃式筛,欧拉筛……然而开一个1e9的数组?不现实. 直到看到题解区的dalao用唯一分解定理: 算术基本定 ...

  5. CentOS7识别不到win10启动项的解决方法

    Windows的文件系统是NTFS格式的,而CentOS是不支持NTFS格式的.因此,我们要安装另外的工具使CentOS能识别NTFS格式的文件系统. 这里我们选择ntfs-3g这个工具,安装过程如下 ...

  6. 将Tomcat集成到idea中

    检查有没有成功

  7. AcWing 285. 没有上司的舞会

    //f[u][0]是所有以u为根的子树中选择,并且不选u这个点的方案 //f[u][1]是所有以u为根的子树中选择,并且 选u这个点的方案 #include <cstring> #incl ...

  8. D. Easy Problem dp(有衔接关系的dp(类似于分类讨论) )

    D. Easy Problem dp(有衔接关系的dp(类似于分类讨论) ) 题意 给出一个串 给出删除每一个字符的代价问使得串里面没有hard的子序列需要付出的最小代价(子序列不连续也行) 思路 要 ...

  9. 【C语言】利用递归函数求n的阶乘

    递归实现n的阶乘     什么是阶乘:0!= 1,n!=n * (n - 1) * (n - 2)......3 * 2 * 1: 解题思路: 1> 分析题意,很明显0是递归出口:        ...

  10. Python记:索引操作示例:将以数指定年,月,日的日期打印出来

    ————————————————————————————————————不要停止奔跑,不要回顾来路,来路无可眷恋,值得期待的只有前方. months=[ 'January', 'February', ...