[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dhcp & ip addresses

> On Sat, 28 Jul 2001, Eric Boo spake:
> > Hi all,
> > 
> > I'm using pump on SID. My ISP is a cable provider who do not issue
> > static ips. Usually, when I use pump, I have the same ip address for
> > months, unless I switch off the modem and someone else grabs it. 
> > 
> > When I reboot into windows on the same machine, I get another ip
> > address, then when I go back to linux again, it's back to the same old
> > ip address again (assuming no one grabbed it). If I use dhcpcd, it's
> > another ip.
> > 
> > Question: How are these ip address stored, if they are (under pump
> > espcially), and how do I force pump to get another different ip if
> > needed?
Here's the deal: Your computer gets a lease from the dhcp server. The
lease is for a specific period, for example, 3 days. Halfway through the
lease period, your computer's dhcp client should automatically request
that the least be renewed, so you get a new 3-day lease. _Typically_ if
you never shut down, your TCP/IP address will never change.

When you run Windows, you can see the lease details via WINIPCFG or
IPCONFIG. The former is a gui utility built into Win95/98/Me. The latter
should be run from the WinNT/2K cmd shell. (Try IPCONFIG /ALL). Both of
these tools allow you to release or renew your lease manually. I'd love
it if someone would reply and post the Linux equivalents, I behind on my

Likely, your computer automatically tries to renew the lease each time
the eth0 interface starts up (eg, every reboot or running ifup in 
Linux. The current OS _probably_ looks like a different computer to the 
DHCP server. If the other OS's lease hasn't expired, it'll naturally 
give you a different address because it thinks you're a different

How are the addresses stored? That's up to the DHCP client, Windows and
Linux probably do it differently. If they have a current lease, they'll
keep using it. If the lease has expired while that OS wasn't running it
should try to get a new lease as soon as it starts up, and it's going to
take whatever the server gives it. The DHCP server controls the lease 
period and whether the server attempts to reserve expired leases.

HTH, Paul

Reply to: