Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

i'm trying to change a static ip assigned to a debian VM. I modified the /etc/network/interfaces file but my debian doesn't seem to like the new settings

currently the machine's ip is set to 192.168.1.136 and i want the machine's ip to be set to 192.168.1.8

here's my modified /etc/network/interfaces :

auto lo
iface lo inet loopback

allow-hotplug eth0

auto eth0
iface eth0 inet static
address 192.168.1.8
gateway 192.168.1.1
netmask 255.255.255.0
share|improve this question
    
The configuration seems OK. Did you restart your network using sudo /etc/init.d/networking restart? –  Khaled Dec 22 '10 at 10:16

3 Answers 3

The Debian way to reloading the networking configuration is :

/etc/init.d/networking restart as root

share|improve this answer
    
except, the script says "force-reload|restart) \n Running $0 $1 is deprecated because it may not enable again some interfaces" –  stew Jan 13 '11 at 4:29

Try

ifdown eth0 ; ifup eth0

to "reload" network config. Or just reboot machine. Also, Debian (and a lot of other distros) by default "binds" given interface MAC to interface name using udev (/etc/udev/rules.d/70-persistent-net.rules) so if you changed MAC of machine correct interface will be eth1 (to "undo it", remove that udev file)

share|improve this answer

Maybe the interface name is not eth0 anymore? Try the following to learn about your interface names:

# ifconfig | grep ^eth

If necessary, change the configuration in /etc/networking/interfaces and restart network:

# /etc/init.d/networking restart

(as root)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.