Page 1 of 1

Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 12:28
by DarkRanger
Can anyone tell me how to create a static IP on Ubuntu Server 9.10

I tried the following:

Code: Select all

sudo cp /etc/network/interfaces ~
To back up the original interfaces

Code: Select all

sudo vi /etc/network/interfaces
To open it in a text editor

Then I added the following:

Code: Select all

iface eth0 inet static
address 196.192.0.215
netmask 255.255.25.0
gateway 196.192.0.10
And rebooted the server, but no luck what so ever...

Re: Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 12:44
by RuadRauFlessa
try

Code: Select all

sudo apt-get remove network-manager network-manager-gnome
Apparently the issue is the Network Manager which reconfigures the network interfaces once it starts. Either stop it from starting or remove it completely.

Re: Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 12:54
by DarkRanger
Oh yeah, also tried that step before posting. Neither of the two packages were installed.

Re: Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 13:05
by RuadRauFlessa
hmm no idea then. It should have worked.

does the ifup and ifdown commands work?

Re: Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 14:12
by DarkRanger
ifup doesn't work.

Tried it again now:

Code: Select all

sudo ifup -a
gives the following:

Code: Select all

Don't seem to be have all the variables for eth0/inet.
Failed to bring up eth0.
Exactly like that. Bad grammar included. :lol:

EDIT: After this I tried

Code: Select all

sudo ifdown -a
again and it didn't give any output (where it would normally say no such process)

Re: Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 14:35
by RuadRauFlessa
Please post the whole /etc/network/interfaces file contents.

Re: Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 14:49
by DarkRanger
So I did a ifconfig -a and this is the output.

Code: Select all

eth0           Link encap:Ethernet  HWaddr 00:13:20:a4:44:ee
               BROADCAST MULTICAST  MTU:1500  Metric:1
               RX packets:0 errors:0 dropped:0 overruns:0 frame:0
               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:1000
               RX bytes:0 (0.0 B) TX bytes:0 (0.0B)
contents of interfaces file:

Code: Select all

# 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
address 196.192.0.215
submask 255.255.255.0
gateway 196.192.0.10

Re: Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 14:53
by RuadRauFlessa
Try

Code: Select all

# 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
address 196.192.0.215
netmask 255.255.255.0
gateway 196.192.0.10

Re: Static IP on Ubuntu Server 9.10

Posted: 17 Mar 2010, 14:57
by DarkRanger
submask changes to netmask? Is that all? Coz that's all I see. :lol:

EDIT:

THANK YOU!! :D

Re: Static IP on Ubuntu Server 9.10

Posted: 18 Mar 2010, 09:56
by RuadRauFlessa
Ye that is the only change I could find.