LinuxQuestions.org
Weather apps tell you it'll rain. Wyndo tells you when to go.
Home Forums Register
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 12-17-2004, 01:19 AM   #1
ruwach
Member
 
Registered: Feb 2003
Location: sc
Distribution: mandrake 9
Posts: 73

Rep: Reputation: 15
how to move from static to dhcp in debian


when i installed debian sarge on my desktop box here and i am moving the computer to a friends house.
i had it set up with a static ip ( thats how i installed it)
but now i need it to find a dhcp address when it boots up because thats how my friend gets on the internet.
is there a network config tool to do this ? so i can reconfigure how i connect to the internet?
thanks for any suggestions.
 
Old 12-17-2004, 01:26 AM   #2
bastard23
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 275

Rep: Reputation: 30
edit /etc/network/interfaces. Change iface static to dhcp and delete the tabbed lines (address, netmask, gateway). i.e.
Code:
iface eth0 inet static
        address 192.168.10.1
        netmask 255.255.255.0

-becomes-

iface eth0 inet dhcp
 
Old 12-17-2004, 08:46 AM   #3
ruwach
Member
 
Registered: Feb 2003
Location: sc
Distribution: mandrake 9
Posts: 73

Original Poster
Rep: Reputation: 15
OK i tried that but it didnt work.
i rebooted after making the changes to /etc/network/interfaces and i cannot dhcp.
any suggestions ?
 
Old 12-17-2004, 09:43 AM   #4
daholygoat
LQ Newbie
 
Registered: Oct 2001
Distribution: Debian
Posts: 8

Rep: Reputation: 0
what does your /etc/network/interfaces look like?
 
Old 12-17-2004, 11:28 AM   #5
ruwach
Member
 
Registered: Feb 2003
Location: sc
Distribution: mandrake 9
Posts: 73

Original Poster
Rep: Reputation: 15
my /etc/network/interfaces looks like this

auto eth0
iface eth0 inet dhcp

with everything else has # in front of it.

i had tried it once with it like this, and once with uncommenting out the lines for nameserver
like nameserver xxx.xxx.xxx.xxx (i dont remember exactly that computer is at home )

thanks, by the way
 
Old 12-17-2004, 11:36 AM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

try

editing the
/etc/sysconfig/network-scripts/ifcfg-eth0
file
and put the entries like this

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=dhcp


regards
 
Old 12-17-2004, 12:08 PM   #7
ruwach
Member
 
Registered: Feb 2003
Location: sc
Distribution: mandrake 9
Posts: 73

Original Poster
Rep: Reputation: 15
OK Thanks.
will try that as soon as i get back to the house.
thanks, i will let you know.
 
Old 12-17-2004, 04:24 PM   #8
rbochan
Member
 
Registered: Dec 2004
Location: Central New York
Distribution: Debian
Posts: 218

Rep: Reputation: 30
You could also install the etherconf package and control the net connection via debconf.
 
Old 12-19-2004, 01:45 AM   #9
ruwach
Member
 
Registered: Feb 2003
Location: sc
Distribution: mandrake 9
Posts: 73

Original Poster
Rep: Reputation: 15
ehterconf hooked me up good
thanks for your time
 
  


Reply



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
Static IP to DHCP on Debian 3.1 sether Linux - Networking 3 08-24-2005 08:49 AM
From DHCP to static IP. dave`2005 Slackware 3 08-22-2005 09:12 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 06:14 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
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