Answers: <p>eth0 is used by vagrant for nat configuration in order to establish portforwarding. eth1 private networks that you have configured should allow you to ping/nslookup from one node to another. You can use the following to customize the ip of the nat but I don't see why would you do that:</p>
  
  <pre><code>config.vm.provider "virtualbox" do |vbx|
    vbx.customize ['modifyvm', :id, '--natnet1', '192.168.169.0/24']
  end
  </code></pre>
  
  <p>Update: tested your setup it doesn't work, this is some CentOS 8 specifics.</p>
  
Answers: CC BY-SA 4.0
Answers: 2020-06-07T16:17:45.623Z
Answers: why vagrant sets eth0 on all the machines deployed to the same IP 10.0.2.15? 
  I found a workaround and not configuring the private network in the vagrantfile  to the same range as the nat network allows the machines to be reacheable. so doing this; `ldap.vm.network "private_network", ip: "192.168.2.100" ` works
Answers: danidar
Answers: CC BY-SA 4.0
Answers: 2020-06-04T11:33:14.187Z
Answers: 2020-06-07T12:55:12.730Z
Answers: 2020-06-07T12:55:12.730Z
Answers: anVzdGFub3RoZXJodW1hbg
Body: <p>I have a problem with vagrant that is running on windows 10 when I deploy centos 8 machines all the machines have eth0 with the same Ip and they cannot communicate with each other </p>
  
  <p>the ip 10.0.2.15 is always present. this is the vagrant file: </p>
  
  <pre><code>Vagrant.configure("2") do |config|
    # The most common configuration options are documented and commented below.
    # For a complete reference, please see the online documentation at
    # https://docs.vagrantup.com.
  
    # Every Vagrant development environment requires a box. You can search for
    # boxes at https://vagrantcloud.com/search.
    config.vm.define "ansible" do |ansible|
      ansible.vm.box = "bento/centos-8.1"
      ansible.vm.hostname = "ansible"
      ansible.vm.network "private_network", ip: "10.0.2.10"
    end
  
    config.vm.define "ldap" do |ldap|
      ldap.vm.box = "bento/centos-8.1"
      ldap.vm.hostname = "ldap"
      ldap.vm.network "private_network", ip: "10.0.2.100"
    end
  </code></pre>
  
  <p>and this is the ip configuration on the first machine; </p>
  
  <pre><code>[vagrant@ansible ~]$ ip a
  1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever
  2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000
      link/ether 52:54:00:72:fe:6e brd ff:ff:ff:ff:ff:ff
      inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute eth0
         valid_lft 86077sec preferred_lft 86077sec
      inet6 fe80::5054:ff:fe72:fe6e/64 scope link
         valid_lft forever preferred_lft forever
  3: eth1: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000
      link/ether 08:00:27:91:b2:04 brd ff:ff:ff:ff:ff:ff
      inet 10.0.2.10/24 brd 10.0.2.255 scope global noprefixroute eth1
         valid_lft forever preferred_lft forever
      inet6 fe80::a00:27ff:fe91:b204/64 scope link
         valid_lft forever preferred_lft forever
  
  [vagrant@ansible ~]$ ip route show
  default via 10.0.2.2 dev eth0 proto dhcp metric 100
  10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 metric 100
  10.0.2.0/24 dev eth1 proto kernel scope link src 10.0.2.10 metric 101
  </code></pre>
  
  <p>is it getting eth0 by dhcp? and then assigning the ip i want to eth1? is there something i can do with virtualbox configuration on windows? </p>
  
  <p>i need both machines to see each other </p>
  
Tags: <windows><vagrant><centos>
Title: vagrant on windows 10 incorrect network configuration on multi-machine setup
UserDisplayName: danidar
ThreadText: # vagrant on windows 10 incorrect network configuration on multi-machine setup
  
  (Asked by: username_0 on 2020-06-02)
  
  I have a problem with vagrant that is running on windows 10 when I deploy centos 8 machines all the machines have eth0 with the same Ip and they cannot communicate with each other
  
  the ip 10.0.2.15 is always present. this is the vagrant file:
  
  ```
  Vagrant.configure("2") do |config|
    # The most common configuration options are documented and commented below.
    # For a complete reference, please see the online documentation at
    # https://docs.vagrantup.com.
  
    # Every Vagrant development environment requires a box. You can search for
    # boxes at https://vagrantcloud.com/search.
    config.vm.define "ansible" do |ansible|
      ansible.vm.box = "bento/centos-8.1"
      ansible.vm.hostname = "ansible"
      ansible.vm.network "private_network", ip: "10.0.2.10"
    end
  
    config.vm.define "ldap" do |ldap|
      ldap.vm.box = "bento/centos-8.1"
      ldap.vm.hostname = "ldap"
      ldap.vm.network "private_network", ip: "10.0.2.100"
    end
  
  ```
  
  and this is the ip configuration on the first machine;
  
  ```
  [vagrant@ansible ~]$ ip a
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
      inet 127.0.0.1/8 scope host lo
         valid_lft forever preferred_lft forever
      inet6 ::1/128 scope host
         valid_lft forever preferred_lft forever
  2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
      link/ether 52:54:00:72:fe:6e brd ff:ff:ff:ff:ff:ff
      inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute eth0
         valid_lft 86077sec preferred_lft 86077sec
      inet6 fe80::5054:ff:fe72:fe6e/64 scope link
         valid_lft forever preferred_lft forever
  3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
      link/ether 08:00:27:91:b2:04 brd ff:ff:ff:ff:ff:ff
      inet 10.0.2.10/24 brd 10.0.2.255 scope global noprefixroute eth1
         valid_lft forever preferred_lft forever
      inet6 fe80::a00:27ff:fe91:b204/64 scope link
         valid_lft forever preferred_lft forever
  
  [vagrant@ansible ~]$ ip route show
  default via 10.0.2.2 dev eth0 proto dhcp metric 100
  10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15 metric 100
  10.0.2.0/24 dev eth1 proto kernel scope link src 10.0.2.10 metric 101
  
  ```
  
  is it getting eth0 by dhcp? and then assigning the ip i want to eth1? is there something i can do with virtualbox configuration on windows?
  
  i need both machines to see each other
  
  **Tags:** windows, vagrant, centos
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-06-04. Score: 2 | Accepted answer
  
  eth0 is used by vagrant for nat configuration in order to establish portforwarding. eth1 private networks that you have configured should allow you to ping/nslookup from one node to another. You can use the following to customize the ip of the nat but I don't see why would you do that:
  
  ```
  config.vm.provider "virtualbox" do |vbx|
    vbx.customize ['modifyvm', :id, '--natnet1', '192.168.169.0/24']
  end
  
  ```
  
  Update: tested your setup it doesn't work, this is some CentOS 8 specifics.
  
  > **Comments:**
  > **username_0**: why vagrant sets eth0 on all the machines deployed to the same IP 10.0.2.15?  I found a workaround and not configuring the private network in the vagrantfile  to the same range as the nat network allows the machines to be reacheable. so doing this; `ldap.vm.network "private_network", ip: "192.168.2.100" ` works  
  
  ---
  
  