How to find out DCHP lease time on macOS

When my macbook connects to WiFi network it gets its ip address via DCHP. It is fairly easy to find out the basic information about the connection, but today I had to find out DHCP lease time (the time when the network settings expire and the computer must update its settings).

The basic info

Go to System Preferences -> Network -> Advanced and there you can see IPv4 / Mask / Router (gateway) info.

Or, you can also get that info by clicking on the WiFi icon (but you must press "alt" key during the click):

DHCP info

But it is a bit harder to get details about DCHP on the mac.

To get DCHP client info you need to open Terminal and enter two commands:

Here is an example of what you'll get:

$ sudo su
$ cat /var/db/dhcpclient/leases/*
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

The DHCP lease time is in this block:


From this text you can find that the lease time is 43200 seconds. (By the way, this is 12 hours).

Ivan Bessarabov

13 january 2020