Apple Support Communities > Servers and Enterprise Software > Mac OS X Server v10.4 and earlier > Discussions
This discussion is archived
2965 Views 3 Replies Latest reply: Mar 12, 2007 6:50 AM by gdiscenza
Currently Being ModeratedMar 11, 2007 7:25 PM (in response to Eby Mani)>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 22.214.171.124 netmask 255.255.255.0 broadcast 126.96.36.199 alias</pre>
This will add the address 188.8.131.52/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 ownMac OS X (10.4.8)
Currently Being ModeratedMar 11, 2007 11:14 PM (in response to Camelot)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.Power Mac G3 Server, Mac OS X (10.3.9)
Currently Being ModeratedMar 12, 2007 6:50 AM (in response to Eby Mani)
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.
-GreggG4 Cube, Mac OS X (10.4.8)