Skip to main content
Home Forums Reset DHCP via terminal... Reset DHCP via terminal...
Thread

Reset DHCP via terminal...

Reset DHCP via terminal... Networking 4 posts Aug 29, 2002 — Aug 31, 2002
My apartment has a prewired ISP. Basically, the thing sucks. Their DHCP services blow...90% of the time when my machine comes back from sleep I've lost my security token and need to reload the DHCP. Is there a command in Unix that'll let me rebind?

Josh
I recall reading an Apple KB article that inactivate/reactivate the specific ethernet interface in the Network pref panel is equivalent to releasing/renewing the DHCP lease.

In OS 9, I simply type "L" in the NetworkSetupTest utility from Apple Dev site. (Thanks to Comcast's crummy DHCP and CPE=1 idiocy).
Just a thought... it could be that some other user accidentally put another DHCP server onto the network, thus confusing things.

tooki
Quote:
Originally posted by JFischel:
My apartment has a prewired ISP. Basically, the thing sucks. Their DHCP services blow...90% of the time when my machine comes back from sleep I've lost my security token and need to reload the DHCP. Is there a command in Unix that'll let me rebind?

Josh


The specific commands to do it in terminal (as per the original request) are:

sudo ifconfig en1 down
<enter password>
sudo ifconfig en1 up

This temporarily turns off the AirPort interface, then brings it back up, thereby causing it to renegotiate an IP address with the DHCP server.
mp.ls