Renew a DHCP lease

Jan 03, '13 07:30:00AM

Contributed by: chymb

Renewing a DHCP lease via the Network System Preference Pane has the advantage of not dropping the connection, unlike switching the interface to BOOTP and back to DHCP. This command mimics that behavior.

It seems that the button creates a key in SystemConfiguration that notifies it to refresh the configuration. We can create that key using the following command (changing en0 for the relevant interface):

echo "add State:/Network/Interface/en0/RefreshConfiguration temporary" | sudo scutil
It has the desired effect on 10.4 through 10.8 I didn't have access to anything older.

Comments (4)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2013010217183284