From owner-freebsd-questions Wed Jun 25 00:33:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA07493 for questions-outgoing; Wed, 25 Jun 1997 00:33:33 -0700 (PDT) Received: from counterintelligence.cdrom.com (mdean.vip.best.com [206.86.94.101]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id AAA07487 for ; Wed, 25 Jun 1997 00:33:28 -0700 (PDT) Received: from localhost (root@localhost) by counterintelligence.cdrom.com (8.8.5/8.8.5) with SMTP id AAA00288; Wed, 25 Jun 1997 00:33:15 -0700 (PDT) Date: Wed, 25 Jun 1997 00:33:15 -0700 (PDT) From: 0000-Administrator Reply-To: 0000-Administrator To: Brian Somers cc: questions@freebsd.org Subject: Re: Routing Problems In-Reply-To: <199706250043.BAA11421@awfulhak.demon.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk **** I just wanted to check to see if I did this right, I changed the /etc/hosts file to have two entries 127.0.0.1 localhost 127.0.0.1 counterintelligence.cdrom.com counterintelligence so that when the ppp0 interface is not up (ip address 206.86.94.101) then the resolver uses /etc/hosts instead of then nameserver so telnetting to counterintelligence or counterintelligence.cdrom.com is routed to 127.0.0.1 which goes through the loopback device lo0 (counterintelligence.cdrom.com is also mdean.vip.best.com) also i do a: route add -host 206.86.94.101 -interface lo0 in my rc files so that once the ppp interface comes up (and even when it is down) packets headed for the ppp device go through the loopback, this seems to work but I don't really entirely understand the function of -interface (the man page said so) when the ppp device comes up i end up with a routing table like: Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default ns3.best.com UGSc 1 0 ppp0 localhost localhost UH 0 53 lo0 ns3.best.com mdean.vip.best.com UH 2 0 ppp0 mdean.vip.best.com lo0 UHS 0 0 lo0 Which seems to work well --- kind of clumsy, but I guess it would be ok then to change counterintelligence in the host file to 206.86.94.101? Would it not. ALSO MORE IMPORTANTLY ----- Can anyone tell me how to do something equivalent to IP Masquerading in linux on a FreeBSD box, I really want to change my work machine (which is masquerading a 20 winbox lan) over to FreeBSD, because linux in lame performance wise (for instance when I am doing a "tar czvf backup.tgz /" on the machine (it is a ppro-180 w/64mb 2 ethernet cards and a modem, serves as our router) the networking [we are talking a 28.8 modem here] slows to a halt --- it takes a minute and a half to login from the outside through the modem, i tried this with freebsd and it doesn't lag the same way. The good thing is that Linux masquerading works with ping and traceroute (ICMP) in addition to ftp and netscape now, I'd love to have the same for FreeBSD so I could throw my Linux machine in the Trash. Please point me somewhere. On Wed, 25 Jun 1997, Brian Somers wrote: > > > > I am running a stand alone FreeBSD 2.2.2 machine that is occassionally > > connected to the internet using the pppd daemon, I noticed that I cannot > > telnet to my ppp interface address (which works in linux): > > Well, the *reason* is that you have no route to your local > address, so your machine sends packets destined for that > address down the wire. The other side sees the packet and > says "dunno what to do with that" and drops it. > > You can add a route to localhost and things will work ok. > > Does anyone know if there's any rationalle behind this ? Should > ppp (and tun, and probably sl) be smarter and do the "right" > thing with these packets ? Should their xxxoutput routine > pass packets directly to their xxxinput, or even better, should > ip_output.c pass packets w/ source & dst addresses directly to > ip_input ? I'm going to take a look at adding a check and > calling ip_mloopback() in ip_output.c.... > > Of course this isn't an issue for ethernet 'cos the NIC just picks > up what it just sent out. > -- > Brian , > > Don't _EVER_ lose your sense of humour.... > > >