On 8/17/07, Mike Gerdts <[EMAIL PROTECTED]> wrote:
> 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.


Ah, then it is unclear that the command is $ host `hostname`

"Host" is a command that was relatively recently added op Solaris that
will return an IP if given a hostname. (and a hostname if given an IP
address.) It's a bit like nslookup in it's functionality.

>
> 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/
>


-- 
- Brian Gupta

http://opensolaris.org/os/project/nycosug/
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to