SPAN, RSPAN, ERSPAN

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

原文地址:https://www.cnblogs.com/larry-luo/p/12120986.html

时间: 2024-12-20 13:09:28

SPAN, RSPAN, ERSPAN的相关文章

交换机安全 802.1X、port-security、DHCP SNOOP、DAI、VACL、SPAN RSPAN

端口和MAC绑定:port-security 基于DHCP的端口和IP,MAC绑定:ip source guard 基于DHCP的防止ARP攻击:DAI 防止DHCP攻击:DHCP Snooping cisco所有局域网缓解技术都在这里了! 常用的方式: 1.802.1X,端口认证,dot1x,也称为IBNS(注:IBNS包括port-security):基于身份的网络安全: 很多名字,有些烦 当流量来到某个端口,需要和ACS交互,认证之后得到授权,才可以访问网络,前提是CLIENT必须支持80

Openvswitch手册(1)

Openvswitch是一个virutal swtich, 支持Open Flow协议,当然也有一些硬件Switch也支持Open Flow协议,他们都可以被统一的Controller管理,从而实现物理机和虚拟机的网络联通. Open Switch定义了一系列Flow Table,通过它来控制包的流向和结构. 根据Open Flow协议,Flow Table包含match field,如果匹配上了,则执行Action. 其中Match Field涵盖TCP/IP协议各层: Layer 1 – T

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

Openvswitch是一个virutal swtich, 支持Open Flow协议,当然也有一些硬件Switch也支持Open Flow协议,他们都可以被统一的Controller管理,从而实现物理机和虚拟机的网络联通. Open Switch定义了一系列Flow Table,通过它来控制包的流向和结构. 根据Open Flow协议,Flow Table包含match field,如果匹配上了,则执行Action. 其中Match Field涵盖TCP/IP协议各层: Layer 1 – T

SPAN和RSPAN概念

看到某些录音解决方通,采用SPAN技术,对交换机端口进行镜像,实现抓取录音.什么是SPAN呢?来自百度百科. SPAN技术主要是用来监控交换机上的数据流,大体分为两种类型,本地SPAN和远程SPAN. ----Local Switched Port Analyzer (SPAN) and Remote SPAN (RSPAN),实现方法上稍有不同. 利用SPAN技术我们可以把交换机上某些想要被监控端口(以下简称受控端口)的数据流COPY或MIRROR一 份,发送给连接在监控端口上的流量分析仪,比

OpenvSwitch实现Docker容器跨宿主机互联

1. OpenvSwitch简介 Open vSwitch(下面简称为 OVS)是由 Nicira Networks 主导的,运行在虚拟化平台(例如 KVM,Xen)上的虚拟交换机.在虚拟化平台上,OVS可以为动态变化的端点提供 2 层交换功能,很好的控制虚拟网络中的访问策略.网络隔离.流量监控等等.主要实现代码为可移植的C代码. 它的目的是让大规模网络自动化可以通过编程扩展,同时仍然支持标准的管理接口和协议(例如NetFlow,sFlow,SPAN,RSPAN,CLI,LACP,802.1ag

CISCO交换机端口镜像配置

镜像口配置    大多数交换机都支持镜像技术,这可以对交换机进行方便的故障诊断.我们称之为"mirroring "或"Spanning ".镜像是将交换机某个端口的流量拷贝到另一端口(镜像端口),进行监测. Cisco3550可以配置2个镜像口 案例:将端口2~5镜像到端口6 1.镜像口配置 Switch>enable                         Switch#conf  t                          Step3:

Open vSwitch 简介

概述 Open vSwitch 是一个高质量的.多层虚拟交换机,使用开源 Apache 2.0 许可协议,由Nicira Networks 开发,主要实现代码为可移植的 C 代码.它的目的是让大规模网络自动化可以通过编程扩展,同时仍然支持标准的管理接口和协议(例如 NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag).此 外,它被设计位支持跨越多个物理服务器的分布式环境,类似于 VMware 的 vNetwork 分布式 vswitch 或 Cisco

Openvswitch手册(4)

这一节我们来分析Mirror Mirror就是配置一个bridge,将某些包发给指定的mirrored ports 对于包的选择: select_all,所有的包 select_dst_port select_src_port select_vlan 对于指定的目的: output_port (SPAN) output_vlan (RSPAN) Port mirroring on a Cisco Systems switch is generally referred to as Switche

[转]Open vSwitch 安装及配置

Open vSwitch安装及配置 一. Open vSwitch简介 1.1概述 Open vSwitch是一个高质量的.多层虚拟交换机,使用开源Apache 2.0许可协议,由Nicira Networks开发,主要实现代码为可移植的C代码. 它的目的是让大规模网络自动化可以通过编程扩展,同时仍然支持标准的管理接口和协议(例如NetFlow, sFlow, SPAN, RSPAN, CLI, LACP, 802.1ag).此外,它被设计位支持跨越多个物理服务器的分布式环境,类似于VMware