In OS X, the network interfaces are managed by configd based on the configurations defined in /Library/Preferences/SystemConfiguration/*. If you change the "live" settings with ipconfig
and such, it won't show up in System Preferences, and configd is likely to overwrite them back to what it thinks the settings should be. So, rather than changing the live config, you should change the system settings and let configd apply the change. The simplest way to do this is with the networksetup
command:
networksetup -setmanual "Ethernet" 192.168.110.1 255.255.0.0 192.168.110.1
Note that you need to specify the interface to configure by its service name (the one System Preferences shows; "Ethernet" in my example) rather than the unix device name (e.g. "en0"). Also, networksetup
doesn't seem to understand CIDR notation ("/16"), so you need to give the full subnet mask.