How to Assign a Static IP to an Ubuntu 10.04 Desktop Computer

If you have a home network with several computers, assigning them static IP addresses can make troubleshooting easier. Today we take a look at switching from DHCP to a static IP in Ubuntu.

Assign a Static IP

Using Static IPs prevents address conflicts between machines and can allow easier access to them. If you have a small home network and are satisfied with the machines getting their IP address automatically via DHCP, there won’t be anything gained by using static addresses.

Using Static IPs isn’t necessarily for the average user, but if you’re a geek who wants to know the address assigned to each machine, it can allow for faster troubleshooting. 

To change your Ubuntu machine to a Static IP go to System \ Preferences \ Network Connections.

1whslinux2

In our example, we’re on a wired system so click on the Wired tab, then select Auto eth0 and click on Edit.

2connectserver2

Select the IPv4 settings tab, change Method to Manual, click the Add button. Then type in the Static IP Address, Subnet Mask, DNS Servers, and Default Gateway. Then click Apply when you’re finished.

Make sure to hit Enter after typing in the Default Gateway otherwise it will revert back to 0.0.0.0

3staticip[3]

You’ll need to enter in your admin password before the changes go into affect.

4static2

To verify the changes have been made successfully launch a Terminal session and type in ifconfig at the command prompt, or follow these directions. You also might want to ping the address from another machine to make sure everything is communicating.

sshot-2010-06-10-[00-52-30][2]

If you want to assign a Static IP to your Windows machines, check out our article on how to assign a Static IP on Windows systems (make sure to browse the comments as our readers have some good suggestions). 

Whether you have a small office or home network set up with a server and several machines, using a Static IP on each device can help you manage them easily. Again, it isn’t for everyone as it really depends on how your network is setup and the way you use it.

Brian Burgess worked in IT for 10 years before pursuing his passion for writing. He's been a tech blogger and journalist for the past seven years, and can be found on his about me page or Google+