3635 Views 3 Replies Latest reply: Mar 12, 2007 6:50 AM by gdiscenza
>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 220.127.116.11 netmask 255.255.255.0 broadcast 18.104.22.168 alias</pre>
This will add the address 22.214.171.124/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
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.
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.