etc/rc.d/netif restart possible?

clu3less

Registered
Hi all, first post, please bear with me.
I have a condition where my wired ethernet (en0) interface gets some sort of dhcp poisoning and is not able to renew the lease. I can turn it off and on and reconfigure but it just would not accept an IP, it remains on the "169.254.x.x" self-assigned address. Other computers have no troulbe at all receiving an IP from the same DHCP server. I need to restart my computer to get network functional again.

Now, having to restart is not something I can live with, I had enough of that on windows. On freebsd a command like etc/rc.d/netif restart would most probably do the trick, but I can not seem to find an osx equivalent. I have a feeling that it is because it is all integrated in launchd somehow, but I can't seem to find any hint as to how to restart networking without restarting the computer.
Any help would be much appreciated.
 
There is a way to fix network issues on the Mac. Open (in your Dock) System Preferences->Network pane. Then at the top of the pane use the "Location" drop down to create a new Location calling it whatever you want (like Work for example). Then at the bottom of the Network pane click on the 'Apply' button. Then again in the Network pane click on the "Advanced" button. This way you can set the network settings manually and make sure it is seeing the Ethernet port correctly.

Plus in terminal do a
Code:
man networksetup
to see how to set it up via the Terminal command.
 
Back
Top