Add an additional IP interface to one Ethernet card

Dec 27, '04 09:15:00AM

Contributed by: mbanks

In testing a certain unreleased disk management product that shall be left nameless (hey, I don't want to get sued here!), to see if it would allow a psuedo-high availability (HA) setup, I found this little tidbit. You see, for HA, you need a physical IP (for an Xserve or any other HA member), a logical IP (to failover so you don't have to "touch" every client machine and point it to the new server), and storage that is accessible by each server. With this new storage area network product apparently going to cover the latter of the requirements, it seemed as though the only thing I didn't know how to do is add a logical IP to an existing ethernet interface.

After messing a while with ifconfig (trying to do the equivalent of an ifconfig addif in Solaris, which you can actually do with ifconfig ... add), I realized you can do the same in System Preferences. You just need to open the Network system panel, pull down the Show menu and set it to "Network port configurations," and then hit Duplicate with your Ethernet configuration selected. This will give you a second interface (or more if you duplicate it again), and second IP for the machine. In my case, this allows the second IP to be failed over to a peer. However, this is how you would add a Mac to multiple networks through one ethernet card as well.

[robg adds: We covered this way back in 2001, but since both the method of enabling it and the context have changed, I figured it was worthy of an update. You can also use the New button (instead of Duplicate) if you want to start from scratch with the configuration...]

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20041223112819235