From owner-freebsd-questions@FreeBSD.ORG Mon Nov 10 08:49:39 2003 Return-Path: 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 419F716A4CE for ; Mon, 10 Nov 2003 08:49:39 -0800 (PST) Received: from pi.codefab.com (pi.codefab.com [66.234.138.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id D557843F93 for ; Mon, 10 Nov 2003 08:49:37 -0800 (PST) (envelope-from cswiger@mac.com) Received: from [10.1.1.193] (dpvc-68-161-244-25.ny325.east.verizon.net [68.161.244.25]) by pi.codefab.com (8.12.9p2/8.12.10) with ESMTP id hAAGnQEC026358; Mon, 10 Nov 2003 11:49:26 -0500 (EST) In-Reply-To: <20031110161355.50230.qmail@web14001.mail.yahoo.com> References: <20031110161355.50230.qmail@web14001.mail.yahoo.com> Mime-Version: 1.0 (Apple Message framework v606) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Mon, 10 Nov 2003 11:49:25 -0500 To: Dimitris Xochellis X-Mailer: Apple Mail (2.606) X-Spam-Status: No, hits=0.0 required=7.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on pi.codefab.com cc: freebsd-questions@freebsd.org Subject: Re: Routing selectively X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2003 16:49:39 -0000 On Nov 10, 2003, at 11:13 AM, Dimitris Xochellis wrote: > In my local network I have two routers that provide > internet services. > > -Can I use them both simultaneously? Yes. > -Do I need to have a second ethernet card (And add a > second interface to rc.conf) in order to use them > both? No, but it might be easier to configure a sensible network topology using two cards. Otherwise, you can configure a virtual interface ("ifconfig rl0 alias YYY")... > -Can I configure my FreeBSD box to use the first > router when I am sending packets to a specific > internet subnet and the second otherwise? Sure. > -Any relative Docs or Examples please? Normally, one has one "default route", which tells all non-local traffic to go via your preferred router. You can add additional routes like so: route add -net 1.2.3.0/24 router1 route add -net 4.5.6.0/24 router2 There are better ways of managing routing than this, including setting up BGP/EGP peering with your ISPs, or some other routing protocol (OSPF), but this should get you started.... -- -Chuck