Vagrant issue - able to communicate between private networks









up vote
0
down vote

favorite












I've run into an issue while using Vagrant.



I have to boxes and I've configured them to be part of different virtualbox internal networks (relevant config below):



Dataplane port



 vsrx1.vm.network 'private_network', auto_config: false, nic_type: '82540EM', virtualbox__intnet: **"seg1"**
end


Dataplane port



 vsrx3.vm.network 'private_network', auto_config: false, nic_type: '82540EM', virtualbox__intnet: **"seg2"**
end


However, the hosts are able to communicate with one another (they have IPs from the same subnet), although they belong to different private networks.



Does anyone know why?



Thanks,
Cristian










share|improve this question





















  • You may have better success on superuser or serverfault.
    – Matt Schuchard
    Nov 9 at 13:51










  • Thanks Matt, I'll try there as well.
    – jitter
    Nov 9 at 15:02














up vote
0
down vote

favorite












I've run into an issue while using Vagrant.



I have to boxes and I've configured them to be part of different virtualbox internal networks (relevant config below):



Dataplane port



 vsrx1.vm.network 'private_network', auto_config: false, nic_type: '82540EM', virtualbox__intnet: **"seg1"**
end


Dataplane port



 vsrx3.vm.network 'private_network', auto_config: false, nic_type: '82540EM', virtualbox__intnet: **"seg2"**
end


However, the hosts are able to communicate with one another (they have IPs from the same subnet), although they belong to different private networks.



Does anyone know why?



Thanks,
Cristian










share|improve this question





















  • You may have better success on superuser or serverfault.
    – Matt Schuchard
    Nov 9 at 13:51










  • Thanks Matt, I'll try there as well.
    – jitter
    Nov 9 at 15:02












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I've run into an issue while using Vagrant.



I have to boxes and I've configured them to be part of different virtualbox internal networks (relevant config below):



Dataplane port



 vsrx1.vm.network 'private_network', auto_config: false, nic_type: '82540EM', virtualbox__intnet: **"seg1"**
end


Dataplane port



 vsrx3.vm.network 'private_network', auto_config: false, nic_type: '82540EM', virtualbox__intnet: **"seg2"**
end


However, the hosts are able to communicate with one another (they have IPs from the same subnet), although they belong to different private networks.



Does anyone know why?



Thanks,
Cristian










share|improve this question













I've run into an issue while using Vagrant.



I have to boxes and I've configured them to be part of different virtualbox internal networks (relevant config below):



Dataplane port



 vsrx1.vm.network 'private_network', auto_config: false, nic_type: '82540EM', virtualbox__intnet: **"seg1"**
end


Dataplane port



 vsrx3.vm.network 'private_network', auto_config: false, nic_type: '82540EM', virtualbox__intnet: **"seg2"**
end


However, the hosts are able to communicate with one another (they have IPs from the same subnet), although they belong to different private networks.



Does anyone know why?



Thanks,
Cristian







vagrant virtualbox private-network






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 9 at 12:50









jitter

62




62











  • You may have better success on superuser or serverfault.
    – Matt Schuchard
    Nov 9 at 13:51










  • Thanks Matt, I'll try there as well.
    – jitter
    Nov 9 at 15:02
















  • You may have better success on superuser or serverfault.
    – Matt Schuchard
    Nov 9 at 13:51










  • Thanks Matt, I'll try there as well.
    – jitter
    Nov 9 at 15:02















You may have better success on superuser or serverfault.
– Matt Schuchard
Nov 9 at 13:51




You may have better success on superuser or serverfault.
– Matt Schuchard
Nov 9 at 13:51












Thanks Matt, I'll try there as well.
– jitter
Nov 9 at 15:02




Thanks Matt, I'll try there as well.
– jitter
Nov 9 at 15:02












1 Answer
1






active

oldest

votes

















up vote
0
down vote













From the vagrant book




NAT Requirement As the First Network Interface



With VirtualBox,
Vagrant requires the first network device attached to the virtual
machine to be a NAT device. The NAT device is used for port
forwarding, which is how Vagrant gets SSH access to the virtual
machine.



Therefore, any host-only or bridged networks will be added as
additional network devices and exposed to the virtual machine as
“eth1,” “eth2,” and so on. “eth0” or “en0” is generally always the NAT
device.



It isn’t currently possible to override this requirement, but it is
important to understand that it is in place.




this first network interface is not set from Vagrantfile, if you ssh into the VM and check the network of the VM, you will see this first network interface used by the host to communicate with the VM (so you can ssh)






share|improve this answer




















  • Thanks Frédéric, I really appreciate the answer. However, traffic is not going through the NAT ports (I'm doing traceroute and the destination is only one hop away).
    – jitter
    17 hours ago










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53226036%2fvagrant-issue-able-to-communicate-between-private-networks%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













From the vagrant book




NAT Requirement As the First Network Interface



With VirtualBox,
Vagrant requires the first network device attached to the virtual
machine to be a NAT device. The NAT device is used for port
forwarding, which is how Vagrant gets SSH access to the virtual
machine.



Therefore, any host-only or bridged networks will be added as
additional network devices and exposed to the virtual machine as
“eth1,” “eth2,” and so on. “eth0” or “en0” is generally always the NAT
device.



It isn’t currently possible to override this requirement, but it is
important to understand that it is in place.




this first network interface is not set from Vagrantfile, if you ssh into the VM and check the network of the VM, you will see this first network interface used by the host to communicate with the VM (so you can ssh)






share|improve this answer




















  • Thanks Frédéric, I really appreciate the answer. However, traffic is not going through the NAT ports (I'm doing traceroute and the destination is only one hop away).
    – jitter
    17 hours ago














up vote
0
down vote













From the vagrant book




NAT Requirement As the First Network Interface



With VirtualBox,
Vagrant requires the first network device attached to the virtual
machine to be a NAT device. The NAT device is used for port
forwarding, which is how Vagrant gets SSH access to the virtual
machine.



Therefore, any host-only or bridged networks will be added as
additional network devices and exposed to the virtual machine as
“eth1,” “eth2,” and so on. “eth0” or “en0” is generally always the NAT
device.



It isn’t currently possible to override this requirement, but it is
important to understand that it is in place.




this first network interface is not set from Vagrantfile, if you ssh into the VM and check the network of the VM, you will see this first network interface used by the host to communicate with the VM (so you can ssh)






share|improve this answer




















  • Thanks Frédéric, I really appreciate the answer. However, traffic is not going through the NAT ports (I'm doing traceroute and the destination is only one hop away).
    – jitter
    17 hours ago












up vote
0
down vote










up vote
0
down vote









From the vagrant book




NAT Requirement As the First Network Interface



With VirtualBox,
Vagrant requires the first network device attached to the virtual
machine to be a NAT device. The NAT device is used for port
forwarding, which is how Vagrant gets SSH access to the virtual
machine.



Therefore, any host-only or bridged networks will be added as
additional network devices and exposed to the virtual machine as
“eth1,” “eth2,” and so on. “eth0” or “en0” is generally always the NAT
device.



It isn’t currently possible to override this requirement, but it is
important to understand that it is in place.




this first network interface is not set from Vagrantfile, if you ssh into the VM and check the network of the VM, you will see this first network interface used by the host to communicate with the VM (so you can ssh)






share|improve this answer












From the vagrant book




NAT Requirement As the First Network Interface



With VirtualBox,
Vagrant requires the first network device attached to the virtual
machine to be a NAT device. The NAT device is used for port
forwarding, which is how Vagrant gets SSH access to the virtual
machine.



Therefore, any host-only or bridged networks will be added as
additional network devices and exposed to the virtual machine as
“eth1,” “eth2,” and so on. “eth0” or “en0” is generally always the NAT
device.



It isn’t currently possible to override this requirement, but it is
important to understand that it is in place.




this first network interface is not set from Vagrantfile, if you ssh into the VM and check the network of the VM, you will see this first network interface used by the host to communicate with the VM (so you can ssh)







share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









Frédéric Henri

32.5k55079




32.5k55079











  • Thanks Frédéric, I really appreciate the answer. However, traffic is not going through the NAT ports (I'm doing traceroute and the destination is only one hop away).
    – jitter
    17 hours ago
















  • Thanks Frédéric, I really appreciate the answer. However, traffic is not going through the NAT ports (I'm doing traceroute and the destination is only one hop away).
    – jitter
    17 hours ago















Thanks Frédéric, I really appreciate the answer. However, traffic is not going through the NAT ports (I'm doing traceroute and the destination is only one hop away).
– jitter
17 hours ago




Thanks Frédéric, I really appreciate the answer. However, traffic is not going through the NAT ports (I'm doing traceroute and the destination is only one hop away).
– jitter
17 hours ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53226036%2fvagrant-issue-able-to-communicate-between-private-networks%23new-answer', 'question_page');

);

Post as a guest














































































Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo