How can I have multiple addresses per interface?



Solaris 2.x provides a feature in ifconfig that allows having more
than one IP address per interfaces. Undocumented but existing
prior to 2.5, documented in 2.5 and later.


Syntax:



# This command is only required in later releases
ifconfig IF:N plumb
ifconfig IF:N ip-address up


where "IF" is an interface (e.g., le0) and N is a number between 1 and
<MAX>. Removing the pseudo interface and associated address is done
with



ifconfig IF:N 0.0.0.0 down
# In newer release you must use the following command, but
# beware that this unplumbs your real interface on older
# releases, so try the above command first.
ifconfig IF:N unplumb


As with physical interfaces, all you need to do is make the
appropriate /etc/hostname.IF:X file.


The maximum number of virtual interfaces, <MAX> above, is 255 in
Solaris releases prior to 2.6. Solaris 2.6 and Solaris 2.5.1 with
the Solaris Internet Server Supplement (SISS) allow you to set
this value with ndd, upto a hard maximum of 8192.



/usr/sbin/ndd -set /dev/ip ip_addrs_per_if 4000


There's no limit inspired by the code; so if you bring out adb you
can increase the maximum even further.





UNIXguide.net
Suggest a Site