Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to create a LAN network using Wifi router with the static system name

Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using VMware Player 7.1. I have setup a Ubuntu Virtual Machine using VMWare Player. I have kept the Network dapter as Bridge. My Physical system is running on Windows 7. I am using WIFI Router to connect Internet. I am able to access internet from both of my physical and Virtual systems. Now the IP addresses varies whenever I am connecting Internet. I am also able to access Ubuntu to Windows and Windows to Ubuntu system via IP addresses.

Now I want to use Hostname rather IP addresses, so that I need not to change addresses everytime I reboot. Can anybody help me regarding this. Please let me know if you need any further information.

Posts: 9626
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The easiest thing to do with only two systems would be to add your host name and internal IP address to your computer's and VM's host files. You will also have to configure the OS's to use a static IP address.
If you had more than two computers or were looking or a challenge, you could set up your own local DNS. This saves you the trouble of changing each computer's hosts file.
Saloon Keeper
Posts: 24847
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are DNS servers that can capture dynamic IP assignments and map them to hostnames. I've not used them, but they are fairly popular. I use other methods.

I cannot control what my external IP address is going to be (router-to-WAN), but my router's LAN IP address is the gateway to a local subnet (192.168.10.x). In other words, the router is doing NAT functions. The WAN router is plugged into a Wifi router that has a built-in switch.

What I did was configure the Wifi router to hard-wire certain devices (MAC addresses) to fixed IP addresses. For example, my desktop lives at So I can code "" in the /etc/hosts file like this:

Any other machine can also repeat this line in that machine's /etc/hosts file (or the Windows equivalent), thereby allowing me the ability to address mydesktop by name instead of just by IP address.

You can do the same with a bridged VM. Typically when you generate a VM with a network interface, it gets a unique MAC address permanently assigned to it. If it doesn't, there should be an option to permanently assign a MAC address of your choosing to that VM.

The behavior for a bridged VM will be exactly the same as a physical machine as far as the switch and /etc/hosts files are concerned.

Because I've made the assignment in the switch, I can be assured that DHCP will provision the appropriate IP address without me actually having to configure a static IP in the VM's /etc/network config.
    Bookmark Topic Watch Topic
  • New Topic