Executes commands when device connects to network.