I have a lab set up involving AP and DHCP, I am using my Macbook to connect to the AP and it requests a DHCP lease, however, when I change the network information on the router, the Macbook still keeps the obsolete information and has connectivity issues regarding the Internet.
I have been removing the network manually and this seems to clear the cache and accepts the new lease.
This is too time consuming though, is there a quicker way to clear the cache/lease so it can request a new address without having to 'forget' the network every time?
Best Answer
You have to release the IP address, not just renew it. This is because your DCHP client is going to attempt to request the lease it had previously so long as it hasn't expired. You have to force the client to ask for a new lease.
Additionally, you can use the
networksetup
commandYou would get the networkservice by issuing the command:
Of course, you could also do this in Network Preferences