Configuring Ubuntu for a static IP address

Posted by jason on Dec 21, 2009 in Ubuntu |

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

Reply

Powered by WP Hashcash

Copyright © 2010 programming with passion All rights reserved. Theme by Laptop Geek.