Unable to get an IP static addresses for the VM guests on the LAN

4/29/2020

I am working on setting up a Kubernetes cluster over the network LAN.

Problem: Unable to get an IP static addresses for the VM guests on the LAN.

Settings

Guest OS : Ubuntu

Host OS: Windows10

Firewall settings are disabled on windows 10

Type of network adapter on Virtual Box is bridged

ipconfig on the guest os :

This is the ifconfig result:

enp0s3    Link encap:Ethernet  HWaddr 02:0a:da:58:a4:e2
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a:daff:fe58:a4e2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:875 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:145043 (145.0 KB)  TX bytes:147558 (147.5 KB)

enp0s8    Link encap:Ethernet  HWaddr 08:00:27:5a:a2:41
          inet addr:192.168.3.50  Bcast:192.168.3.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe5a:a241/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:588 (588.0 B)  TX bytes:1064 (1.0 KB)

enp0s9    Link encap:Ethernet  HWaddr 08:00:27:96:2b:80
          inet addr:192.168.2.50  Bcast:192.168.2.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe96:2b80/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:238 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15897 (15.8 KB)  TX bytes:648 (648.0 B)
          Interrupt:17 Base address:0xd260

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1

This a part of my Vagrantfile configuration:

s.vm.network "private_network", ip: "192.168.3.50",virtual_box__intnet: true,# netmask: "255.255.255.0",
      auto_config: true


      s.vm.network "public_network", bridge: "Intel(R) Ethernet Connection I217-LM", ip: "192.168.2.50",# netmask: "255.255.255.0",
      auto_config: true


      s.vm.provider "virtualbox" do |v|

        v.name = vM_NAME
        v.memory = 2048
        v.gui = false
        v.customize ['modifyvm', :id, '--nictype3', 'Am79C973']
        v.customize ['modifyvm', :id, '--nicpromisc3', 'allow-all']
        v.customize ['modifyvm', :id, '--nicpromisc2', 'allow-all']
        v.customize ['modifyvm', :id, '--nicpromisc1', 'allow-all']

Troubleshooting

  1. Tried to ping from the host OS to guest and it worked.

  2. Tried to ping between hosts OS and it worked.

I am trying to have w static ip on the LAN for the Vms (The kubernetes nodes), to join them over the network across different hardware server.

Thank You.

-- kakaroto
kubernetes
networking
vagrant

0 Answers