On Fri, Sep 14, 2001 at 09:18:58PM +0800, Federico Sevilla III wrote:
> This is off-topic in PLUG so I'm writing here. I wonder: is there any
> significant difference between connecting to a machine via 127.0.0.1 and
> 192.168.0.1?
It is on-topic because it's got to do with kernel operations, so my reply
is to main PLUG :)
> o 127.0.0.1 is the loopback device (so traffic to 127.0.0.1 gets reported
> under my lo stats and not eth1).
Loopback can have any address, 127.0.0.1 is the well-known convention and
the DNS name for 'localhost'
> o A machine's 127.0.0.1 can only be reached by the machine itself.
This is enforced only by the routing table.
If you would add a route from another box *without* a localhost, going to
your box *with* localhost, you will be able to reach 127.0.0.1 over the
network.
> o Is 127.0.0.1 equivalent to UNIX sockets? (I don't think so but want to
> verify anyway)
No, UNIX sockets make use of socket files, those with 's' in 'ls -l'
output. Connecting 127.0.0.1 makes use of the IP stack.
> o Is accessing 127.0.0.1 faster than 192.168.0.1 (theoretically, since in
> practice the difference will probably be negligible)?
I don't know kernel internals well enough. I don't know if using 192.168.0.1
will be pushed out to the Ethernet driver or not. What I do know is that
it does not go on the wire - disconnect the UTP cable from your LAN card
and 192.168.0.1 will still work.
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]