LinuxQuestions.org
Visit the LQ Articles and Editorials section
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
 
LinkBack Search this Thread
Old 09-26-2012, 04:54 AM   #1
m4rtin
Member
 
Registered: Sep 2007
Posts: 259

Rep: Reputation: 16
Question "one-lease-per-client" option in ISC dhcpd dhcpd.conf file


In dhcpd.conf file there is an option to allow one client to have exactly one lease and expire old lease if dhcpd receives DHCPREQUEST:

Quote:
Originally Posted by man dhcpd.conf
one-lease-per-client flag;

If this flag is enabled, whenever a client sends a DHCPREQUEST for a particular lease, the server will automatically free any other leases the client holds.
If I add "one-lease-per-client true;" to my dhcpd.conf file and start dhclient for both eth0 and eth1 in the same machine, I still get network parameters for both interfaces. According to /var/lib/dhcp/db/dhcpd.leases file there are two leases for the same client.


How is the "client" determined? Looks like at least not by system hostname. In addition, why can I request multiple leases to different network adapters in my machine despite the fact that "one-lease-per-client true;" is enabled in dhcpd.conf?
 
Old 09-26-2012, 05:36 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 749

Rep: Reputation: 225Reputation: 225Reputation: 225
The MAC address is what identifies a client.

If a machine has 2 network interfaces then it has 2 MAC addresses.
 
Old 09-26-2012, 05:57 AM   #3
m4rtin
Member
 
Registered: Sep 2007
Posts: 259

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by wildwizard View Post
The MAC address is what identifies a client.

If a machine has 2 network interfaces then it has 2 MAC addresses.

If MAC address identifies a client, I can't see the purpose of the "one-lease-per-client true;" option because MAC addresses are globally unique. I mean if I have a machine with two different network cards, then both of those are treated as different clients by dhcpd.
 
Old 09-27-2012, 04:44 AM   #4
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 749

Rep: Reputation: 225Reputation: 225Reputation: 225
It exists because you can have multiple IP's against a single MAC and some admins way want to ensure that can't happen.

You must remember that this option came into existence way back when a machine with more than one ethernet port was extremely rare, expensive and probably the dhcp server itself.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"domain-name" and "host-name" options in dhcpd.conf m4rtin Linux - Server 3 09-20-2012 08:21 AM
ISC dhcpd with option 82 doesn't lease IP addresses Atllas Linux - Server 0 11-02-2011 04:00 PM
"File Name" in dhcpd.conf in rhel rmugunthan Red Hat 3 04-12-2010 11:52 AM
dhcpd.conf "option routers" non fixed TroelsSmit Linux - Networking 1 08-11-2005 04:31 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration