summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/if_tunnel.h
diff options
context:
space:
mode:
authorWilliam Tu2017-08-22 18:40:28 +0200
committerDavid S. Miller2017-08-22 23:29:30 +0200
commit84e54fe0a5eaed696dee4019c396f8396f5a908b (patch)
tree8f9320a4eb44ac5835e422b324bd9f49f51f22b8 /include/uapi/linux/if_tunnel.h
parentudp: remove unreachable ufo branches (diff)
downloadkernel-qcow2-linux-84e54fe0a5eaed696dee4019c396f8396f5a908b.tar.gz
kernel-qcow2-linux-84e54fe0a5eaed696dee4019c396f8396f5a908b.tar.xz
kernel-qcow2-linux-84e54fe0a5eaed696dee4019c396f8396f5a908b.zip
gre: introduce native tunnel support for ERSPAN
The patch adds ERSPAN type II tunnel support. The implementation is based on the draft at [1]. One of the purposes is for Linux box to be able to receive ERSPAN monitoring traffic sent from the Cisco switch, by creating a ERSPAN tunnel device. In addition, the patch also adds ERSPAN TX, so Linux virtual switch can redirect monitored traffic to the ERSPAN tunnel device. The traffic will be encapsulated into ERSPAN and sent out. The implementation reuses tunnel key as ERSPAN session ID, and field 'erspan' as ERSPAN Index fields: ./ip link add dev ers11 type erspan seq key 100 erspan 123 \ local 172.16.1.200 remote 172.16.1.100 To use the above device as ERSPAN receiver, configure Nexus 5000 switch as below: monitor session 100 type erspan-source erspan-id 123 vrf default destination ip 172.16.1.200 source interface Ethernet1/11 both source interface Ethernet1/12 both no shut monitor erspan origin ip-address 172.16.1.100 global [1] https://tools.ietf.org/html/draft-foschiano-erspan-01 [2] iproute2 patch: http://marc.info/?l=linux-netdev&m=150306086924951&w=2 [3] test script: http://marc.info/?l=linux-netdev&m=150231021807304&w=2 Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Meenakshi Vohra <mvohra@vmware.com> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux/if_tunnel.h')
-rw-r--r--include/uapi/linux/if_tunnel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/if_tunnel.h b/include/uapi/linux/if_tunnel.h
index 6792d1967d31..2e520883c054 100644
--- a/include/uapi/linux/if_tunnel.h
+++ b/include/uapi/linux/if_tunnel.h
@@ -134,6 +134,7 @@ enum {
IFLA_GRE_COLLECT_METADATA,
IFLA_GRE_IGNORE_DF,
IFLA_GRE_FWMARK,
+ IFLA_GRE_ERSPAN_INDEX,
__IFLA_GRE_MAX,
};