diff --git a/lib/vagrant/action/vm/network.rb b/lib/vagrant/action/vm/network.rb index d2e63b76b..33801c5d7 100644 --- a/lib/vagrant/action/vm/network.rb +++ b/lib/vagrant/action/vm/network.rb @@ -315,7 +315,8 @@ module Vagrant :adapter => nil, :mac => nil, :bridge => nil, - :auto_config => true + :auto_config => true, + :use_dhcp_assigned_default_route => false }.merge(options) end diff --git a/templates/guests/debian/network_dhcp.erb b/templates/guests/debian/network_dhcp.erb index ca3d80c79..24cc1e944 100644 --- a/templates/guests/debian/network_dhcp.erb +++ b/templates/guests/debian/network_dhcp.erb @@ -2,5 +2,7 @@ # The contents below are automatically generated by Vagrant. Do not modify. auto eth<%= options[:interface] %> iface eth<%= options[:interface] %> inet dhcp +<% unless options[:use_dhcp_assigned_default_route] %> post-up route del default dev $IFACE +<% end %> #VAGRANT-END