From time to time, I've encountered issues with OS X clients' network connections (Wired and Wireless, Leopard/Snow Leopard) where nothing will fix the issue, until you reboot.
- Is there a particular 'network service/process' I should be watching out for?
- I was thinking it would be useful to know of a command that will reset a 'network connection' type service/process (same as running a sudo /etc/init.d/networking restart).
After basic troubleshooting such as DHCP, DNS, checking for interface malfunction (disable/enable), checking logs and not finding enough helpful info, sometimes when everything else fails the best thing is just to reboot the machine. I'm not sure what all the 'init.d/networking restart' does in Linux, but I know it's way more helpful than disabling and enabling interfaces.
Thanks!
You can bring down the network interface and bring it back up again, that should accomplish the same thing.
No, there isn't an init.d/service/launchctl equivalent to 'init.d/networking'.
If it's wifi related, you can poke the interface from the command line (on SL) with: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
If it's wired, use ifconfig.
Other then that... I would check dmesg and /var/log/* for errors.
You can also unload/reload the kld or check it for errors.., and reload it, but I've never tried that, I'd rather just reboot. :)
See:
If you want to do it from an ssh shell/remote:
If a simple
ifconfig
up/down won’t work, create an additional “Location” which has all of the network devices disabled, then runscutil
to switch to it, sleep for a couple of seconds, then bring it back.That said, I haven’t seen this happen on any of my Macs except where the DHCP server has had a fit and it’s coincided with lease renewal (and so the Mac has ended up misconfigured). Is the network configuration actually correct when this occurs? If they’re DHCP’d, does hitting the “Renew” button in Network Preferences > {Device} > TCP/IP have any effect? What about, in the case of wireless, turning the Airport off and on again? If you can find out what, besides a reboot, will bring it back, then you’re a big step closer to figuring out what’s actually triggering the behaviour — hitting it with a big stick (which is what bouncing the interfaces effectively is), is only ever going to effect the symptoms, not the cause.
I had the same problem (network started to be slow after a few hours, I'm mostly working on a Mac connected by a wired network to a Windows Computer) and what it worked for me was to eject the computer that I was connected to (in Finder) and turn off the Ethernet (System Preferences -> Network -> Ethernet -> Off) and then connect those two again. :)