How do I create a static permanent ifconfig alias?
Generally speaking, you can create the persistent alias in Network in System Preferences.




However, the lo0 loopback device doesn't show up here.  For this special case, we need to utilize launchd to kick off a short script with the ifconfig command you used above.

Here is a sample .plist file, saved as com.user.lo0-loopback.plist (can be saved anywhere as it will be copied to the appropriate directory later).

&lt;?xml version="1.0" encoding="UTF-8"?&gt; 
&lt;!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd &gt; 
&lt;plist version="1.0"&gt; 
&lt;dict&gt; 
  &lt;key&gt;Label&lt;/key&gt; 
  &lt;string&gt;com.user.lo0-loopback&lt;/string&gt; 
  &lt;key&gt;ProgramArguments&lt;/key&gt; 
  &lt;array&gt; 
    &lt;string&gt;/sbin/ifconfig&lt;/string&gt; 
    &lt;string&gt;lo0&lt;/string&gt; 
    &lt;string&gt;alias&lt;/string&gt; 
    &lt;string&gt;172.16.222.111&lt;/string&gt; 
  &lt;/array&gt; 
  &lt;key&gt;RunAtLoad&lt;/key&gt; &lt;true/&gt; 
  &lt;key&gt;Nice&lt;/key&gt; 
  &lt;integer&gt;10&lt;/integer&gt; 
  &lt;key&gt;KeepAlive&lt;/key&gt; 
  &lt;false/&gt; 
  &lt;key&gt;AbandonProcessGroup&lt;/key&gt; 
  &lt;true/&gt; 
  &lt;key&gt;StandardErrorPath&lt;/key&gt; 
  &lt;string&gt;/var/log/loopback-alias.log&lt;/string&gt; 
  &lt;key&gt;StandardOutPath&lt;/key&gt; 
  &lt;string&gt;/var/log/loopback-alias.log&lt;/string&gt; 
&lt;/dict&gt; 
&lt;/plist&gt;


Next, move it to the /Library/LaunchDaemons/ directory so it's kicked off at boot (will be run as root) and set the correct permissions

$ cp com.user.lo0-loopback.plist /Library/LaunchDaemons/ 

$ chmod 0644 /Library/LaunchDaemons/com.user.lo0-loopback.plist 
$ chown root:wheel /Library/LaunchDaemons/com.user.lo0-loopback.plist


Then load it with launchctl

$ launchctl load /Library/LaunchDaemons/com.user.lo0-loopback.plist


Reboot and your lo0 loopback should have an alias IP assigned to it that will be persistent across reboots.