diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-11-24 10:51:54 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-11-24 11:01:08 +0100 |
commit | 762e0922eec583c011c5fb834ad8a22971bc96b5 (patch) | |
tree | 4f7e2538618e3c96b949b9503d5f445e1ccbf696 | |
parent | 9fc971e6945ed97a88a441053cae6a5f9b57ee00 (diff) | |
download | vyos-1x-762e0922eec583c011c5fb834ad8a22971bc96b5.tar.gz vyos-1x-762e0922eec583c011c5fb834ad8a22971bc96b5.zip |
geneve: T1799: add IPv4 routing parameters
-rw-r--r-- | interface-definitions/interfaces-geneve.xml | 26 | ||||
-rwxr-xr-x | src/conf_mode/interfaces-geneve.py | 15 |
2 files changed, 41 insertions, 0 deletions
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 @@ <valueless/> </properties> </leafNode> + <node name="ip"> + <properties> + <help>IPv4 routing parameters</help> + </properties> + <children> + <leafNode name="arp-cache-timeout"> + <properties> + <help>ARP cache entry timeout in seconds</help> + <valueHelp> + <format>1-86400</format> + <description>ARP cache entry timout in seconds (default 30)</description> + </valueHelp> + <constraint> + <validator name="numeric" argument="--range 1-86400"/> + </constraint> + <constraintErrorMessage>ARP cache entry timeout must be between 1 and 86400 seconds</constraintErrorMessage> + </properties> + </leafNode> + <leafNode name="enable-proxy-arp"> + <properties> + <help>Enable proxy-arp on this interface</help> + <valueless/> + </properties> + </leafNode> + </children> + </node> <leafNode name="mtu"> <properties> <help>Maximum Transmission Unit (MTU)</help> 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 |