With Solaris 2.x it is possible to configure multiple IP addresses for a
single physical interface. This allows a machine with a single ethernet
card to appear as an entire network of different machines.
In order to configure the lance ethernet (le0 or hme0) device to support more
than one ip address, do the following:
1. Create entries in /etc/hosts for each hostname your physical machine
will appear as.
128.195.10.31 myhost
128.195.10.46 myhost2
128.195.10.78 myhost3
2. Create /etc/hostname.le0:n files that contain the hostname for the
virtual host n. Note that hostname.le0:0 is the same as hostname.le0
/etc/hostname.le0 (Contains name myhost)
/etc/hostname.le0:1 (Contains name myhost2)
/etc/hostname.le0:2 (Contains name myhost3)
or
/etc/hostname.hme0 --> 10/100Mbit/sec high speed interface
/etc/hostname.hme0:1
/etc/hostname.hme0:2
The above changes will cause the virtual hosts to be configured at boot
time.
You can also directly enable/modify a logical hosts configuration by
running ifconfig directly on one of the logical hosts by using the le0:n
naming scheme.
% ifconfig le0:1 up
% ifconfig le0:1 129.153.76.72
% ifconfig le0:1 down
or
% ifconfig hme0:1 up
% ifconfig hme0:1 129.153.76.72
% ifconfig hme0:1 down