Skip to content

Commit

Permalink
Add default MTU for the VXLAN interface (#174)
Browse files Browse the repository at this point in the history
F  #4958:  Add default MTU for VXLAN interfaces
  • Loading branch information
goberle authored and rsmontero committed Dec 27, 2016
1 parent 7920843 commit 2f1a6b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/vnm_mad/remotes/OpenNebulaNetwork.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/vxlan/vxlan_driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def initialize(vm, xpath_filter = nil, deploy_id = nil)
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]}"\
Expand Down

0 comments on commit 2f1a6b4

Please sign in to comment.