Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I connect my Macbook pro to internet through Lan and if I type ifconfig in terminal my en0 interface get valid IP now I want add en1, en2 and en3 to my configuration and they all be able to get valid IPs, I don't want to add additional network card I just want to use my internal network card. I don't know if I must use bridging or nating or ... . please help find my solution.

share|improve this question

migrated from serverfault.com Nov 6 '11 at 9:45

This question came from our site for professional system and network administrators.

    
Tell us what end you are trying to achieve, because I don't understand what you're after. Why do you want to have multiple ways (en0, en1, en2...) to refer to a single interface? If you want multiple IP addresses on the same interface, that is doable. –  AlanGBaker Nov 6 '11 at 9:20
add comment

2 Answers 2

What you are looking for is called IP address aliasing. In Mac OSX you can create an aliased address by issuing the following command (see the ifconfig manpage for more details):

sudo ifconfig en0 alias $ADDRESS $NETMASK

However, you cannot receive DHCP leases on these "virtual NICs" (see here for why) so you will need to have an available static IP address and know the appropriate gateway, all information you can get from your ISP. Depending on what your ISP's upstream subnetting and routing looks like you may also have to add a static route (see the route manapage).

share|improve this answer
    
Changes made with ifconfig tend to get overwritten by OS X's config daemon -- it's better to make settings changes with System Preferences or networksetup, and then let configd apply them. –  Gordon Davisson Nov 6 '11 at 17:06
add comment

In System Preferences -> Network click on the + to add a new interface, in the popup choose Ethernet. This will not create an additional en1 or en2 interface, but add an additional address to your en0 interface.

share|improve this answer
add comment

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.