Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all, 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9

    DHCP with multi default-lease-time in the same subnet


    Hi all,

    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.


    paco

  2. #2
    Just Joined!
    Join Date
    Jul 2012
    Posts
    39
    Hi, I think it would help more if you would include what software your DHCP server is. I'm also wondering why you want to do that. Or maybe you are using a firewall (Cisco, Juniper, etc.)?

  3. #3
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9
    Hmm...yes.

    I configure DHCP with the package "dhcpd".

    I think of this solution:
    Code:
    ddns-update-style none;
    
            option routers                  192.168.0.254;
            option subnet-mask              255.255.255.0;
            option broadcast-address        192.168.0.255;
            option domain-name-servers      192.168.0.1;
            option domain-name 		"exemple.com";
            default-lease-time 		86400;
            max-lease-time 			1296000;
    
    	## Free Pool - 240 at 245 ##
    subnet 192.168.0.0 netmask 255.255.255.0 {
    	range 192.168.0.240 192.168.0.245;
    	option routers 192.168.0.254;
    	option broadcast-address 192.168.0.255;
            option domain-name-servers 192.168.0.1;
            option domain-name "exemple.com";
    	default-lease-time 86400;
            max-lease-time 172800;
    	}
    
    	## Fixed-addresses ##
    	
    	host pc1 {
            hardware ethernet 02:02:27:11:00:00;
            fixed-address 192.168.0.16;
            }
    
    	host pc2 {
            hardware ethernet 02:02:03:11:00:20;
            fixed-address 192.168.0.17;
            }
    What do you think?

    Thank you very much.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    I haven't played with this as I have no need to, but have your tried to set your lease times for unknown users in the main config and then in your host sections used the lease time you want for known?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #5
    Just Joined!
    Join Date
    Jul 2012
    Posts
    9
    Hello Lazydog,

    That config works very well after 1 week of use.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •