Force a DHCP lease renewal on your Mac.
Email Facebook x.com Reddit
DHCP is a network protocol used to assign an IP address to your Apple device. Here's how to force a new IP address on macOS.
Dynamic Host Configuration Protocol (DHCP) allows a network device to request an IP address from a DHCP server on the network. DHCP makes it easier to start up and configure computers because it is usually automatic and does not require user intervention.
There are separate versions of DHCP for IP4 and IP6 (DHCPv6).
In most cases, DHCP servers are either on your home network (on your router), on your ISP's network, or on corporate servers in corporate settings. DHCP can also be hosted in the cloud.
Part of the benefit of using DHCP is that your client machine doesn't need to know the address of the DHCP server – discovery is automatic and transparent (and is actually UDP-based). Client machines can continue to search for DHCP servers on the network until they find one that can provide an IP address.
You can also run your own standalone DHCP servers at home, but unless you're familiar with the intricacies of the protocol and networking, this can be more trouble than it's worth: improperly configuring a local DHCP server can cause your network to become unstable.
Most modern home routers, cable modems, and fiber optic modems handle DHCP for you.
The basic idea behind using DHCP is that computers can dynamically and automatically establish an Internet connection without having to manually configure an IP address for each machine.
The amount of time a DHCP server allows a single machine to connect to a single IP address is called the lease time. The default lease time is typically twenty-four homes, but can vary. When the lease time expires, either a new IP address is assigned or the same IP address is used with the lease time reset.
The lease time is used so that if devices are disconnected from the network, their IP addresses can be reused and assigned to other devices on the network.
DHCP History
The predecessors to DHCP were RARP and BOOTP – both defined in the early 1980s. As the Internet began to become commercialized in the early 1990s, it quickly became apparent that static IP management for a huge number of IP devices was impractical.
Based on BOOTP, DHCP includes notable differences in the allocation and reuse of the IP address pool, as well as platform-specific configuration options for each connected machine.
The final original version of DHCP was later updated in 1997 with a few additional minor changes, and DHCPv6 was first defined in 2003 (and later updated in 2018).
Starting DHCP on Macs
When you start your Mac, a background process looks at the list of its active network interfaces in the order specified in System Preferences -> Network and sends requests to DHCP servers on your network (by broadcasting a DHCPDISCOVER message) to request an IP address for each active interface in the list (unless a specific interface is configured to use manual IP addressing).
If any DHCP servers listen for this request and respond to it (with a DHCPOFFER message), your Mac will ask one of them for an IP address for each network interface. The responding DHCP server creates a new internal IP address in a table and then sends it to your Mac for use.
macOS takes each IP address it receives and connects an active network interface to it. These addresses aren't “real” addresses – they're actually mapped internally by your router or ISP to an external address on the Internet.
A typical address your Mac might get from a DHCP server might look something like “192.168.0.1”.
If you go to System Preferences -> Network and click on an active network interface, you'll see a list of network settings for that device. For example, Ethernet:
The Network pane of System Preferences in macOS.
The device pane shows whether the device is active, its IP address, the subnet mask it's using, and the local router address. For a home network, the router address will likely be your broadband modem or local router if you have one configured.
The device information also shows you which DNS servers you're using and how your internet connection is configured. In the case of DHCP, this will be shown at the top.
If you're on a network that doesn't use DHCP, but instead uses static IP addresses for each device, this line will say “Manual” instead of “DHCP”.
Once your Mac has requested and received a DHCP address from the server, all of these values will be filled in automatically.
Requesting a New DHCP IP Address
If for some reason you want to request a new IP address from your network's DHCP server, click the Details… button at the top of the device information pane. You'll see a sheet listing the network and hardware specifications for that device.
One of the items in the list is TCP/IP. If you click TCP/IP, you will see essentially the same information as in the devices panel, but you will also notice a Renew DHCP Lease button:
Click Renew DHCP Lease to reset the IP lease on your Mac's network interface.
Clicking this button will send a request to the DHCP server to reset the DHCP lease time or, in some cases, request a new IP address. After clicking the button, you will need to wait a few seconds for the request/response from the server. When a new lease/address is received, macOS will automatically update the information in the device interface pane.
If you are using a VPN app (and it is connected), you may also need to disconnect and reconnect it once you receive a new IP lease for your Mac.
But why?
You may be wondering why you should manually renew your DHCP lease. The answer is: you usually don't. The only time you need to do this is when you have network conflicts or problems – for example, if your computer went to sleep and some other device on your local network is now using the IP address you were previously using.
Or in some cases, if intermediate local routers or switches on your network changed and your Mac didn't know about it – or, as mentioned above, in the case of VPN changes (some routers may contain DHCP relay agents that communicate with DHCP servers).
In the event that your Mac says its network interface is connected but you have no connection, you can try clicking Renew DHCP Lease to see if that solves the problem.
DHCP makes our lives a lot easier by eliminating the need to manually configure IP addresses, which can quickly become a burden on large networks. DHCP is simple and automatic, and most of the time you won't even have to think about it.
Apple has a very brief page about changing TCP/IP settings in the Mac user guide.
Follow AppleInsider on Google News