Solved Dhcp lease time is incorrect in client

Hi, This is my server config for dhcp service:
Code:
log-facility local7;
ddns-update-style none;
subnet 10.10.10.0 netmask 255.255.255.0 { 
    range 10.10.10.11 10.10.10.254;
    option routers 1.1.1.1;
    option domain-name-servers 5.5.5.5;
    default-lease-time 439380;
}

In /var/db/dhclient.leases.ifname I have some configs that the dhcp generate itself,
Code:
lease {
  interface "gbeth0";
  fixed-address 10.10.10.11;
  option subnet-mask 255.255.255.0;
  option routers 1.1.1.1;
  option domain-name-servers 5.5.5.5;
  option dhcp-lease-time 86400;
  option dhcp-message-type 5;
  option dhcp-server-identifier 10.10.10.1;
  renew 5 2013/4/26 08:03:12;
  rebind 5 2013/4/26 17:03:12;
  expire 5 2013/4/26 20:03:12;
}

The question is my lease time in server is 439380 but in the client it is 86400. where is my mistake?
Thanks
 
What is your current configuration? Is it

Code:
log-facility local7;
ddns-update-style none;
subnet 10.10.10.0 netmask 255.255.255.0 {
    range 10.10.10.11 10.10.10.254;
    option routers 1.1.1.1;
    option domain-name-servers 5.5.5.5;
    default-lease-time 439380;
    max-lease-time 439380;
}
 
Why do you want to set the lease-time to 5 days? Typical one hour lease-time is usually fine and there's rarely a need to change it.

Code:
renew 5 2013/4/26 08:03:12;
rebind 5 2013/4/26 17:03:12;
expire 5 2013/4/26 20:03:12;
This is old data, look at the timestamps. They're from 2013.
 
Thank you. This is worked for me.

Awesome!

Typical one hour lease-time is usually fine and there's rarely a need to change it.

Setting the lease-time to 1 hour in the officer, knowing the employees will stay for 8 hours results in unnecessary renewals, especially given that the client renews its lease half-way the lease-time, i.e. every 30 minutes. For offices, especially for fixed computers with a network cable I would set the lease time to a few days. Once it has an IP address there is no need to renew or change it.

For wireless networks I would set a shorter lease-time, e.g. 8 hours. Those users roam through the building, sometimes connecting to a different layer-3 network. Those leases need to time-out sooner. For guests I would set the lease-time to 2-4 hours.
 
Back
Top