deletes old ip and adds new ip