Configure ERSPAN to a Cumulus Linux Switch


This article applies to the following issues:

  • A SPAN destination is not available.
  • The interface type or types prevent using a laptop as a SPAN destination.

The control plane has to process this data, which impacts the CPU of the destination switch.


  • Cumulus Linux, all versions


Normal ERSPAN setup rules apply; see the Network Troubleshooting chapter for details.

  1. Create rules for SPAN source; for example:

    cumulus@switch:~$ cat /etc/cumulus/acl/policy.d/span.rules
    -A FORWARD --in-interface swp50 -j ERSPAN --src-ip --dst-ip
    -A FORWARD --out-interface swp50 -j ERSPAN --src-ip --dst-ip
  2. Install the rules:

    cumulus@switch:~$ sudo cl-acltool -i
  3. Verify you installed the SPAN rules:

    cumulus@switch:~$ cl-acltool -L all | grep SPAN
    41229 4368K ERSPAN all -- swp50 any anywhere anywhere ERSPAN src-ip: dst-ip:
    17540 1126K ERSPAN all -- any swp50 anywhere anywhere ERSPAN src-ip: dst-ip:

The destination switch does not expect the ERSPAN packets, so it generates ICMP destination unreachable packets as a result. Any capture you take includes these packets.

To remove these packets, add an ACL like the following to the destination switch:

cumulus@switch:~$ cat /etc/cumulus/acl/policy.d/span.rules
-A OUTPUT --out-interface swp3 -p icmp --icmp-type destination-unreachable -j DROP