[squeak-dev] finding the unix localhost name

Bruce O'Neel bruce.oneel at pckswarms.ch
Thu Mar 30 17:33:46 UTC 2023


Oh it is worse than that.

A system really doesn't have a canonical host name per se.  It can
have:

1. One IP address and no host names

2. One IP address and one host name

3. One IP address and multiple host names

4. Multiple IP addresses and one host name (different disconnected
networks, say IPv6/IPv4 or 1G/10G/40G)

5. Multiple IP addresses and multiple host names (but not necessarily
a one to one mapping)

and of course one hostname can map to multiple IP addresses on
different independent machines.

The idea is that a hostname resolves to an address and that address
lets you reach an interface on a machine.  

The result of the hostname command does not even have to map in such a
way that from outside the machine that hostname will allow you reach
that machine.

cheers

bruce

On 2023-03-30T18:53:50.000+02:00, tim Rowledge <tim at rowledge.org>
wrote:

>>  On 2023-03-29, at 11:32 PM, Jakob Reschke
>>  <jakres+squeak at gmail.com> wrote:
>>  
>>  Hi,
>>  
>>  I cannot contribute to the concrete question, but note that a host
>>  can have multiple addresses and can therefore be reachable under
>>  multiple host names. Depending on what you try to do, it may
>>  matter and you better check that you actually get the name that
>>  you expect in your production environment.
> 
> Yup, we've managed to make it very complicated. I'm sure OS people
> had excellent reasons but, boy, I wish somebody had seen a way to
> make it simpler. Anyway, my hypothesis is that using the hostname
> command means that we (Squeak) do do at least as well as we
> (commandline) can sensibly manage. If it is really the case that the
> question isn't properly answerable then we ought to remove the
> related methods etc so as to remove a point of confusion and error.
> 
> tim
> --
> tim Rowledge; tim at rowledge.orghttp://www.rowledge.org/tim
> Strange OpCodes: START: Cancel preceding jobs in queue

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230330/a67ae2d8/attachment.html>


More information about the Squeak-dev mailing list