LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 07-09-2012, 05:18 PM   #1
gnu699
LQ Newbie
 
Registered: Jun 2012
Posts: 10

Rep: Reputation: Disabled
DHCP with multi default-lease-time in the same subnet


I configure a DHCP server.

In this configuration i would like, in the same subnet, 2 differents
default-lease-time & max-lease-time

My goal:

"fixed-address" with default-lease-time & max-lease-time
and "range" with another default-lease-time & max-lease-time

Is it possible?


Thank you very much.


gnu
 
Old 07-09-2012, 10:03 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,242

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
There's a few example cfgs here http://www.linuxtopia.org/online_boo...ml#config-file
If it was me I'd try

1. add times into the blocks containing fixed addr hosts & test 'service dhcpd configtest' ? or start it and test
2. if that doesn't work, try declaring 2 subnets with non-overlapping ranges; one for dhcp, one for fixed addrs and try that in the cfg.
 
Old 07-10-2012, 11:28 AM   #3
gnu699
LQ Newbie
 
Registered: Jun 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Ok i'm going to try it.

And make like that:

Code:
group {
   option routers                  192.168.1.254;
   option subnet-mask              255.255.255.0;
   option domain-name              "example.com";
   option domain-name-servers       192.168.1.1;
   default-lease-time 86400;
   max-lease-time 1296000;

   host apex {
      option host-name "apex.example.com";
      hardware ethernet 00:A0:78:8E:9E:AA; 
      fixed-address 192.168.1.4;
   }

   host raleigh {
      option host-name "raleigh.example.com";
      hardware ethernet 00:A1:DD:74:C3:F2;
      fixed-address 192.168.1.6;
   }
}

group {
   option routers                  192.168.1.254;
   option subnet-mask              255.255.255.0;
   option domain-name              "example.com";
   option domain-name-servers       192.168.1.1;
   default-lease-time 600;
   max-lease-time 7200;

   range 192.168.1.230 192.168.1.253;
}
What do you think?
 
Old 07-12-2012, 01:08 AM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,242

Rep: Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024Reputation: 2024
You'll just have to test it and let us know what happened ... its not like you're going to break (ie delete) anything with a DHCP test.
 
Old 07-19-2012, 12:10 PM   #5
gnu699
LQ Newbie
 
Registered: Jun 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
For who pass on that post.

That it works:

Code:
ddns-update-style none;
log-facility local7;

        option routers                  192.168.200.1;
        option subnet-mask              255.255.255.0;
        option broadcast-address        192.168.200.255;
        option domain-name-servers      192.168.200.1;
        option domain-name              "exemple.com";
        default-lease-time              172800;
        max-lease-time                  1296000;

        ## Free Pool from 240 to 245 ##
subnet 192.168.200.0 netmask 255.255.255.0 {
        range 192.168.200.240 192.168.200.245;
        option broadcast-address 192.168.200.255;
        option domain-name-servers 192.168.200.1;
        option domain-name "exemple.com";
        option routers 192.168.200.1;
        option broadcast-address 192.168.200.255;
        default-lease-time 43200;
        max-lease-time 86400;
        }

        ## Fixed address ##

        host dhcp-server {
        hardware ethernet 52:54:00:17:f2:ca;
        fixed-address 192.168.200.5;
        }

        host client1 {
        hardware ethernet 52:54:00:43:fe:cd;
        fixed-address 192.168.200.100;
        }
Thanks chrism01
 
  


Reply

Tags
dhcp, dhcpdconf


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to time limit a DHCP lease DarkBeer Linux - Server 4 05-10-2011 01:38 AM
dhcp lease time algorithm apparently imprecise? dagril Linux - Networking 2 03-04-2011 02:29 AM
[SOLVED] DHCP lease time anomaly LQParsons Linux - Networking 3 06-17-2010 08:19 PM
DHCP Server - No lease time? piercey Linux - Server 2 07-21-2008 11:15 AM
Invalid DHCP server lease time CloudBuilder Linux - Wireless Networking 3 04-30-2004 08:41 PM


All times are GMT -5. The time now is 09:56 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