From c078dac303d1e427f9612f7ff1996800f5076b47 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 24 Nov 2019 10:40:56 +0100 Subject: geneve: T1799: add Generic Network Virtualization Encapsulation --- interface-definitions/interfaces-geneve.xml | 92 +++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 interface-definitions/interfaces-geneve.xml (limited to 'interface-definitions/interfaces-geneve.xml') diff --git a/interface-definitions/interfaces-geneve.xml b/interface-definitions/interfaces-geneve.xml new file mode 100644 index 000000000..3a529c363 --- /dev/null +++ b/interface-definitions/interfaces-geneve.xml @@ -0,0 +1,92 @@ + + + + + + + Generic Network Virtualization Encapsulation (GENEVE) + 460 + + gnv[0-9]+$ + + GENEVE interface must be named gnvN + + gnvN + GENEVE interface name + + + + + + IP address + + ipv4net + IPv4 address and prefix length + + + ipv6net + IPv6 address and prefix length + + + + + + + + + + Interface description + + ^.{1,256}$ + + Interface description too long (limit 256 characters) + + + + + Disable interface + + + + + + Maximum Transmission Unit (MTU) + + 1450-9000 + Maximum Transmission Unit + + + + + MTU must be between 1450 and 9000 + + + + + Remote address of GENEVE tunnel + + ipv4 + Remote address of GENEVE tunnel + + + + + + + + + Virtual Network Identifier + + 0-16777214 + GENEVE virtual network identifier + + + + + + + + + + + -- cgit v1.2.3 From 762e0922eec583c011c5fb834ad8a22971bc96b5 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 24 Nov 2019 10:51:54 +0100 Subject: geneve: T1799: add IPv4 routing parameters --- interface-definitions/interfaces-geneve.xml | 26 ++++++++++++++++++++++++++ src/conf_mode/interfaces-geneve.py | 15 +++++++++++++++ 2 files changed, 41 insertions(+) (limited to 'interface-definitions/interfaces-geneve.xml') diff --git a/interface-definitions/interfaces-geneve.xml b/interface-definitions/interfaces-geneve.xml index 3a529c363..4d3897330 100644 --- a/interface-definitions/interfaces-geneve.xml +++ b/interface-definitions/interfaces-geneve.xml @@ -48,6 +48,32 @@ + + + IPv4 routing parameters + + + + + ARP cache entry timeout in seconds + + 1-86400 + ARP cache entry timout in seconds (default 30) + + + + + ARP cache entry timeout must be between 1 and 86400 seconds + + + + + Enable proxy-arp on this interface + + + + + Maximum Transmission Unit (MTU) diff --git a/src/conf_mode/interfaces-geneve.py b/src/conf_mode/interfaces-geneve.py index 94f88ad6d..b11ef3594 100755 --- a/src/conf_mode/interfaces-geneve.py +++ b/src/conf_mode/interfaces-geneve.py @@ -32,6 +32,8 @@ default_config_data = { 'description': '', 'disable': False, 'intf': '', + 'ip_arp_cache_tmo': 30, + 'ip_proxy_arp': 0, 'mtu': 1450, 'remote': '' } @@ -66,6 +68,14 @@ def get_config(): if conf.exists('disable'): geneve['disable'] = True + # ARP cache entry timeout in seconds + if conf.exists('ip arp-cache-timeout'): + geneve['ip_arp_cache_tmo'] = int(conf.return_value('ip arp-cache-timeout')) + + # Enable proxy-arp on this interface + if conf.exists('ip enable-proxy-arp'): + geneve['ip_proxy_arp'] = 1 + # Maximum Transmission Unit (MTU) if conf.exists('mtu'): geneve['mtu'] = int(conf.return_value('mtu')) @@ -124,6 +134,11 @@ def apply(geneve): # Maximum Transfer Unit (MTU) v.set_mtu(geneve['mtu']) + # configure ARP cache timeout in milliseconds + v.set_arp_cache_tmo(geneve['ip_arp_cache_tmo']) + # Enable proxy-arp on this interface + v.set_proxy_arp(geneve['ip_proxy_arp']) + # Configure interface address(es) - no need to implicitly delete the # old addresses as they have already been removed by deleting the # interface above -- cgit v1.2.3