ERSPAN
Encapsulated Remote Switched Port Analyzer or ERSPAN is a type of SPAN performed by Cisco switches that allows you to copy all traffic from a single or multiple source ports or source VLANs to a destination interface on a different subnet. ERSPAN allows captured packets to be routed to reach their destination interface to be captured.
ERSPAN uses GRE encapsulation of the captured packets to achieve this.
Links:
https://networklessons.com/cisco/ccie-routing-switching-written/erspan