Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Jun 2000 22:19:27 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        The Clark Family <res03db2@gte.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Confused by Loopback
Message-ID:  <20000621221927.B43715@pool0586.cvx20-bradley.dialup.e>
In-Reply-To: <Pine.BSF.4.21.0006212107220.46613-100000@orthanc.dsl.gtei.net>; from res03db2@gte.net on Wed, Jun 21, 2000 at 09:09:25PM -0700
References:  <20000621205221.A43715@pool0586.cvx20-bradley.dialup.e> <Pine.BSF.4.21.0006212107220.46613-100000@orthanc.dsl.gtei.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 21, 2000 at 09:09:25PM -0700, The Clark Family wrote:
> 
> Do you have an lo0 device in rc.conf?

Sure do. That's the ifconfig(8) output below.

> There was a bug (for a while) that caused lo0 to not be setup?

Yeah, the classic symptom was people not being able to talk to their
portmappers.

> People sometimes delete lo0 from their rc.conf.

  $ grep lo0 /etc/rc.conf
  network_interfaces="lo0"

> I'd expect a netstat -in to show up the loopback pseudo-device.

Interesting. Yep, it is in there,

  $ netstat -in
  Name  Mtu   Network       Address            Ipkts Ierrs    Opkts Oerrs  Coll
  lp0*  1500  <Link#1>                             0     0        0     0     0
  lo0   16384 <Link#2>                           126     0      126     0     0
  lo0   16384 127           127.0.0.1            126     0      126     0     0
  tun0  1500  <Link#3>                         11500     0    11421     0     0
  tun0  1500  209.179.192.1 209.179.192.189    11500     0    11421     0     0

And that is a weird entry for tun0 there. But still not in the routing
table,

  $ netstat -rn
  Routing tables
  
  Internet:
  Destination        Gateway            Flags     Refs     Use     Netif Expire
  default            207.217.148.34     UGSc        2       27     tun0
  127.0.0.1          127.0.0.1          UH          0       52      lo0
  207.217.148.34     209.179.192.189    UH          3        0     tun0

And the packets still fly down tun0,

  $ traceroute 127.2
  traceroute to 127.2 (127.0.0.2), 30 hops max, 40 byte packets
   1  * * *
   2  207.217.148.33 (207.217.148.33)  180.139 ms  138.387 ms  139.520 ms
   3  vlan296-cr04-pas.neteng.itd.earthlink.net (207.217.2.101)  139.409 ms  138.369 ms  129.653 ms
   4  * *^C

And I can watch 'em go with a tcpdump(8) too. Oh, and I'll post my
favorite,

  $ ping 127.255.255.255
  PING 127.255.255.255 (127.255.255.255): 56 data bytes
  64 bytes from 207.217.2.37: icmp_seq=0 ttl=253 time=781.779 ms
  64 bytes from 207.217.2.69: icmp_seq=1 ttl=253 time=160.467 ms
  64 bytes from 207.217.2.101: icmp_seq=2 ttl=253 time=160.400 ms
  64 bytes from 207.217.2.101: icmp_seq=3 ttl=253 time=161.568 ms
  64 bytes from 207.217.2.69: icmp_seq=4 ttl=253 time=159.994 ms
  64 bytes from 207.217.2.69: icmp_seq=5 ttl=253 time=150.441 ms
  64 bytes from 207.217.2.15: icmp_seq=6 ttl=253 time=153.001 ms
  ^C
  --- 127.255.255.255 ping statistics ---
  8 packets transmitted, 7 packets received, 12% packet loss
  round-trip min/avg/max/stddev = 150.441/246.807/781.779/218.437 ms

I wish nmap(1) worked well over a PPP link; I'd love to know what OSes
are replying to those.

> [RC]
> 
> On Wed, 21 Jun 2000, Crist J. Clark wrote:
> 
> > I think I must be missing something... But I am not sure what. 
> > 
> > My loopback is configured so,
> > 
> >   $ ifconfig lo0
> >   lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
> >           inet 127.0.0.1 netmask 0xff000000 
> > 
> > But if I look at the routing table,
> > 
> >   $ 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
> > 
> > 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.
> > -- 
> > 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
> > 
> 

-- 
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000621221927.B43715>