From owner-freebsd-isp Tue Oct 6 07:53:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA00758 for freebsd-isp-outgoing; Tue, 6 Oct 1998 07:53:31 -0700 (PDT) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from pendel.imagination.at (gw.imagination.at [194.152.163.250] (may be forged)) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA00742 for ; Tue, 6 Oct 1998 07:53:24 -0700 (PDT) (envelope-from step@imagination.at) Received: from imagination.at (localhost.imagination.at [127.0.0.1]) by pendel.imagination.at (8.8.8/8.8.8) with ESMTP id QAA24225 for ; Tue, 6 Oct 1998 16:52:31 GMT (envelope-from step@imagination.at) Message-ID: <361A4ACF.E61A54AA@imagination.at> Date: Tue, 06 Oct 1998 16:52:31 +0000 From: Stephan Mantler Organization: Imagination X-Mailer: Mozilla 4.5b2 [en] (X11; I; FreeBSD 2.2CAM-19980716-SNAP i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-isp@FreeBSD.ORG Subject: fun with route(8) ... Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org [repost since nobody responded in -questions] Hi, 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. -- stephan mantler : triathlete, CG & Network hacker, fire fighter. Reality is in fact virtual. 286 days until Ironman Austria. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message