Monday, March 3, 2014

Setting Static IP for Ubuntu

After installing  Ubuntu, IP address is usually configured to use DHCP. It is a good idea if you install Ubuntu Desktop (including Kubuntu, Lubuntu...). However, you may not want the IP address change all the time for a Ubuntu server.

I have an example configuration of "interfaces" file for reference. Hope this help you. I have tested this configuration on Ubuntu 12.04 LTS or above.

Notes: you can find it at /etc/network/  folder

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static                            #define this interface use static IP address
        address 10.0.0.50                        #IP address
        netmask 255.0.0.0                       #Subnet Mask
        gateway 10.0.0.1                         #default route
        dns-nameservers 8.8.8.8              #DNS server


Comment are welcome :)











       

No comments:

Post a Comment