Donn Cave wrote: > Quoth Steve Holden <[EMAIL PROTECTED]>: > | Ben Finney wrote: > ... > | > If a programmer decides on behalf of the user that "localhost" should > | > be treated specially, that programmer is making an error. > | > | Inter-process TCP/IP communication between two processes on the same > | host invariably uses the loopback interface (network 127.0.0.0). > | According to standards, all addresses in that network space refer to the > | local host, though 127.0.0.1 is conventionally used. > | > | The transmit driver for the loopback interface receives a datagram from > | the local network layer and immediately announces its reception back to > | the local network layer. > > Are you saying, in that first paragraph, that if for example I telnet to > my local host's external IP address, to a service that bound explicitly to > the external interface -- I'll actually be going through the loopback > interface anyway, invariably regardless of host network implementation? > I wasn't specifically saying that, no. However on Solaris I have observed local connections to an external interface actually increasing the packet count on the loopback, but I can't confirm whether those connections were to services specifically bound only to the external interface.
Certainly on Windows XP there is a host-specific route via 127.0.0.1 to the external interfaces as well as the network route via the external interface. I wouldn't necessarily expect this to extend to other platforms. This is demonstrated by the following output from "route print". I have chopped the metric column to avoid line wrapping. ===================================================================== Active Routes: Network Destination Netmask Gateway Interface 0.0.0.0 0.0.0.0 192.168.123.254 192.168.123.123 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 192.168.123.0 255.255.255.0 192.168.123.123 192.168.123.123 192.168.123.123 255.255.255.255 127.0.0.1 127.0.0.1 192.168.123.255 255.255.255.255 192.168.123.123 192.168.123.123 192.168.174.0 255.255.255.0 192.168.174.1 192.168.174.1 192.168.174.1 255.255.255.255 127.0.0.1 127.0.0.1 192.168.174.255 255.255.255.255 192.168.174.1 192.168.174.1 224.0.0.0 240.0.0.0 192.168.123.123 192.168.123.123 224.0.0.0 240.0.0.0 192.168.174.1 192.168.174.1 255.255.255.255 255.255.255.255 192.168.123.123 3 255.255.255.255 255.255.255.255 192.168.123.123 192.168.123.123 255.255.255.255 255.255.255.255 192.168.174.1 192.168.174.1 Default Gateway: 192.168.123.254 ===================================================================== regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden Blog of Note: http://holdenweb.blogspot.com See you at PyCon? http://us.pycon.org/TX2007 -- http://mail.python.org/mailman/listinfo/python-list