I was trying to configure a two node hadoop cluster using ubuntu virtual machines created using VMWare Player [Running on Windows]. The setup worked fine in the beginning, but whenever the network adapter restarted [after VM resume/restart] it used to get a new IP address.

This causes multiple issues, those faced by me were specific to hadoop but any system that requires IP addresses to be entered in some sort of configuration will have to be reconfigured with new IP address each time they change.

Assigning static IP address to each VM is a solution, but I find it a bit time consuming method.There is an easier alternative, that can be done at only one place for all the VMs

VMware networking services running on the host system has a DHCP server, which is responsible for assigning IP addresses to guest machines. When guests are configured to obtain IP address automatically this service assigns them an unused IP from the pool.

Configuration for the DHCP server is maintained in  following file :
 C:\Documents and Settings\All Users\Application Data\VMware\vmnetdhcp.conf

Add one entry for each VM that needs to be given a fix IP address.

host ubuntu {
    hardware ethernet 00:0c:29:c0:2c:58;
    fixed-address 192.168.118.3;


here host [ubuntu] is generally the name of .vmx file of your VM.
hardware ethernet can be found inside .vmx file as value of property "ethernet0.generatedAddress"
fixed-address is the IP address you wish to assign to your VM
 
Once you have entered information for all the nodes, VMWare DHCP service needs to be restarted.
If there are errors in your configuration, service will stop right after the restart. 

Restart networking service on you guest VMs and your VM should get the desired IP address.

If you are finding it difficult to locate correct host and "hardware ethernet" open file vmnetdhcp.leasesX located at "C:\Documents and Settings\All Users\Application Data\VMware\". 
A typical entry looks like this , there will be multiple such entries in the file

lease 192.168.118.142 {
    starts 3 2013/04/24 08:26:35;
    ends 3 2013/04/24 08:56:35;
    hardware ethernet 00:0c:29:c0:2c:58;
    client-hostname "ubuntu";
}


Go back to your VM and check which IP addresses is currently assigned to it. You can easily join this information to get all required parameters.

©2013 Abhijeet Apsunde LinkedIn

4

View comments


Having a website that loads faster is essential for great user experience. Many big and small hosting provider offer this service to their customers, but how do you make sure that you are really getting what you are paying for ? Are your users really experiencing faster page loads with a CDN ?

Lets start by understanding what a CDN is and how it works :

CDN integration helps load your content faster by mainly doing following
  • Terminate incoming connections from your users at data center physically closer to them, thereby reducing TCP and TLS connection overhead time dramatically.
  • Cache and serve static cacheable content closer to users so that it can be served quickly, this includes static html, css, javascript, images, fonts, videos etc.

How do I know it works for me ?

  • Scale and working of a CDN might be overwhelming for an average user let alone finding out if it has been effectively deployed for your website.
  • Best way to measure that effectiveness of your CDN integration is to see how your users see it !
  • This involves measuring your website load times wherever your users are, don't worry you don't have to get machines there , It has been already done for you !
  • Head to https://prober.tech/ and put the resource you want to test in the URL box. All times reports here are in millisecond.





  • This information is also available in tabular format for quick access / sorting  

  • Looking at these numbers , total time taken to the main page for cloudflare.com appears uniform almost everywhere on the globe , which tells me that company that runs CDN for its customers also happened to have enabled it for their own website :) 
  • Now let's look at the numbers for a site that I've hosted in Virginia, USA. In this example as you move physically away from the website (Virginia ) load times keep increasing. This is symptom of a website being served from one fixed physical location and doesn't have a CDN enabled.

Conclusion 

With https://prober.tech/ you can measure your websites / resources load times from across the globe and get sense of how fast your users in or near those area perceive your website to be.



0

Add a comment

Blog Archive
About Me
About Me
Loading
Dynamic Views theme. Powered by Blogger. Report Abuse.