Renewing a DHCP lease under OS X

If you wish to renew a Dynamic Host Configuration Protocol (DHCP) lease on a Mac OS X system, you can do so by clicking on the Apple icon in the upper, left-hand corner of the screen, selecting System Preferences, and then Network , and then the relevant network interface, e.g., Wi-Fi.

System Preferences - Network

Then click on the Advanced button and then the TCP/IP tab. You can then click on the Renew DHCP Lease button to have the system attempt to renew its DHCP lease.

Udemy Generic Category (English)120x600

System Preferences - TCP/IP

When the system attempts to renew an IPv4 address lease, it will send a DHCP request in a User Datagram Protocol (UDP) datagram with a source IP address of to destination IP address, i.e., to the broadcast address for the Local Area Network (LAN) on which the system resides. The datagram will be sent with a source port of 68 and a destination port of 67. If you look at the datagram that is sent using Wireshark, you will see one similar to the one below (you can apply a Wireshark filter of udp.port==68 to view just DHCP datagrams).

Wireshark - DHCP request

If you expand the Bootstrap Protocol section, you will see details similar to those below.

Wireshark - Bootstrap Protocol

The Parameter Request List shows the following items included in the request:

Network Analysis Using Wireshark
Network Analysis
Using Wireshark
1x1 px

Subnet Mask
Classless Static Route
Domain Name Server
Domain Name
Domain Search
Private/Proxy autodiscovery
NetBIOS over TCP/IP Name Server
NetBIOS over TCP/IP Node Type

The request also shows the requested IP address, which is the address previously obtained via DHCP. The IP Address Lease Time in the request is 90 days.

The DHCP request is followd by a DHCP acknowledgement datagram from the DHCP server that contains the assigned IP address, router IP address, domain name servers, etc. In this case the lease time granted is one day. The source port for that datagram is port 67 on the DHCP server to port 68 on the DHCP client system.

Wireshark - DHCP Ack

If you want to see the information provided by DHCP from a command-line interface (CLI), you can open a Terminal window and issue a ipconfig getpacket command as explained at Viewing DHCP information on an OS X system.

Related articles:

  1. Installing Wireshark on Mac OS X El Capitan
  2. Capturing and filtering data with Wireshark
  3. Viewing DHCP information on an OS X system