3 Replies Latest reply: Mar 12, 2007 6:50 AM by gdiscenza
Eby Mani Level 2 Level 2 (170 points)
I've created virtual/fake interfaces from Network->Network Port Configurations -> Duplicate.

Is there a way to do this thru command line ? What is the correct term for this, TAP interface?

ok, the DHCP server(another OS X server or router) won't assign ip's to these "virtual interfaces or what ever", because they all have the same MAC address.

Using "DHCP with Manual address" or set up ip's manually works.

Is there a way to create virtual MAC addresses and associate these ip's to it? cause i plan to use port security feature.

I'm using 10.3.9 server, any fink or darwin port packages are also welcomed. Thanks in advance.

Power Mac G3 Server   Mac OS X (10.3.9)  
  • Camelot Level 8 Level 8 (46,115 points)
    >Is there a way to do this thru command line ? What is the correct term for this, TAP interface?

    You have two ways of assigning multiple IP addresses, depending on quite what you want to do.

    If you just want multiple addresses, you can use ifconfig along with the 'alias' parameter:

    <pre class=command>ifconfig en0 1.2.3.4 netmask 255.255.255.0 broadcast 1.2.3.255 alias</pre>

    This will add the address 1.2.3.4/24 to en0 in addition to any existing addresses.

    If you truly want multiple interfaces (en0, en1, en2, etc.) then use networksetup:

    <pre class=command>networksetup -createnetworkservice "My New NIC" "Built-in Ethernet 1"</pre>

    which will create a new network port called 'My New NIC' on en0.

    >ok, the DHCP server(another OS X server or router) won't assign ip's to these "virtual interfaces or what ever", because they all have the same MAC address.

    Of course. Servers shouldn't run via DHCP anyway, so it's largely a moot point.

    >Is there a way to create virtual MAC addresses and associate these ip's to it? cause i plan to use port security feature.

    I don't believe so. MAC addresses are set at the hardware level, not at the virtual port level. You should use static addresses for all interfaces.

    > any fink or darwin port packages are also welcomed

    Really? Not on my servers they're not, but each to his own
  • Eby Mani Level 2 Level 2 (170 points)
    Many Thanks Camelot,

    >Is there a way to create virtual MAC addresses
    and associate these ip's to it? cause i plan to use
    port security feature.


    I don't believe so. MAC addresses are set at the
    hardware level, not at the virtual port level. You
    should use static addresses for all interfaces.


    ok, you know morethan i do, for ARP(not apple remote) and other stuff we need MAC addr. What makes you think it is not possible to create virtual MAC addresses, when Virtual PC, VMWare and other virtualization apps create virtual MAC's and use TAP driver to communicate thru real ethernet ?.

    FreeBSD 6 does this, thru veif / virtual interfaces command. It seems much of Free, Net & Open BSD commands are not included with OS X, like bridge, veif, etc... for some reason.
  • gdiscenza Level 1 Level 1 (90 points)
    It seems much of Free, Net & Open BSD
    commands are not included with OS X, like bridge,
    veif, etc... for some reason.


    That I can answer...OS X was not built on a BSD foundation, it was built on an OS that Apple owned. Mach was the underlying unix platform for the NeXT, which Apple bought when Steve Jobs came back on board. Having been a NeXT administrator (long ago) I can tell you that many of the BSD features that I was used to were absent from Mach, so I don't expect to see them in OS X.

    Sorry for the ancient history lesson, just trying to clarify the lack of services you are used to seeing.

    -Gregg