changed static to dhcp + debian

faisalpandu

VIP Member
VIP Member
Joined
Jan 8, 2007
Messages
1,334
Reaction score
28
Hi

I have a debian server running with static ip on it. I would like to change this into DHCP. could someone tell me the command to change it as it has been ages since i set it up.

Thanks
 
If you are running a Linux server for c/s i think it need to be static and not dynamic.
 
If you are running a Linux server for c/s i think it need to be static and not dynamic.

i hav bought a linksys with dd wrt router and one of the features is that it can assign a static ip using the mac of computer which i wht i wnt to set up instead of settinh it static on computer. Any idea of how this can be done. Thanks
 
i hav bought a linksys with dd wrt router and one of the features is that it can assign a static ip using the mac of computer which i wht i wnt to set up instead of settinh it static on computer. Thanks
it wont make any difference m8, u still be setting a static ip to the network... but if u still want too, just right click on the panel bar accross the top of the screen and go to add to panel then go down to network monitor then click add @ the bottom and u should see the 2 lil computer on the panel bar in the middle of the screen, then just click on it and go to cfg then properties and u should be able to change any of settings on the network connection
 
Log in as root and use the following command,

vim /etc/network/interfaces

this should open up your nic card properties page,
press "i" without the quotes and then scroll down and remove all the lines with your ip and gateway etc on,

make sure your are left with this

auto eth0
iface eth0 inet dhcp

then press the Esc key then ":wq" without the quotes

Once the file is saved, you can restart the network using this command

/etc/init.d/networking restart

and that should be that hopefully :)
 
Back
Top