After adding a DHCP reservation or changing the DNS server the router hands out, I want my Mac to pick up the new settings right away, instead of whenever the old lease runs out. Switching Wi-Fi off and on works, but macOS has a button for exactly this.
System Settings > Network > Wi-Fi > Details > TCP/IP > Renew DHCP Lease
Click the service you’re on (Wi-Fi or Ethernet), then Details, then TCP/IP. The Renew DHCP Lease button sits at the bottom; click it, then OK. Apple only shows it when the service uses DHCP, so on a manually configured connection it isn’t there.
From the Terminal you get the same result with ipconfig:
sudo ipconfig set en0 DHCP
This removes the current IPv4 configuration on en0 and starts a fresh DHCP one, so the Mac asks the server again for its address, subnet mask, router and DNS. I’d reach for it right after giving the MacBook a fixed address in the router: run it, then look at the IP address in the same Details pane to see whether the reservation took.
There’s a catch in Apple’s man page. ipconfig set creates a temporary service that only lasts until the next network configuration change, and Apple describes the tool as meant for testing and debugging. For a one-off renew that’s what you want. To switch a connection between DHCP and a manual address for good, use Configure IPv4 in the TCP/IP pane instead. The interface also loses its address for a moment while it renews, so don’t run this over an SSH session to that same Mac.
Further reading: Renew your IP address from the DHCP server on Mac (Apple), ipconfig man page (SS64, macOS)