Re: Strangeness with networking example...

From: John Lazzaro (lazzaro@cs.berkeley.edu)
Date: Sat Aug 11 2001 - 19:29:41 EDT


> Is there something that I need to do?

Yes, type this:

uname -n

What comes back? Also type this:

more /etc/hosts

What comes back? This should provides some clues for me to
work with ... what's happening here is that your machine has
a deep identity crisis -- it doesn't know its own IP number,
at least some parts of it doesn't. So when its sets itself
up using these two lines:

  if (gethostname(nsys_clientname, NSYS_HOSTNAMESIZE) < 0)
    NSYS_ERROR_RETURN("Machine domain name unknown.");
  if ((myinfo = gethostbyname(nsys_clientname)) == NULL)
    NSYS_ERROR_RETURN("Machine IP number unknown.");

The first line succeeds but the second line fails. Its
probably a good idea to send these files back to me
privately instead of to the list, since these postings
get archived on the web and there's a small chance that
some hacker gets helped by knowning your /etc/hosts file
info.

More generally though, there may not really be a reason for
a gethostbyname() failure to be catastrophic -- I hadn't
thought about the problem until now, all of the machinery
that does NAT-detection on the server end also can let the
"show go on" even if your machine has an identity crises ...

Also, I'm really more familiar with enterprise-style networks
than configuring ISP-style networks -- if there's a standard
fix for handling the "cable-modem machine can't translate its
own name into an IP number", please post and educate us all!
Thanks,

-------------------------------------------------------------------------
John Lazzaro -- Research Specialist -- CS Division -- EECS -- UC Berkeley
lazzaro [at] cs [dot] berkeley [dot] edu www.cs.berkeley.edu/~lazzaro
-------------------------------------------------------------------------



This archive was generated by hypermail 2b29 : Mon Jan 28 2002 - 11:46:43 EST