LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-22-2005, 07:30 PM   #1
sether
Member
 
Registered: Aug 2004
Posts: 695

Rep: Reputation: 31
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.
 
Old 08-22-2005, 07:47 PM   #2
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

Rep: Reputation: 30
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.

Last edited by tomj88; 08-22-2005 at 07:48 PM.
 
Old 08-24-2005, 02:11 AM   #3
sether
Member
 
Registered: Aug 2004
Posts: 695

Original Poster
Rep: Reputation: 31
Thanks, that worked just how I wanted it to.
 
Old 08-24-2005, 08:49 AM   #4
tomj88
Member
 
Registered: Apr 2005
Location: Wolverhampton, England
Distribution: Ubuntu
Posts: 334

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
From DHCP to static IP. dave`2005 Slackware 3 08-22-2005 09:12 AM
how to move from static to dhcp in debian ruwach Linux - Networking 8 12-19-2004 01:45 AM
Using DHCP with a static IP ninmonkeys Linux - Networking 9 11-30-2004 07:32 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
DHCP to static IP ?? davepal Linux - Networking 1 04-21-2004 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration