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

Re: I am confused about DHCP

On Fri, 2008-06-13 at 10:16 +0200, Antonio M wrote:
> I have a small LAN with DHCP running on Fedora 9. I checked the active
> leases: this is the list of active leases
> 1)I don't understand how IP address is connected to MAC address, i.e.
> if a MAC has already an IP address, should a new lease be started with
> same MAC address?? I see 5 IP's connected to same MAC address

If you have configured your DHCP server to always give the same IP
address to a particular MAC, then that is what it should do.

However, that wasn't a default condition the last time that I set up a
DHCP server.  And there's two aspects to that:  Whether the server
always give the same MAC the same IP, regardless (if the server is
dynamically giving out addresses, there's various rules that are used to
determine whether to give the same address).  And whether *you've*
configured certain MACs to be associated with particular IPs.

Various factors are involved in getting a lease, and on dual-boot
systems, the different information sent from the DHCP client to the DCHP
server meant that some got different leases.  As well as the MAC,
there's other information provided by the client, and if some parts of
that data are different, that's enough reason for giving out a different

You can override that.  You can hard configure MACs to get particular
IPs.  Even if you don't program in specific IPs for specific MACs, you
can reconfigure so that the same MAC should always get the same IP
(it'll be a random dynamic assignment the first time, then the same one
subsequently).  Giving leases a long default expiry time will help, too.

> 2) How are  the IP adressess released?? I would expect
> after and so on... (please note that 00:16:d4:dc:a7:08
> sometimes is started by F9 and sometimes by F10

It depends on the server.  My server's still on Fedora Core 4.  I
specified a range of IPs to be allocated dynamically, and it starts
handing out the highest numbers first.  Other servers start from the
lowest IP, and work upwards.

It also depends on the client (in combination with the server).  The
client can request specific addresses (they usually ask for the same one
that they had last time), and the server can give it to them (but
doesn't have to).

> 200 IP addresses available, 6 allocated (3 %)
> IP Address           Ethernet            Hostname       Start Date                  End Date
>       00:16:d4:dc:a7:08     acer           2008/06/11 07:07:52  2008/06/18 07:07:52
>      00:16:d4:dc:a7:08                    2008/06/12 06:39:18  2008/06/19 06:39:18
>      00:1a:80:23:e3:7b     PC-contecsrl   2008/06/12 07:03:23  2008/06/19 07:03:23
>      00:16:d4:dc:a7:08                    2008/06/13 07:47:01  2008/06/20 06:50:47
>      00:16:d4:dc:a7:08                    2008/06/13 07:22:33  2008/06/20 07:22:33
>       00:16:d4:dc:a7:08                    2008/06/13 07:47:01  2008/06/20 07:47:01
>      00:1a:80:23:e3:7b     PC-contecsrl   2008/06/13 07:50:57  2008/06/20 07:50:57

I notice some don't have hostnames on the table.  Are the entries with
the same MACs multi-boot computers?  (Having more than one OS.)  Do they
also connect to other DHCP servers?

[tim localhost ~]$ uname -r

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.

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