How to check the DHCP lease remaining time
Hello Community,
I am troubleshooting a connectivity issue on my Macbook pro which APPARENTLY ignores the DHCP ACK messages sent in reply to Unicast DHCP Requests (the ones sent when T1 timer expires at 50% of the lease time) from a particular DHCP server.
Do you happen to know the command which shows the current remaining lease time for the assigned DHCP IP address? I need that to confirm my assumptiom.
By checking in the /leases folder you may only see the original lease Start date, which is the time the initial DHCP DORA process took place. When the 'refresh' DHCP requests are sent after 50% of the lease, and consequently the DHCP ACKs from the server are received the value in that file does not change. That means that this command is not good to check what I need.
I.e.:
xxxxxxx-mac:db xxxxxxi$ sudo cat /private/var/db/dhcpclient/leases/en1-1,<omitted-MAC>
Password:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IPAddress</key>
<string>192.168.1.14</string>
<key>LeaseLength</key>
<integer>600</integer>
<key>LeaseStartDate</key>
<date>2012-03-02T09:16:14Z</date>
<key>PacketData</key>
<data>
AgEGAKA9KL0AAAAAAAAAAMCoAQ7AqAEBAAAAAAAmuxA9XwAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABjglNjNQEFNgTAqAEBMwQAAAJY
AQT///8AAwTAqAEBBgTAqAEBDwRob21lKgTDDQGZ/wAAAAAAAAAAAAAAAAAA
</data>
<key>RouterHardwareAddress</key>
<data>
6L6BA24U
</data>
<key>RouterIPAddress</key>
<string>192.168.1.1</string>
</dict>
</plist>
Even when a subsequent DHCP ACK message is received that value remains unchanged.
I need a command or application which shows instead the actual lease timer.
thanks,
Riccardo
MacBook Pro, Mac OS X (10.7.3)