Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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.

Thanks,
Debashis
 
Bartender
Posts: 9612
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • 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: 21587
146
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • 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 192.168.10.4. So I can code "mydesktop.mousetech.com" 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.
 
Being a smart alec beats the alternative. This tiny ad knows what I'm talking about:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!