Path: utzoo!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac,att!ucbvax!CUNYVM.CUNY.EDU!PIRARD%vm1.ulg.ac.be From: PIRARD%vm1.ulg.ac.be@CUNYVM.CUNY.EDU (Andr'e PIRARD) Newsgroups: comp.protocols.tcp-ip Subject: Re: What is INADDR_LOOPBACK for in sockets? Message-ID: <9103181320.AA23998@ucbvax.Berkeley.EDU> Date: 18 Mar 91 11:46:46 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 28 >>>In article , mcgrath@paris (Roland >>> McGrath) writes: >>>INADDR_LOOPBACK is 0x7f000001, Internet address 127.0.0.1, usually called >>>`localhost'. Talking to this address gets you back to where you started from >>From: ea.ecn.purdue.edu!housel@ee.ecn.purdue.edu (Peter S. Housel) >> The nifty thing is that (on many systems with BSD-derived >>networking) you can disable the loopback-net, through which address >>127.0.0.1 is routed. Running "ifconfig lo0 down" will disable the >>"loopback interface" and the machine will be unable to talk to itself. >I can't resist adding that you have to be careful, though, of >situations where you lose a route to 127.0.0.1 but you have a >"default" route floating around your net. For example, I used to see 1) On my IBM TCP/IP for VM, "own-address" goes through the network, as you say. 2) But trying FTP 127.0.0.1 gets me talking to the first non such router on the path to the Internet. 3) 14.0.0.0 is used instead to stay local. 4) and, of course, ftp 14.0.0.0 from a host whose Internet path I am on gets to my system. So, it looks like the specific address is implementation dependent. A question is: how can a procedure (script or whatever) wishing to use the loopback address be made portable when there is no "localhost" to refer to in the dns? Andr'e PIRARD SEGI, Univ. de Li`ege B26 - Sart Tilman B-4000 Li`ege 1 (Belgium) pirard@vm1.ulg.ac.be or PIRARD%BLIULG11.BITNET@CUNYVM.CUNY.EDU