On 8/17/07, Brandorr <[EMAIL PROTECTED]> wrote:
> Is there an OpenSolaris networking FAQ? Also, I am working on a FAQ
> for new users, and would like to know if a) I am missing any common
> networking questions, and b) my answers are correct.
>
> http://www.genunix.org/wiki/index.php/FAQ_Prototype#Networking
The "primary IP address" question doesn't really have the right
answer. hostname(1) does not return an IP address and as best as I
can tell, there is no such notion of a primary IP address.
The best approximation for a good answer on a reasonably configured
single-interface system would be:
getent hosts `hostname` | awk '{print $1}'
But that assumes that the system is reasonably configured and that
people agree with me on what is reasonable and that you don't have
multiple interfaces.
I *wish* I could tell Solaris what its primary interface is. This is
a common pain point when many physical and virtual interfaces exist
and authorization (firewall, NFS, etc.) is performed
by IP address.
Mike
--
Mike Gerdts
http://mgerdts.blogspot.com/
_______________________________________________
networking-discuss mailing list
[email protected]