Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to move NAT adapter as 2nd interface (not 1st and default one) #9030

Closed
ReSearchITEng opened this issue Oct 4, 2017 · 3 comments
Closed

Comments

@ReSearchITEng
Copy link

Expected behavior

For bridged (public_network), there should be an option (if not the default one) to make the NAT adaptor 2nd, and bridged adaptor the 1st one, while still being able to connect to the machine.

If we try this now:

  config.vm.network "public_network", :adapter=>1 , type: "dhcp", :bridge => "enp3s0"

Vagrant is not able to connect to the machine any longer, as it does not

==> ktmp-master: Preparing network interfaces based on configuration...
    ktmp-master: Adapter 1: bridged
[...]
==> ktmp-master: Running 'pre-boot' VM customizations...
==> ktmp-master: Booting VM...
==> ktmp-master: Waiting for machine to boot. This may take a few minutes...
    ktmp-master: SSH address: 127.0.0.1:22
    ktmp-master: SSH username: vagrant
    ktmp-master: SSH auth method: private key
    ktmp-master: Warning: Authentication failure. Retrying...
    ktmp-master: Warning: Authentication failure. Retrying...
[...]
Timed out while waiting for the machine to boot.

not interfere with the box's networking definitions

Actual behavior

No methods for both vagrant and user to connect to the VM.

Steps to reproduce

 config.vm.network "public_network", :adapter=>1 , type: "dhcp", :bridge => "enp3s0"

References

There are few issues which were closed as "old", currently no solution for any of them:

@chrisroberts
Copy link
Member

Hi there,

Thanks for creating this issue. I'm going to close this as Vagrant's behavior is built to use the first adapter as the NAT adapter for communication. Changing this changes internal behavior of Vagrant, and I'm not sure that such a large modification is worth the gain of being able to rearrange the network adapters within the guest. If there are strong reasons why this should be supported, I'm very happy to consider them. Cheers!

@ddayan
Copy link

ddayan commented Jul 6, 2018

Is it possible to use UPNP without making the bridged network the first adapter?

@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants