Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Add an additional IP interface to one Ethernet card System
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...]
    •    
  • Currently 3.75 / 5
  You rated: 5 / 5 (4 votes cast)
 
[15,462 views]  

Add an additional IP interface to one Ethernet card | 4 comments | Create New Account
Click here to return to the 'Add an additional IP interface to one Ethernet card' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Add an additional IP interface to one Ethernet card
Authored by: fluffy on Dec 27, '04 12:23:39PM

Note that when you do this, only one of two can use DHCP to get an IP address - an address must me manually assigned to the other.



[ Reply to This | # ]
For ethernet... what about airport?
Authored by: gabester on Dec 28, '04 12:36:05AM

I've noticed on both these hints that multihoming works fine for wired networking. You can duplicate either an ethernet or a firewire interface with no troubles.

However, I'd like to be able to do this with airport (and aren't 802.11b/g just wireless ethernet?) Why? Because I've got an old wireless router at home that works and is near my broadband connection. I'd also like to use an Airport Express to send my iTunes to the stereo which isn't near the broadband connection. My old router doesn't do WDS, unfortunately. So without being able to multihome on 802.11b (hey, my old iBook only has standard airport) I'm stuck either surfing OR streaming music to the stereo; I can't do both at the same time (old wireless router plugged into broadband connection; new AExp plugged into stereo on other side of the house.)

Is this even possible, or is this limitation built into 802.11b/g, and should I just suck it up and buy a newer router that does WDS?
g=



[ Reply to This | # ]
For ethernet... what about airport?
Authored by: milkki on Dec 28, '04 01:11:41PM

You can do this in terminal with ifconfig: sudo ifconfig en1 inet xxx.xxx.xxx.xxx netmask 255.255.255.0 alias

Where sudo = execute as root, en1 = the interface you want to add an alias to, xxx.xxx.xxx.xxx = ip you wan to add, 255.255.255.0 = desired netmask.

I'm using this all the time with airport (public ip via DHCP) and private ip LAN.

[ Reply to This | # ]
For ethernet... what about airport?
Authored by: hunty on Dec 28, '04 05:43:14PM

dude just get the AX to connect to the 802.11b network that is currently running. Thats what i do. I've got a draytek router 54G which is my adsl router/wireless network. the ax is in the other end of the house but it just connects to the draytek wireless network and then i can be browsing the web on my powerbook and send music to the ax because its all on the same network.



[ Reply to This | # ]