Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I'm running a ubuntu virtual machine (using vmware), and I noticed every time I restart my vm, my IP changes, is there a way to set it static? I looked over a few links and they all tell me to change it to static and something about changing the DHCP server to return static IP. Any help would be greatly appreciated.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

You need to say how you have configured the virtual network.

Either the host is supplying the address or, more likely in this case, you have a DCHP server supplying it.

In the latter case, firstly you need to identify the DHCP server. For home/small networks, the most common configuration is for your router to be the DHCP server.

If that is the case, now we need to know what router you are using as the settings are different for each router.

On my own Billion, for example, I have to identify the MAC address of the device who's address I want to fix. Then I need to enter this into a "fixed host" setting screen.

The virtual mac address can be found on the VM with the command nm-tool. Look for the "HW Address" (it is a list of 6 Hex double-digits). Or it can be found in the connection information box (click on the network icon in the top menu bar, select "Connection Information".

You could, as an alternative, simply reconfigure the VM with a fixed IP address. Personally I don't recommend this as it is very easy to loose track of addresses. If you do want to though, assuming this is an Ubuntu desktop, open the network settings from the icon on the top menu bar and change the IPv4 settings from "Automatic (DHCP)" to "Manual". Then enter the desired IP address, mask (usually 255.255.255.0) and default gateway (usually the IP address of your router).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.