Ubuntu Static IP

by on February 15, 2008 · 2 comments· LAST UPDATED December 15, 2008

in , ,

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.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 2 comments… read them below or add one }

1 John June 22, 2009 at 12:19 am

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

nameserver XXX.XXX.XXX.XXX

Reply

2 gitan April 3, 2013 at 9:12 am

Nice info .

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: