Ubuntu Static IP

by Vivek Gite on February 15, 2008 · 1 comment

Q. I've Intel Corporation 80003ES2 LAN Gigabit Ethernet Controller. How do I set static IP address settings for my Ubuntu Linux as follows:

DEVICE name : eth0
Type: static
IP ADDR : 10.10.29.66
NETMASK : 255.255.255.192
Router IP: 10.10.29.65
Broadcast: 10.10.29.127

How do I setup static IP address under Ubuntu?

A. Ubuntu Linux stores all network configuration option in /etc/network/interfaces configuration file. You need to open this file using a text editor such as vi or gedit.

Open terminal (command line)

Type the following command:
sudo vi /etc/network/interfaces
OR
sudo gedit /etc/network/interfaces
Make the changes as follows:

auto eth0
iface eth0 inet static
address 10.10.29.66
netmask 255.255.255.192
network 10.10.29.65
broadcast 10.10.29.127
gateway 10.10.29.65

Save and close the file. Restart networking:
$ sudo /etc/init.d/networking restart

See more Ubuntu Linux networking examples here.

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 1 comment… read it below or add one }

1 John June 22, 2009

Your missing the DNS entry in /etc/resolv.conf.

nameserver XXX.XXX.XXX.XXX

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 6 + 14 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: