Restarting network



I am looking for a way to restart the network (like under Linux) without to restart. Under unix, I restart the network script, and it's fine.

The exact problem is that when I forget to switch on my router (which has a DHCP built in) before the mac OS X startup, the network is of course unreachable. And even if I switch it on after, I can reach any host. So I need to restart the network.

Any proposition will be appreciated.

Alain Paschoud
I have had this problem before, too, and there are two ways that I know to fix it (GUI-wise. I'm not sure how to do it through the command-line). The first way is to open NetInfo Manager, click the lock, and go to "Options->Restart all NetInfo Domains on Local Host" in the menu.

The other way is probably a bit easier, because it doesn't involve having to give your administrator password. If you open the Security Preferences application and go to the Network panel, just change some value and click save (I usually tell it to go from "Using DHCP" to "Manually" for configuring), and then change it back and click save again. In order to accept the change, NetInfo is restarted, and this does the trick.

Obviously, there must be some command-line way to do this, but I haven't heard about it.

Hope this works...