From owner-freebsd-questions Fri Jun 23 19:37:40 2000 Delivered-To: freebsd-questions@freebsd.org Received: from emu.prod.itd.earthlink.net (emu.prod.itd.earthlink.net [207.217.121.31]) by hub.freebsd.org (Postfix) with ESMTP id 7D4F937BADF for ; Fri, 23 Jun 2000 19:37:33 -0700 (PDT) (envelope-from cjc@earthlink.net) Received: from dialin-client.earthlink.net (pool0838.cvx21-bradley.dialup.earthlink.net [209.179.195.73]) by emu.prod.itd.earthlink.net (8.9.3-EL_1_3/8.9.3) with ESMTP id TAA29312; Fri, 23 Jun 2000 19:37:30 -0700 (PDT) Received: (from cjc@localhost) by dialin-client.earthlink.net (8.9.3/8.9.3) id TAA00528; Fri, 23 Jun 2000 19:35:58 -0700 (PDT) Date: Fri, 23 Jun 2000 19:35:27 -0700 From: "Crist J. Clark" To: Giorgos Keramidas Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Confused by Loopback Message-ID: <20000623193527.B481@dialin-client.earthlink.net> Reply-To: cjclark@alum.mit.edu References: <20000621205221.A43715@pool0586.cvx20-bradley.dialup.e> <20000623004145.B17268@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20000623004145.B17268@hades.hell.gr>; from keramida@ceid.upatras.gr on Fri, Jun 23, 2000 at 12:41:45AM +0300 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jun 23, 2000 at 12:41:45AM +0300, Giorgos Keramidas wrote: > > $ netstat -rn > > Routing tables > > > > Internet: > > Destination Gateway Flags Refs Use Netif Expire > > default 207.217.148.27 UGSc 11 22 tun0 > > 127.0.0.1 127.0.0.1 UH 0 0 lo0 > > 207.217.148.27 209.179.254.29 UH 12 0 tun0 > > While not connected to the network, I can see in my machine: > > % netstat -rn > Routing tables > > Internet: > Destination Gateway Flags Refs Use Netif Expire > 127.0.0.1 127.0.0.1 UH 1 11250 lo0 Yep. The 127-net is not there. > > Notice there is no LAN entry for the 127-net like the ifconfig(8) mask > > says. So if I were to do something silly like, > > > > $ ping 127.0.0.2 > > > > It goes out over the tun0 interface. I noticed this because for some > > perverse reason I tried, > > > > $ ping 127.255.255.255 > > > > And started getting replies from other hosts! I tried a traceroute(8) > > and watched 127.0.0.2 packets make their happy way out towards the > > I'net. > > > > Tell me I'm missing something silly here. > > You have not missed anything. That is exactly the way it works. > Why does it puzzle you? Because a network route for 127.0.0.0/8 does > not exist in your routing table by default? Right. The netmask for the 127-net is 255.0.0.0. 127.0.0.2 should be routed to the lo0 interface. It does not go to lo0 and heads out my tun0. Why does it work that way? The loopback seems to be working like, 127.0.0.1/32 and not 127.0.0.1/8 > If what puzzles you is that you actually *got* some replies back, you > have to use a firewall to stop packets originating from, or destined to > hosts in 127.0.0.0/8, from traversing your tun0 interface :) I was not bothering to firewall my ppp. After firewalling on my cable modem hookup, I did not figure dialing in a few minutes at a time was much of a problem... now I wonder. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message