From owner-freebsd-questions Wed Sep 23 06:41:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA26276 for freebsd-questions-outgoing; Wed, 23 Sep 1998 06:41:35 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from step.cg.tuwien.ac.at (step.cg.tuwien.ac.at [128.130.166.89]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA26269 for ; Wed, 23 Sep 1998 06:41:31 -0700 (PDT) (envelope-from step@step.cg.tuwien.ac.at) Received: (from step@localhost) by step.cg.tuwien.ac.at (8.8.7/8.8.7) id PAA21982 for freebsd-questions@freebsd.org; Wed, 23 Sep 1998 15:41:24 +0200 From: Stephan Mantler Message-Id: <199809231341.PAA21982@step.cg.tuwien.ac.at> Subject: fun with route(8) To: freebsd-questions@FreeBSD.ORG Date: Wed, 23 Sep 1998 15:41:24 +0200 (CEST) Organization: Institute of Computer Graphics, Vienna Univ. of Technology X-Homepage: http://www.cg.tuwien.ac.at/~step/ X-System-Load: 0.00, up 15 day(s) Reply-To: step@cg.tuwien.ac.at X-Mailer: ELM [version 2.4ME+ PL40 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 (not the real addresses). 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'. next try: (deleting the above routes first) route add -host 194.123.128.10 -interface xl2 route add -net default 194.123.128.10 result: route to the uplink shows up in routing table with the gateway address the same (ether hardware) address as the uplink interface. bad. second route still doesn't work. then: delete all arp entries. route to 194.123.128.10 gone. (ok, that didn't really surprise me). *CHANGED* the arp entry for this ip address to the proper one. result: can ping uplink. then: (still trying to get a default route up) route add -net default 194.123.123.250 (this can't be what i want.) route change default 194.123.128.10 (i'm not expecting this to work) it does work, tho. result: i've got a route to the proper uplink. things work. all of this leaves a few questions open: -) what's wrong with the original two statements? after reading the man pages (several times), this should've been the proper way to set things up.. -) why does the route add -net default fail, while i can add a different default route (to one of the local interfaces) and then *change* it to use the gateway i want? it appears to me that route doesn't recognize the uplink to be directly reachable, despite the -interface option. (route change ...128.10 -iface didn't help either). -) what's with the arp entry? i can't believe i need to change it by hand.. thanks in advance for any comments/help, -step. -- Stephan Mantler | Our greatest glory consists not in never triathlete-sysadmin-fire fighter | falling,but in rising every time we fall. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message