Debian 6 | Nagios XI | Change to static Ip

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
markers
Posts: 58
Joined: Wed Aug 31, 2011 2:12 am

Debian 6 | Nagios XI | Change to static Ip

Post by markers »

Hi!

When I look at my subject field it dawns on me: this shouldn't be very hard should it?

Changing the IP-address isn't supposed to be hard? I have done this a million times before, and if there is one thing evolution has told us is that:
Changing the Ip-address on Debian 6 isn't hard.

Why can't I accomplish this? This shit is making me crazy like old Yeller in the end. Or Cujo, the cute St. Bernhard which goes quite mental after it's owner doesn't bother to give him rabies vaccine. But who could have known?

Anyway, I try this: ifconfig eth0 10.x.x.x netmask 255.255.255.0 up and when I do the world famous: ifconfig eth0 I get the exact Ip-address I have typed in.

When I reboot the virtual server, the old Ip-address shows up, no matter what I do.

The thing is that I have changed to another subnet, and the old Ip doesn't work anymore...

Help me, Obi-Wan Kenobi, you are my only hope.

Markers
SDohmen
Posts: 240
Joined: Thu Jun 30, 2011 4:14 am

Re: Debian 6 | Nagios XI | Change to static Ip

Post by SDohmen »

Why not do the following:

Login
vi /etc/network/interfaces

Comment (adapt of course):
allow-hotplug eth0
iface eth0 inet dhcp

add the following (adapt of course):
auto eth0
iface eth0 inet static
address 192.168.40.9
netmask 255.255.255.0
network 192.168.40.0
broadcast 192.168.40.254
gateway 192.168.40.1

save and quit
reboot and be done
Locked