Two IP addresses and one network card

Two IP addresses and one network card

Post by Przemek B » Tue, 21 Nov 2000 04:00:00



What is the most "proper" way (in Solaris environment) to have
two IP addresses on one network card ?
Currently one address is taken from /etc/hosts and the other
is taken from /etc/init.d/local scripts which containts
ifconfig hme0:1 192.168.1.2 ....
But I wonder if there is another, more "proper" way.

przemol

 
 
 

Two IP addresses and one network card

Post by Logan Sh » Tue, 21 Nov 2000 04:00:00




>What is the most "proper" way (in Solaris environment) to have
>two IP addresses on one network card ?
>Currently one address is taken from /etc/hosts and the other
>is taken from /etc/init.d/local scripts which containts
>ifconfig hme0:1 192.168.1.2 ....
>But I wonder if there is another, more "proper" way.

Yes.  Create /etc/hostname.hme0 (you probably already have this) and
also /etc/hostname.hme0:1 (you probably don't have this).

Either can contain either an IP address or a hostname.  If it's a
hostname, it will be looked up in /etc/hosts.

Hope that helps.

  - Logan