hardware:erspan

This is an old revision of the document!


Configuring ERSPAN packet capture for Network Security Monitoring

ERSPAN 1) stands for Encapsulated Remote Switch Port ANalayzer or just Encapsulated RSPAN. This is feature available on some of the higher end Cisco Switches such as Catalyst 6500 and 7500s, Nexus, and ASR platforms.

What is ERSPAN

ERSPAN allows you to capture network packets from one or more physical ports, then transmit these packets across your network inside a Layer-3 IP tunnel using GRE (Generic Routing Encapsulation). Since you are transmitting it over a Layer-3 tunnel you need to send it to a particular routable IP address.

The following diagram shows a ERSPAN session that captures packets from interface GigabitEthernet1/0/1 and transmits it to the IP address 10.0.0.21

Why ERSPAN for Network Monitoring

There are three port mirroring features in Cisco :

  1. Physical SPAN – this is the normal port mirror we see used. It is supported on nearly all models of Cisco and allows you to physically mirror one or more ports to a monitor port.
  2. RSPAN – Remote SPAN, this is a Layer-2 port mirror where you can capture remote packets over a Layer2 VLAN and bring it across your network to a NSM tool
  3. ERSPAN – Layer3 Remote SPAN, this is what we are talking about. Allows you to transport a port mirror session over a IP network.

Use case 1 : Virtual Machine

One of the use cases of ERSPAN we are seeing is. To provide network packets to Trisul Network Analytics running inside a Virtual Machine. Particularly when the administrators of the VM are unable to provide a promiscuous mode physical interface.

Use case 2 : Temporary monitoring

Some of the other scenarios we are seeing ERSPAN to be of great use is - when you want to temporarily monitor an interface without having to do any extra cabling that would be required for a physical layer SPAN.

Configuring

In ERSPAN, there is a concept of Source and Destination session. A source session specifies interfaces from which traffic is captured and a destination IP address. A destination session specifies the output port to which the decapsulated traffic is written out.

What we do here is to only configure a source ERSPAN session the IP address used will be the IP address of the TrisulNSM Virtual Machine. When you do this, the network will just forward the GRE Encapsulated mirror traffic to the TrisulNSM VM. Since Trisul already supports ERSPAN as a capture mechanism , you can use that to decode the traffic. Here is a sample config from the Cisco manual 2)

enable 
configure terminal 
interface GigabitEthernet1/0/1
monitor session 1 type erspan-source
description "For TrisulNSM"
erspan-id 101
ip address 10.0.0.21
mtu 1900
no shutdown 
Note about MTU for ERSPAN
  1. mtu 1900 – ERSPAN adds about 48 bytes of extra header bytes by way of Ethernet/IP/GRE header. The default ERSPAN MTU is 1500 bytes, so when you mirror full length packets they can be truncated. Make sure you increase the MTU of the ERSPAN to 1700 or 1900 or even the maximum size of 9000 bytes.
  2. You also need to set the MTU on any bridges you create on the VM infrastructure.
  3. If you dont set the MTU to a higher numbers, then packets will be truncated as per the ERSPAN documentation. Some implementations may fragment the IP packets, which will they place a load on the NSM tool to reassemble the packets.

to view the monitor

show monitor session 1

Enabling ERSPAN in TrisulNSM

Trisul Network Analytics supports ERSPAN natively.

1)
ERSPAN Cisco IOS XE 3S Configuration Guide : Configure ERSPAN
2)
Cisco Guide : Configuring ERSPAN
hardware/erspan.1525170185.txt.gz · Last modified: 2018/05/01 15:53 by veera