Configuring Ubuntu for a static IP address

The next thing we need to do is to set the network with your static IP addresses. First, edit the /etc/network/interfaces to include the following.

#   /etc/network/interfaces
 auto eth0
 iface eth0 inet static
 address xxx.xxx.xxx.xxx
 gateway xxx.xxx.xxx.xxx
 netmask xxx.xxx.xxx.xxx

This assumes you want the ethernet card on eth0 configured.  After this, we need to configure the primary and secondary DNS servers

#   /etc/resolve.conf
 nameserver xxx.xxx.xxx.xxx
 nameserver xxx.xxx.xxx.xxx

After these are set, you need to restart the networking

sudo /etc/init.d/networking restart

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>