LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Static IP to DHCP on Debian 3.1 (https://www.linuxquestions.org/questions/linux-networking-3/static-ip-to-dhcp-on-debian-3-1-a-355977/)

sether 08-22-2005 07:30 PM

Static IP to DHCP on Debian 3.1
 
I have a laptop running Debian 3.1 that was assigned a static IP address when I was using it at home. I've moved off to college and now I need to have it assign an IP address automatically through DHCP.

I don't yet have accesss to the internet, but once I do, I'd like to know how to properly setup DHCP. So my question is, what is the proper way to do this? Do I need to remove my old /etc/resolv.conf? What configuration files do I need to edit to have my DHCP client start at boot time?

Thank you in advance for your responses, and please excuse the fact that I have very little knowledge of networking on Linux. :)

tomj88 08-22-2005 07:47 PM

You might need to change your /etc/resolv.conf, you will have to add a line like:
Code:

nameserver 192.168.0.1
(where the ip is the ip of the router or server). You will need to edit /etc/network/interfaces aswell. It should have these lines in it:
Code:

auto eth0
iface eth0 inet dhcp

Then restart the network:
Code:

ifdown eth0; ifup eth0
That is how I normally restart the network, but there might be another way. Hope this helps,
Tom

edit: Just thought, don't you need to install some DHCP client programs? And if the network starts at boot, then it should use DHCP at boot aswell.

sether 08-24-2005 02:11 AM

Thanks, that worked just how I wanted it to. :)

tomj88 08-24-2005 08:49 AM

Good to here that! I just spent a few weeks trying to fix my router problems you see... Glad it worked anyway.


All times are GMT -5. The time now is 02:11 AM.