host names, network names and IP addresses - Mandriva

This is a discussion on host names, network names and IP addresses - Mandriva ; Hi, There is some confusion (to me) about the relationship between host names, IP addresses and things. Everyone is quite clear about IP addresses belonging to network interfaces not computers. Different interfaces can be plugged into different networks. A bridge ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 31

Thread: host names, network names and IP addresses

  1. host names, network names and IP addresses

    Hi,

    There is some confusion (to me) about the relationship between
    host names, IP addresses and things.

    Everyone is quite clear about IP addresses belonging to
    network interfaces not computers. Different interfaces can
    be plugged into different networks.

    A bridge must be plugged into two networks. For example, a
    bridge's network interfaces might have IP addresses of
    192.168.4.4 and 192.168.3.3, so the bridge would have IP
    addresses of 192.168.4.4, 192.168.3.3 and 127.0.0.1.

    Let's call the 192.168.4.0 network nw4.invalid and 192.168.3.0
    nw3.invalid. These names and numbers can be put in /etc/networks
    if desired.

    First oddity, IP addresses are real and names are just a human
    convenience. Different computers on a single network can have
    different names for the same network. It would be a silly thing
    to do, and if your DNS is running properly it won't happen.

    The hard part is, does a name apply to an interface or a computer?
    Mostly it unimportant because there is only one interface, or
    they all have the same name.

    Sun seems quite insistent that there is a config file for each
    interface and the host name, or rather, *a* host name goes in each
    file.

    Multiple lines in /etc/hosts can pretty much do the same thing.

    Just for good measure, different computers can have different names
    in their respective /etc/hosts file for a given IP address, but
    let's ignore that as pathological.

    Here is an example...

    ,----[ /etc/hosts ]
    | 127.0.0.1 localhost
    | 192.168.1.1 nb.home.invalid nb
    | 192.168.1.2 live.home.invalid live
    | 192.168.2.1 a64.test.invalid a64
    | 192.168.2.2 x2.test.invalid x2
    `----

    "live" and "a64" are the same machine.

    Pinging localhost, live and a64 (from live/a64) works.

    "hostname -i" returns 192.168.1.2, but the man page says it should
    return the IP addresses. Plural! Bug, or typo?

    Also, how does hostname decide which name to give out? Should it
    give both?


    --
    sig goes here...
    Peter D.

  2. Re: host names, network names and IP addresses

    On Tue, 07 Aug 2007 22:46:44 +1000, Peter D. wrote:
    >
    > First oddity, IP addresses are real and names are just a human
    > convenience. Different computers on a single network can have
    > different names for the same network. It would be a silly thing
    > to do, and if your DNS is running properly it won't happen.
    >
    > The hard part is, does a name apply to an interface or a computer?


    Why not have names for node/host and names for ip addresses.

    For instance I could move incomming.mail.invalid to a different node
    (server1, server2,...).

    I just give incomming.mail.invalid a new ip address for routing to an
    interface.

  3. Re: host names, network names and IP addresses

    On Tue, 07 Aug 2007 08:46:44 -0400, Peter D. wrote:

    > The hard part is, does a name apply to an interface or a computer?
    > Mostly it unimportant because there is only one interface, or
    > they all have the same name.


    There's more than one use for the hostname.

    Having more than one hostname resolve to the same ip address can, for
    example, be used by httpd to use different directories, depending on which
    host name was used to contact the http server (Note, this doesn't work for https).

    Having more than one ip address assigned to a given hostname (via dns),
    can be used for load sharing, for requests coming from other systems.

    Other dameons such as postfix, cups, etc, rely on a single hostname,
    assigned to the computer, which is not necessarily, the same as the name
    assigned to any of the nics on that computer. That name must be able
    to be resolved to an ip address. In my case hodgins.homeip.net
    locally resolves (via /etc/hosts) to 127.0.0.1, while the ppp ip
    address is stored at the dyndns servers, for external access.

    > "hostname -i" returns 192.168.1.2, but the man page says it should
    > return the IP addresses. Plural! Bug, or typo?
    > Also, how does hostname decide which name to give out? Should it
    > give both?


    I think it's a typo. While dns can provide multiple ip addresses for a
    given hostname, the hostname command only refers to the computer, that it
    is running on.

    $ hostname -i -v
    gethostname()=`hodgins.homeip.net'
    Resolving `hodgins.homeip.net' ...
    Result: h_name=`hodgins.homeip.net'
    Result: h_aliases=`hodgins'
    Result: h_addr_list=`127.0.0.1'
    127.0.0.1

    At least, that's the way I understand it.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  4. Re: host names, network names and IP addresses

    On Tue, 07 Aug 2007 22:46:44 +1000, Peter D. wrote:

    > Hi,
    >
    > There is some confusion (to me) about the relationship between host
    > names, IP addresses and things.
    >
    > Everyone is quite clear about IP addresses belonging to network
    > interfaces not computers. Different interfaces can be plugged into
    > different networks.


    Almost....

    IP addresses are used to point to an interface, but an interface may have
    multiple IPs. It can only have one MAC address which is constant and
    supplied by the manufacturer.


    >
    > A bridge must be plugged into two networks. For example, a bridge's
    > network interfaces might have IP addresses of 192.168.4.4 and
    > 192.168.3.3, so the bridge would have IP addresses of 192.168.4.4,
    > 192.168.3.3 and 127.0.0.1.
    >
    > Let's call the 192.168.4.0 network nw4.invalid and 192.168.3.0
    > nw3.invalid. These names and numbers can be put in /etc/networks if
    > desired.
    >
    > First oddity, IP addresses are real and names are just a human
    > convenience. Different computers on a single network can have different
    > names for the same network. It would be a silly thing to do, and if
    > your DNS is running properly it won't happen.
    >
    > The hard part is, does a name apply to an interface or a computer?
    > Mostly it unimportant because there is only one interface, or they all
    > have the same name.


    Depends on the name.... Is it a "node" name or a "network" name?

    Names, be they node, DNS or whatever are for human use. They *should*
    point to an IP address.

    >
    > Sun seems quite insistent that there is a config file for each interface
    > and the host name, or rather, *a* host name goes in each file.


    So? To make your life easier, each IP has a hostname.

    >
    > Multiple lines in /etc/hosts can pretty much do the same thing.


    No. The config file for an interface is the connection point between
    hardware and software. As each interface contains its own MAC, it needs
    something to translate that into something the software can use, an IP
    address.

    The host file adds the hostname to that address for human use.


    >
    > Just for good measure, different computers can have different names in
    > their respective /etc/hosts file for a given IP address, but let's
    > ignore that as pathological.
    >
    > Here is an example...
    >
    > ,----[ /etc/hosts ]
    > | 127.0.0.1 localhost
    > | 192.168.1.1 nb.home.invalid nb | 192.168.1.2
    > live.home.invalid live | 192.168.2.1 a64.test.invalid a64 |
    > 192.168.2.2 x2.test.invalid x2 `----


    Hmmm....

    Never saw a hosts file like that....

    From the man page for hosts:

    This manual page describes the format of the /etc/hosts file. This file
    is a simple text file that associates IP addresses with
    hostnames, one
    line per IP address. For each host a single line should be present
    with
    the following information:

    IP_address canonical_hostname [aliases...]

    E.G. 192.168.1.1 foobar.bar.net foobar fred

    Where the "names" are for the address. If you put a number
    ( 192.168.1.100 ) where a name belongs, you will get the "name"
    192.168.1.100 returned for whatever IP address you have listed on that
    line.


    >
    > "live" and "a64" are the same machine.
    >
    > Pinging localhost, live and a64 (from live/a64) works.
    >
    > "hostname -i" returns 192.168.1.2, but the man page says it should
    > return the IP addresses. Plural! Bug, or typo?
    >
    > Also, how does hostname decide which name to give out? Should it give
    > both?


    Depends on how its called. If you use:

    $ hostname

    You get the hostname as a name.

    $ hostname -i

    You get the IP address of the the host as defined by hostname.

    Hope this clears up some of your misunderstanding.

    If not let us know, we'll try again.


  5. Re: host names, network names and IP addresses

    on Wednesday 08 August 2007 06:27
    in the Usenet newsgroup alt.os.linux.mandriva
    David W. Hodgins wrote:

    > On Tue, 07 Aug 2007 08:46:44 -0400, Peter D.
    > wrote:
    >
    >> The hard part is, does a name apply to an interface or a computer?
    >> Mostly it unimportant because there is only one interface, or
    >> they all have the same name.

    >
    > There's more than one use for the hostname.
    >
    > Having more than one hostname resolve to the same ip address can, for
    > example, be used by httpd to use different directories, depending on which
    > host name was used to contact the http server (Note, this doesn't work for
    > https).


    Aliases aren't worrying me.

    Are you saying that when a packet arrives at a server it not only has
    the necessary IP address of the target (the server) but still has
    a name in it? I imagined that that would have been discarded as
    redundant.

    For example packets addressed as 192.168.1.2(live.home.invalid)
    and 192.168.1.2(ntp.home.invalid) both arrive at the same place
    but are treated differntly?

    > Having more than one ip address assigned to a given hostname (via dns),
    > can be used for load sharing, for requests coming from other systems.
    >
    > Other dameons such as postfix, cups, etc, rely on a single hostname,
    > assigned to the computer, which is not necessarily, the same as the name
    > assigned to any of the nics on that computer.


    O.K. That is an important point. Can that name be a short name
    or a long dotted name? Does it have to be a particular format?

    > That name must be able
    > to be resolved to an ip address. In my case hodgins.homeip.net
    > locally resolves (via /etc/hosts) to 127.0.0.1, while the ppp ip
    > address is stored at the dyndns servers, for external access.
    >
    >> "hostname -i" returns 192.168.1.2, but the man page says it should
    >> return the IP addresses. Plural! Bug, or typo?
    >> Also, how does hostname decide which name to give out? Should it
    >> give both?

    >
    > I think it's a typo.


    One vote for typo - so far.

    If "hostname -i" is only supposed to return one IP address on
    a machine that has many, how does it decide which IP address to
    hand out?

    The brackets make it look deliberate.

    -i, --ip-address
    Display the IP address(es) of the host.

    > While dns can provide multiple ip addresses for a
    > given hostname,


    Pardon? I though that a DNS should return *the* computer friendly
    IP address associated with a human friendly name - even if that
    association changes from instant to instant in a round robin.
    A DNS won't ever hand out two IP address in response to a single
    request will it?

    > the hostname command only refers to the computer, that it
    > is running on.


    As distinct from an interface on the computer it is running on?
    Or as distinct from other computers?

    > $ hostname -i -v
    > gethostname()=`hodgins.homeip.net'
    > Resolving `hodgins.homeip.net' ...
    > Result: h_name=`hodgins.homeip.net'
    > Result: h_aliases=`hodgins'
    > Result: h_addr_list=`127.0.0.1'
    > 127.0.0.1
    >
    > At least, that's the way I understand it.
    >
    > Regards, Dave Hodgins
    >


    --
    sig goes here...
    Peter D.

  6. Re: host names, network names and IP addresses

    on Wednesday 08 August 2007 00:11
    in the Usenet newsgroup alt.os.linux.mandriva
    Bit Twister wrote:

    > On Tue, 07 Aug 2007 22:46:44 +1000, Peter D. wrote:
    >>
    >> First oddity, IP addresses are real and names are just a human
    >> convenience. Different computers on a single network can have
    >> different names for the same network. It would be a silly thing
    >> to do, and if your DNS is running properly it won't happen.
    >>
    >> The hard part is, does a name apply to an interface or a computer?


    I thought that I was getting a hold of this but...

    > Why not have names for node/host and names for ip addresses.


    I assume that you regard node and host as synonyms.

    A different name for the host and each of its interfaces is OK.
    How can/does/should this work?

    Each host has one "real" name and a whole bunch of aliases?
    Or a collection of equally valid names?
    Can the real name be a short name or does it have to be FQDN
    like trouble_maker.no_such_network.invalid?
    The host's "real" name might, or might not, be the same as
    one of the names of one of the interfaces?
    There is no IP address (except 127.0.0.N) that is associated
    with the host but not associated with one of the interfaces?
    Each interface has (at least) one IP address?
    (Is PPP an exception?)
    Each of those IP addresses (should have) a "real" FQDN?
    Each IP address may have many alias FQDNs and short names?
    Using any one of those names or numbers will get to the host.

    Where are all of these name, numbers and associations stored?

    This is going to get nasty when virtual hosts / virtual nodes get
    in on the act.

    > For instance I could move incomming.mail.invalid to a different node
    > (server1, server2,...).
    >
    > I just give incomming.mail.invalid a new ip address for routing to an
    > interface.


    Sooooo, incoming.mail.invalid is associated (in the sysadmin's mind)
    with a daemon rather than an interface or a host. The nearest it has
    to a physical existence is an entry as an alias in a few /etc/hosts
    files?


    --
    sig goes here...
    Peter D.

  7. Re: host names, network names and IP addresses

    on Wednesday 08 August 2007 10:21
    in the Usenet newsgroup alt.os.linux.mandriva
    Jim Whitby wrote:

    > On Tue, 07 Aug 2007 22:46:44 +1000, Peter D. wrote:
    >
    >> Hi,
    >>
    >> There is some confusion (to me) about the relationship between host
    >> names, IP addresses and things.
    >>
    >> Everyone is quite clear about IP addresses belonging to network
    >> interfaces not computers. Different interfaces can be plugged into
    >> different networks.

    >
    > Almost....
    >
    > IP addresses are used to point to an interface, but an interface may have
    > multiple IPs. It can only have one MAC address which is constant and
    > supplied by the manufacturer.


    O.K. that is fine.

    I think that it is only Ethernet interfaces that have MACs.
    MAC address should be world wide unique, but they can be faked.

    >> A bridge must be plugged into two networks. For example, a bridge's
    >> network interfaces might have IP addresses of 192.168.4.4 and
    >> 192.168.3.3, so the bridge would have IP addresses of 192.168.4.4,
    >> 192.168.3.3 and 127.0.0.1.
    >>
    >> Let's call the 192.168.4.0 network nw4.invalid and 192.168.3.0
    >> nw3.invalid. These names and numbers can be put in /etc/networks if
    >> desired.
    >>
    >> First oddity, IP addresses are real and names are just a human
    >> convenience. Different computers on a single network can have different
    >> names for the same network. It would be a silly thing to do, and if
    >> your DNS is running properly it won't happen.
    >>
    >> The hard part is, does a name apply to an interface or a computer?
    >> Mostly it unimportant because there is only one interface, or they all
    >> have the same name.

    >
    > Depends on the name.... Is it a "node" name or a "network" name?


    At the moment I think that nodes, interfaces and networks have names.

    From one of the examples above, give the interface 192.168.4.4
    the name "joker.nw4.invalid". Chop off the first part of the FQDN
    and zero the host part of the IP to get the network's name and
    number, nw4.invalid (192.168.4.0).

    For sanity all of the hosts on 192.168.4.0 should call it the
    same name (nw4.invalid), but they don't have to.

    For sanity all of the hosts should know that joker.nw4.invalid
    is 192.168.4.4, but they don't have to.

    I'm undecided about having the same short alias for all interfaces
    on a host. Such as; joker.nw3.invalid (192.168.3.3), joker.nw4.invalid
    (192.168.4.4) and joker.hostdomain (127.0.0.2). Probably not a
    good idea.

    > Names, be they node, DNS or whatever are for human use. They *should*
    > point to an IP address.
    >
    >>
    >> Sun seems quite insistent that there is a config file for each interface
    >> and the host name, or rather, *a* host name goes in each file.

    >
    > So? To make your life easier, each IP has a hostname.


    Everyone else seems to have decide on a single hosts file for
    all interfaces, but that nudges people towards the idea of an
    IP to host relationship rather than an IP to interface relationship.

    >> Multiple lines in /etc/hosts can pretty much do the same thing.

    >
    > No. The config file for an interface is the connection point between
    > hardware and software. As each interface contains its own MAC, it needs
    > something to translate that into something the software can use, an IP
    > address.
    >
    > The host file adds the hostname to that address for human use.


    I've been happily ignoring MACs. I'm using /etc/hosts to associate
    IPs, FQDNs and aliases.

    >> Just for good measure, different computers can have different names in
    >> their respective /etc/hosts file for a given IP address, but let's
    >> ignore that as pathological.
    >>
    >> Here is an example...
    >>
    >> ,----[ /etc/hosts ]
    >> | 127.0.0.1 localhost
    >> | 192.168.1.1 nb.home.invalid nb | 192.168.1.2
    >> live.home.invalid live | 192.168.2.1 a64.test.invalid a64 |
    >> 192.168.2.2 x2.test.invalid x2 `----

    >
    > Hmmm....
    >
    > Never saw a hosts file like that....


    There have been some line wrap problems there. I'll try again.

    127.0.0.1 localhost
    192.168.1.1 nb.home.invalid nb
    192.168.1.2 live.home.invalid live
    192.168.2.1 a64.test.invalid a64
    192.168.2.2 x2.test.invalid x2

    One line per interface. Each line has IP, full name, [aliases].
    Both the "live" and "a64" interfaces are in the same host
    (which is also called "live" but could be called something else).

    > From the man page for hosts:
    >
    > This manual page describes the format of the /etc/hosts file. This file
    > is a simple text file that associates IP addresses with
    > hostnames, one
    > line per IP address. For each host a single line should be present
    > with
    > the following information:
    >
    > IP_address canonical_hostname [aliases...]
    >
    > E.G. 192.168.1.1 foobar.bar.net foobar fred


    Line per host or line per interface? I'm leaning towards line
    per interface at the moment.

    > Where the "names" are for the address. If you put a number
    > ( 192.168.1.100 ) where a name belongs, you will get the "name"
    > 192.168.1.100 returned for whatever IP address you have listed on that
    > line.


    I think that you are looking at some bad line wrapping.

    >> "live" and "a64" are the same machine.
    >>
    >> Pinging localhost, live and a64 (from live/a64) works.
    >>
    >> "hostname -i" returns 192.168.1.2, but the man page says it should
    >> return the IP addresses. Plural! Bug, or typo?
    >>
    >> Also, how does hostname decide which name to give out? Should it give
    >> both?

    >
    > Depends on how its called. If you use:
    >
    > $ hostname
    >
    > You get the hostname as a name.


    This is where my understanding starts to fall apart.

    If /etc/hosts controls the associations between *interface*
    names and numbers, where is the hostname configuration?

    > $ hostname -i
    >
    > You get the IP address of the the host as defined by hostname.


    At the moment I don't think that hosts have IP addresses,
    interfaces do. Bbbuuuutttt, hosts can have multiple interfaces,
    and interfaces can have multiple IP addresses, and IP
    addersses can have multiple names. So a host can have
    a plethora of valid names. How do you decide which, if any,
    interface, IP address and name are the primary ones?

    > Hope this clears up some of your misunderstanding.


    At the moment I think that the whole world is a little bit
    crazy - but maybe that is just a symptom. ;-)

    > If not let us know, we'll try again.



    --
    sig goes here...
    Peter D.

  8. Re: host names, network names and IP addresses

    On Thu, 09 Aug 2007 16:43:51 +1000, Peter D. wrote:
    > Bit Twister wrote:
    >
    > I assume that you regard node and host as synonyms.


    Well, I guess so. I do associate a host as the box it's self.
    A node is some device on the network with one or more interfaces.
    At that point, node=host. You might get into the ditch with those
    virtual do-hickeys though.


    > A different name for the host and each of its interfaces is OK.


    You got it. It will depend on, from where you are looking at it.

    > How can/does/should this work?
    > Each host has one "real" name and a whole bunch of aliases?


    Your call.

    > Or a collection of equally valid names?


    I'll quailfy that with names tied to ip addresses.

    > Can the real name be a short name or does it have to be FQDN
    > like trouble_maker.no_such_network.invalid?


    I'll recommend FQDN for your generic question.
    You would not want a resolver hunting for trouble_maker.your_isp
    when it is a node on the LAN.

    > The host's "real" name might, or might not, be the same as
    > one of the names of one of the interfaces?


    Yes.

    > There is no IP address (except 127.0.0.N) that is associated
    > with the host but not associated with one of the interfaces?


    Example 1:
    Yes, assuming you threw out something like
    96.226.25.1 isp_gateway
    in my /etc/hosts and

    $ ifconfig snippet shows
    eth0 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0

    If I ping -c1 isp_gateway it routes out of eth0 only because it is the
    default interface.

    Yet, we see
    $ host 96.226.25.1
    1.25.226.96.in-addr.arpa domain name pointer
    L100.VFTTP-33.DLLSTX.verizon-gni.net.


    > Each interface has (at least) one IP address?


    Yeees, If configured.

    > (Is PPP an exception?)


    Why? It usually is a hardware interface, serial instead of ethernet device.
    Are you going to get vague on a WiFi interface also, because it is not
    an ethernet device.

    > Each IP address may have many alias FQDNs and short names?
    > Using any one of those names or numbers will get to the host.


    I'll go along with that, if there is a connection.

    > Where are all of these name, numbers and associations stored?


    Depends on where they are defined and what is handing them out.
    Have you done a cat /etc/nsswitch.conf lately, followed by a
    grep hosts: /etc/nsswitch.conf

    Now go back and follow Example 1, 8-)

    > This is going to get nasty when virtual hosts / virtual nodes get
    > in on the act.


    Ah, yup.

    >> For instance I could move incomming.mail.invalid to a different node
    >> (server1, server2,...).
    >>
    >> I just give incomming.mail.invalid a new ip address for routing to an
    >> interface.

    >
    > Sooooo, incoming.mail.invalid is associated (in the sysadmin's mind)
    > with a daemon rather than an interface or a host.


    Until it goes down. Then the admin wants to know what /host/ to go look
    at.

    > The nearest it has to a physical existence is an entry as an alias
    > in a few /etc/hosts files?


    In the simple network, yes, in the complex network, a DNS server
    somewhere knows who to ask what name is defined to an ip address.

  9. Re: host names, network names and IP addresses

    On Thu, 09 Aug 2007 02:40:03 -0400, Peter D. wrote:

    > Are you saying that when a packet arrives at a server it not only has
    > the necessary IP address of the target (the server) but still has
    > a name in it? I imagined that that would have been discarded as
    > redundant.


    Depends on the protocol. If you capture an http get request, you'll
    see the host specified in the http data (not the ip, or tcp data).

    > For example packets addressed as 192.168.1.2(live.home.invalid)
    > and 192.168.1.2(ntp.home.invalid) both arrive at the same place
    > but are treated differntly?


    Only for http, and any other protocols that support virtual servers.
    Not for protocols, such as https.

    >> Other dameons such as postfix, cups, etc, rely on a single hostname,
    >> assigned to the computer, which is not necessarily, the same as the name
    >> assigned to any of the nics on that computer.

    >
    > O.K. That is an important point. Can that name be a short name
    > or a long dotted name? Does it have to be a particular format?


    It has to be resolvable either by the hosts file, or dns. The name
    used, is the name returned by the hostname command. In order to
    be resolvable, it must have at least one period in the name. It
    cannot be just a tld, or alias.

    Initially, the name is set via /etc/HOSTNAME, then changed by
    /etc/sysconfig/network. It may be changed by any of the interface
    startup scripts, if that interface's cfg file has NEEDHOSTNAME=yes.
    It may also be changed by other "helper" scripts. This is one aspect
    that has changed, with different versions. New helper scripts, keep
    hiding what they're doing, and where things need to be set.

    In my case I have ...

    [root@hodgins etc]# grep homeip /etc/*
    HOSTNAME:hodgins.homeip.net
    hosts:127.0.0.1 hodgins.homeip.net hodgins
    printcap:CANONMULT150|CANON MP150:rm=hodgins.homeip.net:rp=CANONMULT150:

    [root@hodgins etc]# grep homeip /etc/sysconfig/*
    sysconfig/network:HOSTNAME=hodgins.homeip.net

    I also have 127.0.0.1 set to localhost in /etc/hosts.

    >> That name must be able
    >> to be resolved to an ip address. In my case hodgins.homeip.net
    >> locally resolves (via /etc/hosts) to 127.0.0.1, while the ppp ip
    >> address is stored at the dyndns servers, for external access.
    >>
    >>> "hostname -i" returns 192.168.1.2, but the man page says it should
    >>> return the IP addresses. Plural! Bug, or typo?
    >>> Also, how does hostname decide which name to give out? Should it
    >>> give both?

    >>
    >> I think it's a typo.

    >
    > One vote for typo - so far.
    >
    > If "hostname -i" is only supposed to return one IP address on
    > a machine that has many, how does it decide which IP address to
    > hand out?
    >
    > The brackets make it look deliberate.


    Possibly, if you have virtual http servers setup, it may return more,
    but I don't have that setup, and can't test it.

    > A DNS won't ever hand out two IP address in response to a single
    > request will it?


    # host gmail.com
    gmail.com has address 64.233.171.83
    gmail.com has address 64.233.161.83
    gmail.com has address 72.14.253.83
    gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
    gmail.com mail is handled by 10 alt2.gmail-smtp-in.l.google.com.
    gmail.com mail is handled by 50 gsmtp163.google.com.
    gmail.com mail is handled by 50 gsmtp183.google.com.
    gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.

    If you were to run the hostname -i command, on one of the computers
    assigned to gmail.com, it may return a list of ip addresses. I'm
    not sure. It would depend on the setup of that system, and how it's
    resolving addresses from local dns lookups. (i.e. hosts first, or
    dns first).

    Note: If you capture the dns lookup via wireshare, you'll see that
    the above is in a single response, to a single dns lookup.

    >> the hostname command only refers to the computer, that it
    >> is running on.

    > As distinct from an interface on the computer it is running on?
    > Or as distinct from other computers?


    Both. My intention, was distinct from an interface, but it applies
    to both.

    As a test, you could setup bind with multiple ip addresses assigned
    to a dummy.invalid hostname, set the computers current hostname to
    that dummy.invalid hostname, and then test the hostname -i command.

    I'm reversing my vote on typo. I think the above test would return
    a list.

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  10. Re: host names, network names and IP addresses

    On Thu, 09 Aug 2007 08:29:56 +0000, Bit Twister wrote:

    > On Thu, 09 Aug 2007 16:43:51 +1000, Peter D. wrote:
    >> Bit Twister wrote:
    >>
    >> I assume that you regard node and host as synonyms.

    >
    > Well, I guess so. I do associate a host as the box it's self. A node is
    > some device on the network with one or more interfaces. At that point,
    > node=host. You might get into the ditch with those virtual do-hickeys
    > though.


    Try to think of it this way:

    A machine has a name. It may or maynot have a network interface.
    If it has a network interface ( whatever type ), it has a node name,
    which may or maynot be the machine name.


    >
    >
    >> A different name for the host and each of its interfaces is OK.

    >
    > You got it. It will depend on, from where you are looking at it.
    >
    >> How can/does/should this work?
    >> Each host has one "real" name and a whole bunch of aliases?

    >
    > Your call.
    >
    >> Or a collection of equally valid names?

    >
    > I'll quailfy that with names tied to ip addresses.
    >
    >> Can the real name be a short name or does it have to be FQDN like
    >> trouble_maker.no_such_network.invalid?

    >
    > I'll recommend FQDN for your generic question. You would not want a
    > resolver hunting for trouble_maker.your_isp when it is a node on the
    > LAN.
    >

    Too many variables to make generic statements. If its used on a *small*
    LAN, then short names are ok. Since you wouldn't be using any DNS.

    If you connect to the internet, using DHCP, you will have a FQDN for that
    connection, however long it lasts. Which will no bearing on what the
    machine name or node name is for the other interface(s).

    If you have TCP/IP installed ( almost all do! ) you will have a "local
    interface" whose nodename is localhost. The IP address for local host is
    always 127.0.0.1. This is a software interface.

    If you have a larger LAN, you will *probably* be using DNS, which means
    you *should* use FDQN or the node(s). You can also have short names for
    the node(s). Keep in mind shor names are only useable in the hosts file,
    not DNS.



    >> The host's "real" name might, or might not, be the same as one of the
    >> names of one of the interfaces?

    >
    > Yes.
    >
    >> There is no IP address (except 127.0.0.N) that is associated with the
    >> host but not associated with one of the interfaces?

    >
    > Example 1:
    > Yes, assuming you threw out something like 96.226.25.1
    > isp_gateway
    > in my /etc/hosts and
    >
    > $ ifconfig snippet shows
    > eth0 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
    >
    > If I ping -c1 isp_gateway it routes out of eth0 only because it is the
    > default interface.
    >
    > Yet, we see
    > $ host 96.226.25.1
    > 1.25.226.96.in-addr.arpa domain name pointer
    > L100.VFTTP-33.DLLSTX.verizon-

    gni.net.
    >
    >
    >> Each interface has (at least) one IP address?

    >
    > Yeees, If configured.
    >
    >> (Is PPP an exception?)

    >
    > Why? It usually is a hardware interface, serial instead of ethernet
    > device. Are you going to get vague on a WiFi interface also, because it
    > is not an ethernet device.
    >
    >> Each IP address may have many alias FQDNs and short names? Using any
    >> one of those names or numbers will get to the host.

    >
    > I'll go along with that, if there is a connection.
    >
    >> Where are all of these name, numbers and associations stored?

    >
    > Depends on where they are defined and what is handing them out. Have you
    > done a cat /etc/nsswitch.conf lately, followed by a grep hosts:
    > /etc/nsswitch.conf
    >
    > Now go back and follow Example 1, 8-)
    >
    >> This is going to get nasty when virtual hosts / virtual nodes get in on
    >> the act.

    >
    > Ah, yup.
    >
    >>> For instance I could move incomming.mail.invalid to a different node
    >>> (server1, server2,...).
    >>>
    >>> I just give incomming.mail.invalid a new ip address for routing to an
    >>> interface.

    >>
    >> Sooooo, incoming.mail.invalid is associated (in the sysadmin's mind)
    >> with a daemon rather than an interface or a host.


    No. the FDQN incoming.mail.invalid is the name that points to an IP
    address.
    >
    > Until it goes down. Then the admin wants to know what /host/ to go look
    > at.
    >
    >> The nearest it has to a physical existence is an entry as an alias in a
    >> few /etc/hosts files?

    >
    > In the simple network, yes, in the complex network, a DNS server
    > somewhere knows who to ask what name is defined to an ip address.


    Try to remember this. FQDN names, short names and aliases ( node names )
    are human conventions. IP numbers are machine conventions. Node names are
    translated by whatever software is in use ( hosts file, YP, DNS or ?? )
    into IP addresses.

    ( to be completely accurate decimal IP addresses are changed into
    hexadecimal numbers to be used by the machine )

    Put another way. Node "names" are much easier for humans to understand.
    Node "numbers" are what the machine uses. To make life easy for us dumb
    humans, we use node names, like mail.yahoo.com, instead of trying to
    remember 69.147.112.160.

    Virtual Hosts, virtual interfaces, etc are no problem to keep track of. A
    small number of "nodes" can be done in /etc/hosts. Larger numbers,
    usually, are done in DNS.

    To summerize:

    A machine may or maynot have a network interface, but it has a name.

    A node has an IP address, a name is *not* a requiriement, but usually
    used.

    A node name *may* point to more than one IP address.

    An IP address *may* have more than one name.

    An interface *may* have more than one IP address.

    If you're not totally confused yet, give me some more time.

    jim

  11. Re: host names, network names and IP addresses

    On Thu, 09 Aug 2007 16:43:56 +1000, Peter D. wrote:

    > on Wednesday 08 August 2007 10:21
    > in the Usenet newsgroup alt.os.linux.mandriva Jim Whitby wrote:
    >
    >> On Tue, 07 Aug 2007 22:46:44 +1000, Peter D. wrote:
    >>
    >>> Hi,
    >>>
    >>> There is some confusion (to me) about the relationship between host
    >>> names, IP addresses and things.
    >>>
    >>> Everyone is quite clear about IP addresses belonging to network
    >>> interfaces not computers. Different interfaces can be plugged into
    >>> different networks.

    >>
    >> Almost....
    >>
    >> IP addresses are used to point to an interface, but an interface may
    >> have multiple IPs. It can only have one MAC address which is constant
    >> and supplied by the manufacturer.

    >
    > O.K. that is fine.
    >
    > I think that it is only Ethernet interfaces that have MACs. MAC address
    > should be world wide unique, but they can be faked.
    >
    >>> A bridge must be plugged into two networks. For example, a bridge's
    >>> network interfaces might have IP addresses of 192.168.4.4 and
    >>> 192.168.3.3, so the bridge would have IP addresses of 192.168.4.4,
    >>> 192.168.3.3 and 127.0.0.1.
    >>>
    >>> Let's call the 192.168.4.0 network nw4.invalid and 192.168.3.0
    >>> nw3.invalid. These names and numbers can be put in /etc/networks if
    >>> desired.
    >>>
    >>> First oddity, IP addresses are real and names are just a human
    >>> convenience. Different computers on a single network can have
    >>> different names for the same network. It would be a silly thing to
    >>> do, and if your DNS is running properly it won't happen.
    >>>
    >>> The hard part is, does a name apply to an interface or a computer?
    >>> Mostly it unimportant because there is only one interface, or they all
    >>> have the same name.

    >>
    >> Depends on the name.... Is it a "node" name or a "network" name?

    >
    > At the moment I think that nodes, interfaces and networks have names.
    >
    > From one of the examples above, give the interface 192.168.4.4 the name
    > "joker.nw4.invalid". Chop off the first part of the FQDN and zero the
    > host part of the IP to get the network's name and number, nw4.invalid
    > (192.168.4.0).
    >
    > For sanity all of the hosts on 192.168.4.0 should call it the same name
    > (nw4.invalid), but they don't have to.
    >
    > For sanity all of the hosts should know that joker.nw4.invalid is
    > 192.168.4.4, but they don't have to.
    >
    > I'm undecided about having the same short alias for all interfaces on a
    > host. Such as; joker.nw3.invalid (192.168.3.3), joker.nw4.invalid
    > (192.168.4.4) and joker.hostdomain (127.0.0.2). Probably not a good
    > idea.


    Unless you are using DNS. Why not just use nw4 and nw3?
    What is joker.hostname (127.0.0.2) for?

    >
    >> Names, be they node, DNS or whatever are for human use. They *should*
    >> point to an IP address.
    >>
    >>
    >>> Sun seems quite insistent that there is a config file for each
    >>> interface and the host name, or rather, *a* host name goes in each
    >>> file.

    >>
    >> So? To make your life easier, each IP has a hostname.

    >
    > Everyone else seems to have decide on a single hosts file for all
    > interfaces, but that nudges people towards the idea of an IP to host
    > relationship rather than an IP to interface relationship.
    >
    >>> Multiple lines in /etc/hosts can pretty much do the same thing.

    >>
    >> No. The config file for an interface is the connection point between
    >> hardware and software. As each interface contains its own MAC, it needs
    >> something to translate that into something the software can use, an IP
    >> address.
    >>
    >> The host file adds the hostname to that address for human use.

    >
    > I've been happily ignoring MACs. I'm using /etc/hosts to associate IPs,
    > FQDNs and aliases.


    And well you should!

    >
    >>> Just for good measure, different computers can have different names in
    >>> their respective /etc/hosts file for a given IP address, but let's
    >>> ignore that as pathological.
    >>>
    >>> Here is an example...
    >>>
    >>> ,----[ /etc/hosts ]
    >>> | 127.0.0.1 localhost
    >>> | 192.168.1.1 nb.home.invalid nb | 192.168.1.2
    >>> live.home.invalid live | 192.168.2.1 a64.test.invalid a64 |
    >>> 192.168.2.2 x2.test.invalid x2 `----

    >>
    >> Hmmm....
    >>
    >> Never saw a hosts file like that....

    >
    > There have been some line wrap problems there. I'll try again.
    >
    > 127.0.0.1 localhost
    > 192.168.1.1 nb.home.invalid nb
    > 192.168.1.2 live.home.invalid live 192.168.2.1 a64.test.invalid
    > a64 192.168.2.2 x2.test.invalid x2
    >
    > One line per interface. Each line has IP, full name, [aliases]. Both
    > the "live" and "a64" interfaces are in the same host (which is also
    > called "live" but could be called something else).
    >
    >> From the man page for hosts:
    >>
    >> This manual page describes the format of the /etc/hosts file. This file
    >> is a simple text file that associates IP addresses with
    >> hostnames, one
    >> line per IP address. For each host a single line should be
    >> present
    >> with
    >> the following information:
    >>
    >> IP_address canonical_hostname [aliases...]
    >>
    >> E.G. 192.168.1.1 foobar.bar.net foobar fred

    >
    > Line per host or line per interface? I'm leaning towards line per
    > interface at the moment.
    >
    >> Where the "names" are for the address. If you put a number (
    >> 192.168.1.100 ) where a name belongs, you will get the "name"
    >> 192.168.1.100 returned for whatever IP address you have listed on that
    >> line.

    >
    > I think that you are looking at some bad line wrapping.
    >


    I think you are correct.


    >>> "live" and "a64" are the same machine.
    >>>
    >>> Pinging localhost, live and a64 (from live/a64) works.
    >>>
    >>> "hostname -i" returns 192.168.1.2, but the man page says it should
    >>> return the IP addresses. Plural! Bug, or typo?
    >>>
    >>> Also, how does hostname decide which name to give out? Should it give
    >>> both?

    >>
    >> Depends on how its called. If you use:
    >>
    >> $ hostname
    >>
    >> You get the hostname as a name.

    >
    > This is where my understanding starts to fall apart.
    >
    > If /etc/hosts controls the associations between *interface* names and
    > numbers, where is the hostname configuration?
    >
    >> $ hostname -i
    >>
    >> You get the IP address of the the host as defined by hostname.

    >
    > At the moment I don't think that hosts have IP addresses, interfaces do.
    > Bbbuuuutttt, hosts can have multiple interfaces, and interfaces can
    > have multiple IP addresses, and IP addersses can have multiple names.
    > So a host can have a plethora of valid names. How do you decide which,
    > if any, interface, IP address and name are the primary ones?
    >


    Why would any of them bevia primary?

    >> Hope this clears up some of your misunderstanding.

    >
    > At the moment I think that the whole world is a little bit crazy - but
    > maybe that is just a symptom. ;-)
    >
    >> If not let us know, we'll try again.


    I suspect some of this is due to not using the same words to describe the
    same item ( quilty! ).

    Host is a machine.

    Interface ( network ) is a hardware device.

    Node is the software/hardware combination of an interface and the
    software defining the parameters for it. ( eth0 with ip address
    192.168.1.1 )

    Now. Example 1:

    lo0 has ip address 127.0.0.1

    eth0 has an ip address of 192.168.1.1

    eth1 has an ip address of 192.168.1.2

    Both are located in host (machine ) foo.

    /etc/hosts comtains:

    127.0.0.1 localhost
    192.168.1.1 foobar1.nowhere.none foobar1 mybar
    192.168.1.2 foobar2.nowhere.none foobar2 yourbar


    Nothing fancy here. Just straight forward naming.

    foobar1.nowhere.none points to 192.168.1.1
    foobar1 points to 192.168.1.1
    mybar points to 192.168.1.1

    Pinging any of the these names will result in a ping to 192.168.1.1, from
    this machine! If another machine has the same listings ( in addition to
    its own listings ). Then a ping will get to this machine ( host ).

    What happens *after* it gets to this machine is a new story ( mail http
    ssh etc ).

    Suppose I have a small lan, 4 hosts, with 2 of them in accounting 1 of
    them in admin and 1 in sales.

    All contain 1 interface, but I don't want sales talking to accounting and
    vice-versa.

    I could do this:

    Sales machine has this:

    eth0 ip 10.0.1.10

    hosts contains

    127.0.0.1 localhost
    10.0.1.10 sales
    10.0.1.1 boss

    Accounting has:

    eth0 ip 10.0.1.10

    hosts contains

    127.0.0.1 localhost
    10.0.2.5 account1
    10.0.2.6 account2
    10.0.2.1 boss


    Admin has:

    eth0 ip 10.0.2.1
    eth0:0 ip 10.0.1.1

    hosts contains

    127.0.0.1 localhost
    10.0.1.1 boss
    10.0.2.5 account1
    10.0.2.6 account2
    10.0.1.10 sales

    I'm not going to get into routing etc, but this will serve to, hopefully,
    explain something.

    From sales I can "get to" boss, but not accounting.
    From accounting I can get to boos, but not sales.

    From boss I can get anywhere.

    Admin has only one hardware interface, but it has a second, software
    interface ( or alias ). Any ping on the network to boss will get to admin
    via interface eth0 or eth0:0.

    If I've done my routing, etc properly, then I can't get from sales to
    accounting even if I use the ip addresses.

    If I setup the sales machine with a /etc/hosts file of

    127.0.0.1 localhost
    10.0.1.10 sales
    10.0.1.1 boss asshole.inc myboss.niceguy.inc


    Then I can, depending on my mood, ping by name asshole.inc or boss or
    myboss.niceguy.inc.

    All of which will go to 10.0.1.1.

    The good part is he don't know which I used....

    I'm sure I've not answered your question, but maybe I've helped.

    Jim



  12. Re: host names, network names and IP addresses

    on Thursday 09 August 2007 18:29
    in the Usenet newsgroup alt.os.linux.mandriva
    Bit Twister wrote:

    > On Thu, 09 Aug 2007 16:43:51 +1000, Peter D. wrote:
    >> Bit Twister wrote:


    [snip]
    >> A different name for the host and each of its interfaces is OK.

    >
    > You got it. It will depend on, from where you are looking at it.
    >
    >> How can/does/should this work?
    >> Each host has one "real" name and a whole bunch of aliases?

    >
    > Your call.


    I was wondering what "hostname" and "uname -a" should do and
    what they actually do. How many names should be returned? Which
    ones and in which order?

    Is all of the stuff in /etc/sysconf/ Mandriva specific? Various
    pieces of information are scattered around in various places.

    [snip]
    >> There is no IP address (except 127.0.0.N) that is associated
    >> with the host but not associated with one of the interfaces?

    >
    > Example 1:
    > Yes, assuming you threw out something like
    > 96.226.25.1 isp_gateway
    > in my /etc/hosts and
    >
    > $ ifconfig snippet shows
    > eth0 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
    >
    > If I ping -c1 isp_gateway it routes out of eth0 only because it is the
    > default interface.
    >
    > Yet, we see
    > $ host 96.226.25.1
    > 1.25.226.96.in-addr.arpa domain name pointer
    >

    L100.VFTTP-33.DLLSTX.verizon-gni.net.

    Sorry, I don't understand what that means.

    >> Each interface has (at least) one IP address?

    >
    > Yeees, If configured.
    >
    >> (Is PPP an exception?)

    >
    > Why? It usually is a hardware interface, serial instead of ethernet
    > device. Are you going to get vague on a WiFi interface also, because it is
    > not an ethernet device.


    I was thinking of the router/switch/bridge/hub/repeater hierarchy
    of things. Doesn't a repeater just copy everything including
    IP addresses? (Not having an IP address of its own.) My modem
    has an "unmanaged" option for the IP settings. Then again, maybe
    I'm just confused.

    >> Each IP address may have many alias FQDNs and short names?
    >> Using any one of those names or numbers will get to the host.

    >
    > I'll go along with that, if there is a connection.
    >
    >> Where are all of these name, numbers and associations stored?

    >
    > Depends on where they are defined and what is handing them out.
    > Have you done a cat /etc/nsswitch.conf lately, followed by a
    > grep hosts: /etc/nsswitch.conf


    I'm hoping to find all that I need to know in "files".

    > Now go back and follow Example 1, 8-)
    >
    >> This is going to get nasty when virtual hosts / virtual nodes get
    >> in on the act.

    >
    > Ah, yup.
    >
    >>> For instance I could move incomming.mail.invalid to a different node
    >>> (server1, server2,...).
    >>>
    >>> I just give incomming.mail.invalid a new ip address for routing to an
    >>> interface.

    >>
    >> Sooooo, incoming.mail.invalid is associated (in the sysadmin's mind)
    >> with a daemon rather than an interface or a host.

    >
    > Until it goes down. Then the admin wants to know what /host/ to go look
    > at.


    Until the sysadmin's mind goes down? Rebooting the sysadmin could
    be a pain in the arse.

    Are server1, etc. "real" names, while incoming.mail.invalid is
    a convenience that also points to one or other of server1, etc.
    from time to time?

    >> The nearest it has to a physical existence is an entry as an alias
    >> in a few /etc/hosts files?

    >
    > In the simple network, yes, in the complex network, a DNS server
    > somewhere knows who to ask what name is defined to an ip address.


    --
    sig goes here...
    Peter D.

  13. Re: host names, network names and IP addresses

    on Thursday 09 August 2007 23:49
    in the Usenet newsgroup alt.os.linux.mandriva
    David W. Hodgins wrote:

    > On Thu, 09 Aug 2007 02:40:03 -0400, Peter D.
    > wrote:


    [snip]
    > Initially, the name is set via /etc/HOSTNAME, then changed by
    > /etc/sysconfig/network. It may be changed by any of the interface
    > startup scripts, if that interface's cfg file has NEEDHOSTNAME=yes.


    Presumably the hostname is rolled back to its previous value
    when that interface goes down.

    > It may also be changed by other "helper" scripts. This is one aspect
    > that has changed, with different versions. New helper scripts, keep
    > hiding what they're doing, and where things need to be set.
    >
    > In my case I have ...
    >
    > [root@hodgins etc]# grep homeip /etc/*
    > HOSTNAME:hodgins.homeip.net
    > hosts:127.0.0.1 hodgins.homeip.net hodgins
    > printcap:CANONMULT150|CANON MP150:rm=hodgins.homeip.net:rp=CANONMULT150:
    >
    > [root@hodgins etc]# grep homeip /etc/sysconfig/*
    > sysconfig/network:HOSTNAME=hodgins.homeip.net
    >
    > I also have 127.0.0.1 set to localhost in /etc/hosts.


    [snip]
    >> A DNS won't ever hand out two IP address in response to a single
    >> request will it?

    >
    > # host gmail.com
    > gmail.com has address 64.233.171.83
    > gmail.com has address 64.233.161.83
    > gmail.com has address 72.14.253.83
    > gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.
    > gmail.com mail is handled by 10 alt2.gmail-smtp-in.l.google.com.
    > gmail.com mail is handled by 50 gsmtp163.google.com.
    > gmail.com mail is handled by 50 gsmtp183.google.com.
    > gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
    >
    > If you were to run the hostname -i command, on one of the computers
    > assigned to gmail.com, it may return a list of ip addresses. I'm
    > not sure. It would depend on the setup of that system, and how it's
    > resolving addresses from local dns lookups. (i.e. hosts first, or
    > dns first).
    >
    > Note: If you capture the dns lookup via wireshare, you'll see that
    > the above is in a single response, to a single dns lookup.


    So the sane application randomly chooses one and uses it until
    an error or a timeout occurs, then it uses another?

    >>> the hostname command only refers to the computer, that it
    >>> is running on.

    >> As distinct from an interface on the computer it is running on?
    >> Or as distinct from other computers?

    >
    > Both. My intention, was distinct from an interface, but it applies
    > to both.
    >
    > As a test, you could setup bind with multiple ip addresses assigned
    > to a dummy.invalid hostname, set the computers current hostname to
    > that dummy.invalid hostname, and then test the hostname -i command.
    >
    > I'm reversing my vote on typo. I think the above test would return
    > a list.
    >
    > Regards, Dave Hodgins
    >


    --
    sig goes here...
    Peter D.

  14. Re: host names, network names and IP addresses

    on Saturday 11 August 2007 10:41
    in the Usenet newsgroup alt.os.linux.mandriva
    Jim Whitby wrote:

    > On Thu, 09 Aug 2007 08:29:56 +0000, Bit Twister wrote:
    >
    >> On Thu, 09 Aug 2007 16:43:51 +1000, Peter D. wrote:
    >>> Bit Twister wrote:
    >>>
    >>> I assume that you regard node and host as synonyms.

    >>
    >> Well, I guess so. I do associate a host as the box it's self. A node is
    >> some device on the network with one or more interfaces. At that point,
    >> node=host. You might get into the ditch with those virtual do-hickeys
    >> though.

    >
    > Try to think of it this way:
    >
    > A machine has a name. It may or maynot have a network interface.
    > If it has a network interface ( whatever type ), it has a node name,
    > which may or maynot be the machine name.


    [snip]
    >>>> For instance I could move incomming.mail.invalid to a different node
    >>>> (server1, server2,...).
    >>>>
    >>>> I just give incomming.mail.invalid a new ip address for routing to an
    >>>> interface.
    >>>
    >>> Sooooo, incoming.mail.invalid is associated (in the sysadmin's mind)
    >>> with a daemon rather than an interface or a host.

    >
    > No. the FDQN incoming.mail.invalid is the name that points to an IP
    > address.


    Surly that should be *a* name pointing to a node. All of the servers
    have "real" names that don't change, while incoming.mail.invalid might
    get resolved to the same IP address as server1 this morning, but
    then get resolved to the same IP address as server2 this afternoon.

    >> Until it goes down. Then the admin wants to know what /host/ to go look
    >> at.
    >>
    >>> The nearest it has to a physical existence is an entry as an alias in a
    >>> few /etc/hosts files?

    >>
    >> In the simple network, yes, in the complex network, a DNS server
    >> somewhere knows who to ask what name is defined to an ip address.

    >
    > Try to remember this. FQDN names, short names and aliases ( node names )


    I've only just realised; short names are not aliases. You can get
    them with "hostname -a" and "hostname -s" but you can't ping a short
    name like you can with an alias.

    > are human conventions. IP numbers are machine conventions. Node names are
    > translated by whatever software is in use ( hosts file, YP, DNS or ?? )
    > into IP addresses.
    >
    > ( to be completely accurate decimal IP addresses are changed into
    > hexadecimal numbers to be used by the machine )


    In IP version 4 those 32 bits can be "sensibly" rendered in many
    ways, even a single decimal number. I've been told that version 1
    had 8 bits allowing for more than 200 addresses - more than
    any one could ever possibly need. ;-)

    > Put another way. Node "names" are much easier for humans to understand.
    > Node "numbers" are what the machine uses. To make life easy for us dumb
    > humans, we use node names, like mail.yahoo.com, instead of trying to
    > remember 69.147.112.160.
    >
    > Virtual Hosts, virtual interfaces, etc are no problem to keep track of. A
    > small number of "nodes" can be done in /etc/hosts. Larger numbers,
    > usually, are done in DNS.
    >
    > To summerize:


    A machine (host) might, or might not, support virtual hosts.

    > A machine may or maynot have a network interface, but it has a name.


    A host (real or virtual) might, or might not, have a network interface.
    Either way the host will have a hostname.

    And only one hostname (in long and short forms with or without aliases)
    The FQDN is typically stored in /etc/HOSTNAME

    If a IP/TCP stack is installed then the (virtual) local loopback
    interface comes into existence with 127.0.0.1 as its IP address.

    This changes the host into a (real or virtual) node? Or the host is
    the host is the host, which now has a virtual node?
    (A real host with a virtual node or a virtual host with a
    virtual virtual node?)

    Names and number can be changed on the fly.

    "hostname" is only concerned with information above this point.

    Names and numbers below this point might, or might not, be the
    same as names and numbers above this point.

    > A node has an IP address, a name is *not* a requiriement, but usually
    > used.


    Having physical interface and assigning it an IP address defines
    a node?

    > A node name *may* point to more than one IP address.


    You've lost me.

    host != node

    Do you mean, a host may multiple interfaces? (And nodes?)

    > An IP address *may* have more than one name.


    Or none.

    > An interface *may* have more than one IP address.


    Or none.

    > If you're not totally confused yet, give me some more time.
    >
    > jim



    --
    sig goes here...
    Peter D.

  15. Re: host names, network names and IP addresses

    on Saturday 11 August 2007 12:00
    in the Usenet newsgroup alt.os.linux.mandriva
    Jim Whitby wrote:

    > On Thu, 09 Aug 2007 16:43:56 +1000, Peter D. wrote:
    >
    >> on Wednesday 08 August 2007 10:21
    >> in the Usenet newsgroup alt.os.linux.mandriva Jim Whitby wrote:
    >>
    >>> On Tue, 07 Aug 2007 22:46:44 +1000, Peter D. wrote:


    [snip]
    >>>> A bridge must be plugged into two networks. For example, a bridge's
    >>>> network interfaces might have IP addresses of 192.168.4.4 and
    >>>> 192.168.3.3, so the bridge would have IP addresses of 192.168.4.4,
    >>>> 192.168.3.3 and 127.0.0.1.
    >>>>
    >>>> Let's call the 192.168.4.0 network nw4.invalid and 192.168.3.0
    >>>> nw3.invalid. These names and numbers can be put in /etc/networks if
    >>>> desired.
    >>>>
    >>>> First oddity, IP addresses are real and names are just a human
    >>>> convenience. Different computers on a single network can have
    >>>> different names for the same network. It would be a silly thing to
    >>>> do, and if your DNS is running properly it won't happen.
    >>>>
    >>>> The hard part is, does a name apply to an interface or a computer?
    >>>> Mostly it unimportant because there is only one interface, or they all
    >>>> have the same name.
    >>>
    >>> Depends on the name.... Is it a "node" name or a "network" name?

    >>
    >> At the moment I think that nodes, interfaces and networks have names.
    >>
    >> From one of the examples above, give the interface 192.168.4.4 the name
    >> "joker.nw4.invalid". Chop off the first part of the FQDN and zero the
    >> host part of the IP to get the network's name and number, nw4.invalid
    >> (192.168.4.0).
    >>
    >> For sanity all of the hosts on 192.168.4.0 should call it the same name
    >> (nw4.invalid), but they don't have to.
    >>
    >> For sanity all of the hosts should know that joker.nw4.invalid is
    >> 192.168.4.4, but they don't have to.
    >>
    >> I'm undecided about having the same short alias for all interfaces on a
    >> host. Such as; joker.nw3.invalid (192.168.3.3), joker.nw4.invalid
    >> (192.168.4.4) and joker.hostdomain (127.0.0.2). Probably not a good
    >> idea.

    >
    > Unless you are using DNS. Why not just use nw4 and nw3?
    > What is joker.hostname (127.0.0.2) for?


    In the hypothetical situation given, nw3.invalid and nw4.invalid
    are network names (found in /etc/networks) not host names.
    I believe that 127.0.0.1 to 127.0.0.254 are equivalent.

    [snip]
    >>> Never saw a hosts file like that....

    >>
    >> There have been some line wrap problems there. I'll try again.
    >>
    >> 127.0.0.1 localhost
    >> 192.168.1.1 nb.home.invalid nb
    >> 192.168.1.2 live.home.invalid live 192.168.2.1 a64.test.invalid


    It looks like Pan is doing some uncalled for line UNwrapping.

    [snip]
    >>> $ hostname -i
    >>>
    >>> You get the IP address of the the host as defined by hostname.

    >>
    >> At the moment I don't think that hosts have IP addresses, interfaces do.
    >> Bbbuuuutttt, hosts can have multiple interfaces, and interfaces can
    >> have multiple IP addresses, and IP addersses can have multiple names.
    >> So a host can have a plethora of valid names. How do you decide which,
    >> if any, interface, IP address and name are the primary ones?
    >>

    >
    > Why would any of them bevia primary?


    Commands like "hostname" and "uname -a" return one name only. How
    do they decide which name to return? Should they return multiple
    names, and in which order?

    >>> Hope this clears up some of your misunderstanding.

    >>
    >> At the moment I think that the whole world is a little bit crazy - but
    >> maybe that is just a symptom. ;-)
    >>
    >>> If not let us know, we'll try again.

    >
    > I suspect some of this is due to not using the same words to describe the
    > same item ( quilty! ).


    Quilty?

    I'm glad that you are adhering to the Usenet tradition of at
    least one amusing typo in every post designed to finally sort things
    out. Or have you had an unfortunate incident with a sewing machine?

    > Host is a machine.
    >
    > Interface ( network ) is a hardware device.
    >
    > Node is the software/hardware combination of an interface and the
    > software defining the parameters for it. ( eth0 with ip address
    > 192.168.1.1 )


    That is different.

    > Now. Example 1:
    >
    > lo0 has ip address 127.0.0.1
    >
    > eth0 has an ip address of 192.168.1.1
    >
    > eth1 has an ip address of 192.168.1.2
    >
    > Both are located in host (machine ) foo.
    >
    > /etc/hosts comtains:
    >
    > 127.0.0.1 localhost
    > 192.168.1.1 foobar1.nowhere.none foobar1 mybar
    > 192.168.1.2 foobar2.nowhere.none foobar2 yourbar


    Two Ethernet ports on the same machine cabled to each other?
    Plus maybe a switch/hub/router and other hosts.

    > Nothing fancy here. Just straight forward naming.
    >
    > foobar1.nowhere.none points to 192.168.1.1
    > foobar1 points to 192.168.1.1
    > mybar points to 192.168.1.1
    >
    > Pinging any of the these names will result in a ping to 192.168.1.1, from
    > this machine! If another machine has the same listings ( in addition to
    > its own listings ). Then a ping will get to this machine ( host ).


    OK

    > What happens *after* it gets to this machine is a new story ( mail http
    > ssh etc ).
    >
    > Suppose I have a small lan, 4 hosts, with 2 of them in accounting 1 of
    > them in admin and 1 in sales.


    All connected to a central hub (that copies all packets to all machines)?
    Or all connected to a central router which has four Ethernet ports?
    Or, old fashioned co-axial Ethernet cable (not this modern twisted pair)?
    All four hosts are on the same cable and all hosts can see all packets.

    > All contain 1 interface, but I don't want sales talking to accounting and
    > vice-versa.
    >
    > I could do this:
    >
    > Sales machine has this:
    >
    > eth0 ip 10.0.1.10
    >
    > hosts contains
    >
    > 127.0.0.1 localhost
    > 10.0.1.10 sales
    > 10.0.1.1 boss
    >
    > Accounting has:
    >
    > eth0 ip 10.0.1.10


    No, I don't like that. That is Sales' IP address.

    Did you mean
    account1 has eth0 ip 10.0.2.5 and
    account2 has eth0 ip 10.0.2.6?

    > hosts contains
    >
    > 127.0.0.1 localhost
    > 10.0.2.5 account1
    > 10.0.2.6 account2
    > 10.0.2.1 boss
    >
    >
    > Admin has:
    >
    > eth0 ip 10.0.2.1
    > eth0:0 ip 10.0.1.1
    >
    > hosts contains
    >
    > 127.0.0.1 localhost
    > 10.0.1.1 boss
    > 10.0.2.5 account1
    > 10.0.2.6 account2
    > 10.0.1.10 sales
    >
    > I'm not going to get into routing etc, but this will serve to, hopefully,
    > explain something.
    >
    > From sales I can "get to" boss, but not accounting.
    > From accounting I can get to boos, but not sales.
    >
    > From boss I can get anywhere.
    >
    > Admin has only one hardware interface, but it has a second, software
    > interface ( or alias ). Any ping on the network to boss will get to admin
    > via interface eth0 or eth0:0.
    >
    > If I've done my routing, etc properly, then I can't get from sales to
    > accounting even if I use the ip addresses.
    >
    > If I setup the sales machine with a /etc/hosts file of
    >
    > 127.0.0.1 localhost
    > 10.0.1.10 sales
    > 10.0.1.1 boss asshole.inc myboss.niceguy.inc
    >
    >
    > Then I can, depending on my mood, ping by name asshole.inc or boss or
    > myboss.niceguy.inc.
    >
    > All of which will go to 10.0.1.1.
    >
    > The good part is he don't know which I used....
    >
    > I'm sure I've not answered your question, but maybe I've helped.
    >
    > Jim


    --
    sig goes here...
    Peter D.

  16. Re: host names, network names and IP addresses

    On Sun, 12 Aug 2007 13:02:58 +1000, Peter D. wrote:
    > Bit Twister wrote:
    >
    > I was wondering what "hostname" and "uname -a" should do and
    > what they actually do. How many names should be returned? Which
    > ones and in which order?


    I have never looked.

    > Is all of the stuff in /etc/sysconf/ Mandriva specific?


    cd: /etc/sysconf/: No such file or directory

    > Various
    > pieces of information are scattered around in various places.


    And different distribuitions have them in different places.
    That is why my dump_net script is so big. It looks in different places
    for the same information.


    > [snip]
    > There is no IP address (except 127.0.0.N) that is associated
    > with the host but not associated with one of the interfaces?
    >>
    >> Example 1:
    >> Yes, assuming you threw out something like
    >> 96.226.25.1 isp_gateway
    >> in my /etc/hosts and
    >>
    >> $ ifconfig snippet shows
    >> eth0 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
    >>
    >> If I ping -c1 isp_gateway it routes out of eth0 only because it is the
    >> default interface.
    >>
    >> Yet, we see
    >> $ host 96.226.25.1 1.25.226.96.in-addr.arpa domain name pointer
    >> L100.VFTTP-33.DLLSTX.verizon-gni.net.

    >
    > Sorry, I don't understand what that means.


    Read your question.
    I was trying to show you I defined 96.226.25.1 as isp_gateway in /etc/hosts,
    and it was "not associated with one of the interfaces?" yet I could
    ping isp_gateway, yet
    host 96.226.25.1 returns
    1.25.226.96.in-addr.arpa domain name pointer L100.VFTTP-33.DLLSTX.verizon-gni.net


    >>
    >> For instance I could move incomming.mail.invalid to a different node
    >> (server1, server2,...).
    >>
    >> I just give incomming.mail.invalid a new ip address for routing to an
    >> interface.
    >>
    >> Sooooo, incoming.mail.invalid is associated (in the sysadmin's mind)
    >>> with a daemon rather than an interface or a host.

    >>

    >
    > Are server1, etc. "real" names, while incoming.mail.invalid is
    > a convenience that also points to one or other of server1, etc.
    > from time to time?


    It can be. An example, if you host www.mozilla.com you will see the ip
    address move around. See

    $ host www.mozilla.com
    www.mozilla.com is an alias for www-mozilla-com.glb.mozilla.com.
    www-mozilla-com.glb.mozilla.com has address 63.245.209.10

    $ host www.mozilla.com
    www.mozilla.com is an alias for www-mozilla-com.glb.mozilla.com.
    www-mozilla-com.glb.mozilla.com has address 63.245.213.11

  17. Re: host names, network names and IP addresses

    on Sunday 12 August 2007 16:55
    in the Usenet newsgroup alt.os.linux.mandriva
    Bit Twister wrote:

    > On Sun, 12 Aug 2007 13:02:58 +1000, Peter D. wrote:
    >> Bit Twister wrote:


    [snip]
    >> Is all of the stuff in /etc/sysconf/ Mandriva specific?

    >
    > cd: /etc/sysconf/: No such file or directory


    Sorry, /etc/sysconfig/

    >> Various
    >> pieces of information are scattered around in various places.

    >
    > And different distribuitions have them in different places.
    > That is why my dump_net script is so big. It looks in different places
    > for the same information.
    >
    >
    >> [snip]
    >> There is no IP address (except 127.0.0.N) that is associated
    >> with the host but not associated with one of the interfaces?
    >>>
    >>> Example 1:
    >>> Yes, assuming you threw out something like
    >>> 96.226.25.1 isp_gateway
    >>> in my /etc/hosts and
    >>>
    >>> $ ifconfig snippet shows
    >>> eth0 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
    >>>
    >>> If I ping -c1 isp_gateway it routes out of eth0 only because it is the
    >>> default interface.
    >>>
    >>> Yet, we see
    >>> $ host 96.226.25.1 1.25.226.96.in-addr.arpa domain name pointer
    >>>

    L100.VFTTP-33.DLLSTX.verizon-gni.net.
    >>
    >> Sorry, I don't understand what that means.

    >
    > Read your question.
    > I was trying to show you I defined 96.226.25.1 as isp_gateway in
    > /etc/hosts, and it was "not associated with one of the interfaces?" yet I
    > could ping isp_gateway, yet
    > host 96.226.25.1 returns
    > 1.25.226.96.in-addr.arpa domain name pointer
    > L100.VFTTP-33.DLLSTX.verizon-gni.net

    [snip]

    I also can type "host 96.226.25.1" and get the same result, but I don't
    know what it means. (I've had a look at the man page.) The DNS system
    has a mapping between "96.226.25.1" and "1.25.226.96.in-addr.arpa"?
    Or between "96.226.25.1" and "L100.VFTTP-33.DLLSTX.verizon-gni.net"?
    I can't ping either, but I can ping 96.22.25.1. Is that you? You are
    claiming on your host that it is you, but you could also map
    microsoft.com to 127.0.0.1 in your /etc/hosts and call yourself bill
    for all I know.


    --
    sig goes here...
    Peter D.

  18. Re: host names, network names and IP addresses

    On Sun, 12 Aug 2007 18:02:39 +1000, Peter D. wrote:
    >
    > I also can type "host 96.226.25.1" and get the same result, but I don't
    > know what it means. (I've had a look at the man page.) The DNS system
    > has a mapping between "96.226.25.1" and "1.25.226.96.in-addr.arpa"?
    > Or between "96.226.25.1" and "L100.VFTTP-33.DLLSTX.verizon-gni.net"?


    It is a mapping defined by verizon's dns servers.

    > I can't ping either, but I can ping 96.22.25.1. Is that you?


    No, it is verizon's gateway node I used to get to the internet.
    In other words, it was the first node upstream of my modem.
    If you check this post's header, you will see that my node is 71.170.249.83

    By the way, now that they forced a new lease upon me, I have this new
    ip address and use a different gateway. Seems the old 96.22.25.x was
    keeping me from accessing www.mozilla.com.

  19. Re: host names, network names and IP addresses

    On Sun, 12 Aug 2007 13:03:08 +1000, Peter D. wrote:



    > A machine (host) might, or might not, support virtual hosts.
    >
    >> A machine may or maynot have a network interface, but it has a name.

    >
    > A host (real or virtual) might, or might not, have a network interface.
    > Either way the host will have a hostname.


    yes

    >
    > And only one hostname (in long and short forms with or without aliases)
    > The FQDN is typically stored in /etc/HOSTNAME


    almost. The name can be either a dotted name or just a name, but not both.


    >
    > If a IP/TCP stack is installed then the (virtual) local loopback
    > interface comes into existence with 127.0.0.1 as its IP address.


    yes.

    >
    > This changes the host into a (real or virtual) node? Or the host is the
    > host is the host, which now has a virtual node? (A real host with a
    > virtual node or a virtual host with a virtual virtual node?)


    not exactly. The "host" is still just the host. The node is a virtual
    node, used only internally.

    >
    > Names and number can be changed on the fly.


    possible, but not usually done.

    >
    > "hostname" is only concerned with information above this point.
    >


    Not sure what you mean.

    > Names and numbers below this point might, or might not, be the same as
    > names and numbers above this point.
    >


    Above/below what?

    >> A node has an IP address, a name is *not* a requiriement, but usually
    >> used.

    >
    > Having physical interface and assigning it an IP address defines a node?


    yes, and having a virtual interface w/IP address defines a node.

    >
    >> A node name *may* point to more than one IP address.

    >
    > You've lost me.
    >
    > host != node
    >


    correct. It is reasonable to have a "node name" point to more than one IP
    address.

    > Do you mean, a host may multiple interfaces? (And nodes?)
    >


    yes. In addition...
    A "node name" may point to multiple hosts, each with a unique IP address.
    As used by many larger web sites (google, mozilla, M$, yahoo and many
    more ). An example:

    $ dig www.google.com

    ; <<>> DiG 9.4.1-P1 <<>> www.google.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1384
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 13, ADDITIONAL: 9

    ;; QUESTION SECTION:
    ;www.google.com. IN A

    ;; ANSWER SECTION:
    www.google.com. 595120 IN CNAME www.l.google.com.
    www.l.google.com. 300 IN A 64.233.169.99
    www.l.google.com. 300 IN A 64.233.169.103
    www.l.google.com. 300 IN A 64.233.169.104
    www.l.google.com. 300 IN A 64.233.169.147

    In the above, each IP may or maynot be on a different host.
    The DNS server will hand out (probably) a different address each time you
    try to connect.

    Try a ping to www.google.com and see what address you get. Then try a
    couple more times.

    >> An IP address *may* have more than one name.

    >
    > Or none.
    >


    correct.

    >> An interface *may* have more than one IP address.

    >
    > Or none.
    >


    correct.


    >> If you're not totally confused yet, give me some more time.
    >>
    >> jim



  20. Re: host names, network names and IP addresses

    On Sun, 12 Aug 2007 13:03:12 +1000, Peter D. wrote:



    >>> I'm undecided about having the same short alias for all interfaces on
    >>> a host. Such as; joker.nw3.invalid (192.168.3.3), joker.nw4.invalid
    >>> (192.168.4.4) and joker.hostdomain (127.0.0.2). Probably not a good
    >>> idea.

    >>
    >> Unless you are using DNS. Why not just use nw4 and nw3? What is
    >> joker.hostname (127.0.0.2) for?

    >
    > In the hypothetical situation given, nw3.invalid and nw4.invalid are
    > network names (found in /etc/networks) not host names. I believe that
    > 127.0.0.1 to 127.0.0.254 are equivalent.


    not exactly, but close. The netmask for the localhost means all
    127.xx.xx.xx will be sent to 127.0.0.1

    >
    > [snip]
    >>>> Never saw a hosts file like that....
    >>>
    >>> There have been some line wrap problems there. I'll try again.
    >>>
    >>> 127.0.0.1 localhost
    >>> 192.168.1.1 nb.home.invalid nb
    >>> 192.168.1.2 live.home.invalid live 192.168.2.1 a64.test.invalid

    >
    > It looks like Pan is doing some uncalled for line UNwrapping.
    >
    > [snip]
    >>>> $ hostname -i
    >>>>
    >>>> You get the IP address of the the host as defined by hostname.
    >>>
    >>> At the moment I don't think that hosts have IP addresses, interfaces
    >>> do.
    >>> Bbbuuuutttt, hosts can have multiple interfaces, and interfaces can
    >>> have multiple IP addresses, and IP addersses can have multiple names.
    >>> So a host can have a plethora of valid names. How do you decide
    >>> which, if any, interface, IP address and name are the primary ones?
    >>>
    >>>

    >> Why would any of them bevia primary?

    >
    > Commands like "hostname" and "uname -a" return one name only. How do
    > they decide which name to return? Should they return multiple names,
    > and in which order?


    Simply stated. The "primary" name/IP is the first one listed in /etc/
    hosts after the localhost or the lowest numbered hardware interface.

    uname -n ( gets the "node" name )
    uname -m ( gets the "machine" name )

    man uname to see more.


    >
    >>>> Hope this clears up some of your misunderstanding.
    >>>
    >>> At the moment I think that the whole world is a little bit crazy - but
    >>> maybe that is just a symptom. ;-)
    >>>
    >>>> If not let us know, we'll try again.

    >>
    >> I suspect some of this is due to not using the same words to describe
    >> the same item ( quilty! ).

    >
    > Quilty?


    Oops.. guilty!!!!

    >
    > I'm glad that you are adhering to the Usenet tradition of at least one
    > amusing typo in every post designed to finally sort things out. Or have
    > you had an unfortunate incident with a sewing machine?


    I like tradition!

    >
    >> Host is a machine.
    >>
    >> Interface ( network ) is a hardware device.
    >>
    >> Node is the software/hardware combination of an interface and the
    >> software defining the parameters for it. ( eth0 with ip address
    >> 192.168.1.1 )

    >
    > That is different.
    >
    >> Now. Example 1:
    >>
    >> lo0 has ip address 127.0.0.1
    >>
    >> eth0 has an ip address of 192.168.1.1
    >>
    >> eth1 has an ip address of 192.168.1.2
    >>
    >> Both are located in host (machine ) foo.
    >>
    >> /etc/hosts comtains:
    >>
    >> 127.0.0.1 localhost
    >> 192.168.1.1 foobar1.nowhere.none foobar1 mybar 192.168.1.2
    >> foobar2.nowhere.none foobar2 yourbar

    >
    > Two Ethernet ports on the same machine cabled to each other? Plus maybe
    > a switch/hub/router and other hosts.


    no. One hardware interface, 192.168.1.1
    One virtual ( software ) interface 127.0.0.1


    >
    >> Nothing fancy here. Just straight forward naming.
    >>
    >> foobar1.nowhere.none points to 192.168.1.1 foobar1 points to
    >> 192.168.1.1
    >> mybar points to 192.168.1.1
    >>
    >> Pinging any of the these names will result in a ping to 192.168.1.1,
    >> from this machine! If another machine has the same listings ( in
    >> addition to its own listings ). Then a ping will get to this machine (
    >> host ).

    >
    > OK
    >
    >> What happens *after* it gets to this machine is a new story ( mail http
    >> ssh etc ).
    >>
    >> Suppose I have a small lan, 4 hosts, with 2 of them in accounting 1 of
    >> them in admin and 1 in sales.

    >
    > All connected to a central hub (that copies all packets to all
    > machines)? Or all connected to a central router which has four Ethernet
    > ports? Or, old fashioned co-axial Ethernet cable (not this modern
    > twisted pair)? All four hosts are on the same cable and all hosts can
    > see all packets.



    your choice.
    yes, all see all packets.

    >
    >> All contain 1 interface, but I don't want sales talking to accounting
    >> and vice-versa.
    >>
    >> I could do this:
    >>
    >> Sales machine has this:
    >>
    >> eth0 ip 10.0.1.10
    >>
    >> hosts contains
    >>
    >> 127.0.0.1 localhost
    >> 10.0.1.10 sales
    >> 10.0.1.1 boss
    >>
    >> Accounting has:
    >>
    >> eth0 ip 10.0.1.10

    >
    > No, I don't like that. That is Sales' IP address.
    >
    > Did you mean
    > account1 has eth0 ip 10.0.2.5 and
    > account2 has eth0 ip 10.0.2.6?


    yes. Was kinda late for me.



    Jim

+ Reply to Thread
Page 1 of 2 1 2 LastLast