----- Original Message -----
From: "eric pareja" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 16, 2001 12:57 AM
Subject: Re: [plug] Re: 127.0.0.1 vs 192.168.0.1
> On Fri, Sep 14, 2001 at 10:12:33PM +0800, Miguel A.L. Paraz wrote:
>
> > > 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.
>
> pinging 127.0.0.1 and 192.168.0.1 (both on the same machine) reveals
> some practical differences. for small transfers, it would be
> negligible to us hewmons. for the Human+ who thinks in milliseconds or
> smaller, the difference is not marginal.
tcp/ip stack of linux is written from scratch and some of its logic is
different from the standard BSD stack. on linux, the speed accessing of
127.0.0.1 or its logical interface otherwise known as loopback interface vs
192.168.0.1 as sample ip address of its physical interface within the host
itself is almost equal (but technically speaking not exactly equal due to a
little redirection). to prove and you dont want to dig its source code. try
to ping 127.0.0.1 and 192.168.0.1 within the host itself and try to run
ifconfig and look for packets in/out statistics. youll gonna see there that
the packets destined for 192.168.0.1 are redirected and injected to its
loopback interface queue. but for BSD derived tcp/ip stack, it is entirely
different. therefore accessing loopback interface on BSD is pretty much
faster than its physical interface. a security note on linux, a little extra
careful of writing firewall rules with this kind of trick because you can
easily bypass all its physical interface firewall rules due to the reason
above once you gain a single entry from the outside.
fooler.
_
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]