1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

Add default MTU for the VXLAN interface (#174)

F  #4958:  Add default MTU for VXLAN interfaces
This commit is contained in:
Guillaume Oberlé 2016-12-28 00:30:24 +01:00 committed by Ruben S. Montero
parent 7920843308
commit 2f1a6b4a70
2 changed files with 3 additions and 1 deletions

View File

@ -40,3 +40,5 @@
:vxlan_mc: 239.0.0.0
# Time To Live (TTL) should be > 1 in routed multicast networks (IGMP)
:vxlan_ttl: 16
# Default MTU for the VXLAN interface
:vxlan_mtu: 1500

View File

@ -45,7 +45,7 @@ class VXLANDriver < VNMMAD::VLANDriver
def create_vlan_dev
mc = VNMMAD::VNMNetwork::IPv4.to_i(CONF[:vxlan_mc]) + @nic[:vlan_id].to_i
mcs = VNMMAD::VNMNetwork::IPv4.to_s(mc)
mtu = @nic[:mtu] ? "mtu #{@nic[:mtu]}" : ""
mtu = @nic[:mtu] ? "mtu #{@nic[:mtu]}" : "mtu #{CONF[:vxlan_mtu]}"
ttl = CONF[:vxlan_ttl] ? "ttl #{CONF[:vxlan_ttl]}" : ""
OpenNebula.exec_and_log("#{command(:ip)} link add #{@nic[:vlan_dev]}"\