Setting up a static IP address
UPDATE: I have updated this guide in more detail on my other project site which can be found here: http://draalin.com/setting-up-a-static-ip-address-in-ubuntu/
First of all setting up a static IP address in Ubuntu sever is very easy!
By default your /etc/network/interfaces file will look like this with dhcp already enabled.
sudo vi /etc/network/interfaces
Lets say for example we want to configure our network for:
IP address of 192.168.1.100 (What you want the IP of your ubuntu machine to be)
default mask of 255.255.255.0 (also called /24 – You typically don’t change this)
gateway 192.168.1.1 (This is most likely your home router’s IP address by default)
network 192.168.1.0 (So it knows what network to run on)
broadcast 192.168.1.255 (Where do send its “I don’t know where to go” messages)
dns-nameservers 192.168.1.1 (Will use the DNS server your router uses)
Now lets restart our network service to ensure
sudo /etc/init.d/networking restart
- I recommend doing this at the terminal itself and not through putty or some other program. Nothing like losing access to something 20 miles away!
- If you have DNS issues I recommend using Google’s 18.104.22.168 or 22.214.171.124 over leaving it empty and using you’re local ISP’s.
- If you would like a more in depth guide of setting up a static IP address I recommend you going straight to Ubuntu’s website here