Jump to content

My Ubuntu box, moodle, won't keep its IP address on reboot?


Recommended Posts

Posted

My moodle server had a power supply problem this morning and crashed. I swapped out the the hard drive to a new machine and booted up again. I had a few errors about NFS not mounting and realised that even though I had given the Ip address in DHCp the box was not getting it.

 

I found that if I type ifconfig eth1 10.60.25.25 that the box gets that Ip and is happy until I reboot and then it loses it again. :mad:

 

Can anyone suggest what might be happening here?

 

thanks

Posted

I'd set the static IP address in /etc/network/interfaces.

 

auto eth1
iface eth1 inet static
       address 10.60.25.25
       netmask 255.0.0.0
       network 10.0.0.0
       gateway 10.0.0.1

 

Replace other IPs with ones to match your network.

 

You can then do sudo /etc/init.d/networking restart followed by ifconfig eth1 to check that it's being set.

  • Thanks 1
Posted

Thanks Webman,

When I went to edit that file I found

 

auto eth0

iface eth0 inet dhcp

 

so I added

 

auto eth1

iface eth1 inet dhcp

 

below and all is fine.

 

Saved me yet again webman!

Posted

Alternatively, and to save headaches, re-map the device in your udev rules so that it again appears as eth0.

 

This stops your successor going "whaaaat? there's only one card in this machine, it should be eth0".

Posted
Alternatively, and to save headaches, re-map the device in your udev rules so that it again appears as eth0.

 

This stops your successor going "whaaaat? there's only one card in this machine, it should be eth0".

 

That did cross my mind but wasn't sure how to do it and then along came another job!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...