Westwind Computing
 Sales Information
 Customer Feedback
Westwind Computing
[New to Westwind?]  [Customers]  [News & Information] 


Subinterfaces on OS-X Server (Rhapsody)

OS-X Server
  Type of Product:
Rhapsody Server

Issue: Configuring subinterfaces (multiple IP's on the same NIC) on OS-X Server

Solution: ifconfig en0 alias nnn.nnn.nnn.nnn netmask mmm.mmm.mmm.mmm

There seems to be no way under OS X Server v1 to use the standard configuration interface to set up an IP subinterface (i.e. an extra IP address on a single physical interface), but it can be done by using the ifconfig command to set up an alias, e.g.:

   ifconfig en0 alias netmask
Of course, this only changes the current config, not what will be set up at the next reboot; to change that, you have to get the appropriate ifconfig command(s) to run every boot time. The easiest way I've found to do that is to put it in a shell script in the /etc/startup directory (everything in there gets run at startup), called something like 0810_NetworkCustom so it'll run right after the standard network setup runs.

Note: when creating the startup file, remember to make it executable (i.e. set the exec flag in the access section of the file inspector) by root. And remember that TextEdit clears this flag anytime you edit the file. D'oh!

Note2: to set up a second IP address in the same network as an existing interface, set the netmask of the second interface to; this way their network numbers won't conflict.

Note3: ifconfig -a can be used to show information about the current interfaces and how they're configured. But, it doesn't show aliases. And I have no idea how to make aliases go away (other than rebooting). If you find out, let me know and I'll add it to this document.

This Document Prepared By Gordon Davisson on 9/3/99

Home | Specials | Products | Education | About Us | Services | Training | Support | Reference | Events | How-to
   Copyright © 2000-2004 Westwind Computing