From owner-freebsd-questions@FreeBSD.ORG Tue Feb 14 18:45:07 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7CB0416A420 for ; Tue, 14 Feb 2006 18:45:07 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from relay02.roc.ny.frontiernet.net (relay02.roc.ny.frontiernet.net [66.133.182.165]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2731543D45 for ; Tue, 14 Feb 2006 18:45:06 +0000 (GMT) (envelope-from drew@mykitchentable.net) Received: from blacklamb.mykitchentable.net (70-97-209-135.dsl2.elk.ca.frontiernet.net [70.97.209.135]) by relay02.roc.ny.frontiernet.net (Postfix) with ESMTP id 99E0B3707AD; Tue, 14 Feb 2006 18:45:04 +0000 (UTC) Received: from [192.168.1.30] (unknown [192.168.1.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by blacklamb.mykitchentable.net (Postfix) with ESMTP id 1B7B61648B7; Tue, 14 Feb 2006 10:45:01 -0800 (PST) Message-ID: <43F2252D.8060605@mykitchentable.net> Date: Tue, 14 Feb 2006 10:45:01 -0800 From: Drew Tomlinson User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: Steve Douville References: <02ca01c6316c$ce4b2ce0$c5eb020a@sdouvilnonq1> In-Reply-To: <02ca01c6316c$ce4b2ce0$c5eb020a@sdouvilnonq1> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-2.3.2 (20050629) at filter10.roc.ny.frontiernet.net Cc: freebsd-questions@freebsd.org Subject: Re: IP Routing Question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Feb 2006 18:45:07 -0000 On 2/14/2006 5:44 AM Steve Douville wrote: > I'm trying to set up the routing table to force requests to certain IP addresses to use a particular ethernet card. I've used the route command in a number of ways, but still can't come up with how to force to use em1 instead of em0, with the right gateway. > > em0 is aaa.bbb.ccc.207 > em1 is aaa.bbb.ccc.200 > Both have netmask of 255.255.255.0 > em0 goes to the main port, gateway aaa.bbb.ccc.195. em1 goes to a switch, which is aaa.bbb.ccc.196, the gateway to other ip's on the switch. > > What I want to end up with is: > aaa.bbb.ccc.196 link#2 em1 > aaa.bbb.ccc.209 link#2 em1 > > I've tried lots of combinations, using the -ifp flag to force em1, but the only way I can get the gateway to say link#2 is to ping the ip first, whereas it gets put in the table even though it's not found, and then doing a route change. I need some way to put this in rc.local so that it's set up when booted. > What happens with a simple 'route add aaa.bbb.ccc.196? Or am I misinterpreting what you wish to achieve? HTH, Drew -- Visit The Alchemist's Warehouse Magic Tricks, DVDs, Videos, Books, & More! http://www.alchemistswarehouse.com