From owner-freebsd-isp Wed Oct 7 07:10:46 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA25840 for freebsd-isp-outgoing; Wed, 7 Oct 1998 07:10:46 -0700 (PDT) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from dns.webwizard.net.mx (dns.webwizard.com.mx [148.245.50.27]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA25762 for ; Wed, 7 Oct 1998 07:10:29 -0700 (PDT) (envelope-from eculp@webwizard.org.mx) Received: from webwizard.org.mx (dns.webwizard.com.mx [148.245.50.27]) by dns.webwizard.net.mx (8.9.1/8.9.1) with ESMTP id JAA21928; Wed, 7 Oct 1998 09:00:14 -0500 (CDT) (envelope-from eculp@webwizard.org.mx) Message-ID: <361B73EE.9AB61048@webwizard.org.mx> Date: Wed, 07 Oct 1998 09:00:14 -0500 From: Edwin Culp X-Mailer: Mozilla 4.5b2 [en] (X11; I; FreeBSD 3.0-BETA i386) X-Accept-Language: en MIME-Version: 1.0 To: Eddie Irvine CC: Stephan Mantler , freebsd-isp@FreeBSD.ORG Subject: Re: fun with route(8) ... References: <361A4ACF.E61A54AA@imagination.at> <361B579C.69089B21@tpgi.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Eddie Irvine wrote: > Stephan Mantler wrote: > > > I'm experiencing a surprising amount of trouble with our local routing > > configuration. Basically, we have a freebsd box with three interfaces: > > 192.168.1.1/24 and 192.168.2.1/24 to the local subnets and one for > > the uplink. The problem is that the next-hop router is on a different > > class C subnet than the gateway's uplink interface (which is a /32 > > address). > > > > the gateway is running 2.2CAM-19980716-SNAP (on top of 2.2.7). > > > > Let's say the gateway's external interface was 194.123.123.250, and > > the uplink 194.123.128.10/24. > > > > So what we tried was: > > route add -host 194.123.128.10 194.123.123.250 -interface > > route add -net default 194.123.128.10 > > > > result: couldn't even ping the uplink. second route doesn't work, > > 'network unreachable' (why is that? according to the man pages, > > -interface specifies that the dst is directly reachable!). specifying > > the interface name as the gateway address (ie. route add -host > > 194.128.128.10 -interface xl2) didn't work either. > > > > after endless hours of poking around, i finally found a way to trick > > freebsd into doing the right thing: > > > > - ifconfig the uplink interface to /16 > > - add routes (works now, bsd believes they are on the same subnet) > > - ifconfig interface back to /32 > > > > what am i missing out? (this ugly hack can't be the only way, right?) > > > > thanks in advance for any comments/help, > > -step. > > Umm, since no one else has replied yet... I kinda thought that > the IP router closest to you HAD to be on the same IP subnet as > your interface. What IP number is at the other end or your gateway > interface? > > Let me know how you get on. > > Eddie. I've done this with disorganized cable companies with no ill effects with a lot of strange subnets and various gateways and no load balancing. It is a "quick and dirty" solution. This is a little unsual that two ends of a cable be on two different class "c"'s. Mine have been /30 or /28 on a class c and I have used the complete class c on the interface to te able to choose the better GW. What I have never tried is to bring it back to the original netmask. I never needed to and wouldn't have thought that it would work. ed To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message