Static IP on Ubuntu Server 9.10

Discussion and support for all Linux distributions and Unix flavours (FreeBSD, OpenBSD, etc).
Post Reply
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Static IP on Ubuntu Server 9.10

Post 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...
Image
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Static IP on Ubuntu Server 9.10

Post 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.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Static IP on Ubuntu Server 9.10

Post by DarkRanger »

Oh yeah, also tried that step before posting. Neither of the two packages were installed.
Image
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Static IP on Ubuntu Server 9.10

Post by RuadRauFlessa »

hmm no idea then. It should have worked.

does the ifup and ifdown commands work?
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Static IP on Ubuntu Server 9.10

Post 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)
Image
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Static IP on Ubuntu Server 9.10

Post by RuadRauFlessa »

Please post the whole /etc/network/interfaces file contents.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Static IP on Ubuntu Server 9.10

Post 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
Image
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Static IP on Ubuntu Server 9.10

Post 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
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
DarkRanger
Registered User
Posts: 8346
Joined: 10 May 2006, 02:00
Processor: Intel i5-3750
Motherboard: Gigabyte
Graphics card: nVidia GTX 550Ti
Memory: 8GB Jetram
Contact:

Re: Static IP on Ubuntu Server 9.10

Post by DarkRanger »

submask changes to netmask? Is that all? Coz that's all I see. :lol:

EDIT:

THANK YOU!! :D
Image
RuadRauFlessa
Registered User
Posts: 20576
Joined: 19 Sep 2003, 02:00
Location: Bloodbank

Re: Static IP on Ubuntu Server 9.10

Post by RuadRauFlessa »

Ye that is the only change I could find.
:rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock: :rock:
Spoiler (show)
Intel Core i7-2600k @ 3.4GHz
Corsair Vengence 2x4GB DDR3 2000MHz
Thermaltake Toughpower 850W
ASUS nVidia GTX560 1GB
CoolerMaster HAF 932
Post Reply