Question: How to move Debian network from static IP to DHCP

Posted by rmcgowan on Thu 11 Aug 2005 at 04:23

I'm using Woody currently, connected to a DSL modem/router that allowed me to set up systems eitehr with DHCP or static IP addresses. Since this was a home networking setup, it was easier to go static.

I'm converting to cable modem to broadband router, where the router appears to only work with DHCP (appears, because, for now, I can't access it to see what it does internally and the docs don't say).

The hardware on the intranet side is all set up. I'm waiting for the cable modem install, so all I'm expecting at this point is to see the router and be able to connect to it.

So now I need to change how eth0 is set up. Based on what I know, I thought it was enough to change /etc/network/interfaces so the entry for eth0 was dhcp rather than static and comment out the static related lines. I did this and ran:

ifconfig eth0 down; ifconfig eth0 up; ifconfig eth0

Though marked up, the interface had no IP address. I then tried rebooting the system and re-ran the above. Still no IP address.

What am I missing? Are there other steps I need to do, or am I misunderstanding how this works (always possible;)?

Bob


This article can be found online at the Debian Administration website at the following bookmarkable URL:

This article is copyright 2005 rmcgowan - please ask for permission to republish or translate.