Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On linux boxes it is possible to add multiple ip addresses to the same network interface.

It's achived with the following command:

ip addr add 128.133.123.83/24 dev eth0

Is there any way to to the same with OS X ?

I've tried to put multiple ip addresses (comma separated like the dns) in System Preferences / Network with no luck...

share|improve this question
up vote 11 down vote accepted

Yeah, it's pretty easy. Open the System Preferences, go to Networking, then click the Plus sign under the left bar. Choose the interface, give a name to the adapter configuration you're creating, then press OK and deal with it as you would like to. Click Apply when you're done, and enjoy. Your adapter now has two IP addresses.

share|improve this answer
    
How can it make it work with a browser? I mean, I can ping or telnet using the new address, but I can't connect using the browser... – yeyeyerman Feb 26 at 11:32
    
You can reorder adapters in order of preference by dragging and dropping them. – zneak Feb 26 at 15:19

sudo ifconfig en0 alias 128.133.123.83/24 up

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.