Hadoop: multiple nodes with same IP

492 Views Asked by At

I've installed oracle virtual box on windows 8, and want's go for clustering with multiple nodes. - created one master node - created two slave nodes

Now for clustering as it requires IP address of all the nodes but in my case it is showing same IP for all the nodes. [ IP viewed using ifconfig command and it is same for all nodes installed on VM 10.0.2.15 ]

How do I get different IPs for each node?

1

There are 1 best solutions below

0
On

Create a Host-Only network in virtual box. When creating a vm, configure two network adapters, one attached to NAT (for external connectivity) and the other attached to Host-Only adapter. In your Host-Only adapter, select the name of host-only network you created earlier.

Fire up the VMs, still you wont see an IP assigned for your host-only network. You have to manually add static IPs for your Host-Only network. Assuming you are using Ubuntu and your host-only network is on eth0, you have to add the static IP settings in /etc/network/interfaces file. In the following example the CIDR notation of my host-only network is 10.20.20.0/24

auto eth0
iface eth0 inet static

gateway 10.20.20.1

#IP you want to assign to this VM
address 10.20.20.2 

#netmask of your host-only network 
netmask 255.255.255.0

Save and close the /etc/network/interfaces file

Run: sudo ifup eth0

then check in ifconfig, an ipaddress would have been assigned to eth0