From owner-freebsd-questions@FreeBSD.ORG Thu Dec 4 13:41:53 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 2480416A4CE; Thu, 4 Dec 2003 13:41:53 -0800 (PST) Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [216.148.227.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 226B243FD7; Thu, 4 Dec 2003 13:41:50 -0800 (PST) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (rwcrmhc12) with ESMTP id <2003120421414901400c6l5oe>; Thu, 4 Dec 2003 21:41:49 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id NAA44790; Thu, 4 Dec 2003 13:41:47 -0800 (PST) Date: Thu, 4 Dec 2003 13:41:45 -0800 (PST) From: Julian Elischer To: Maksim Yevmenkin In-Reply-To: <20031204162719.62941.qmail@web40302.mail.yahoo.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: questions@freebsd.org cc: net@freebsd.org Subject: Re: how to force packets to go out on a specific interface 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: Thu, 04 Dec 2003 21:41:53 -0000 if you use ipfw then the 'fwd' command CAN be used to force this if you set up the routes correctly.. you send the packets to addresses that can only reached through the different interfaces according to the routes that you have installed.. On Thu, 4 Dec 2003, Maksim Yevmenkin wrote: > Dear Hackers, > > is there a way to force packets to go out on a specific interface > based on a source IP address? > > here is what we want: for testing purposes we have a FreeBSD box with > two 100Mbit NICs (em0 and em1). both NICs are on the the same subnet > 172.1.1.x/23. both NICs are connected to the ServerIron. the purpose > of the setup is to get 200Mbit link between FreeBSD and ServerIron. > > ethernet trunking is NOT an option. it seems ServerIron uses algorithm > that selects physical port in the trunk based on source and destination > IP. IPs do not change during the test, so one NIC gets more traffic then > another (we only have few clients that talk to the FreeBSD box). > > so what is really required is: if a process was bound to 172.1.1.1 (em0) > then the packets should go out on em0 and if process was bound to > 172.1.1.2 (em1) then packets should go out on em1. we tried ipfw(8) > "forward" and it did not do what we want. Linux can handle this via > "ip route foo bar" thing where we can specify which local source address > should go out on which interface. > > one more thing: the solution must be compatible with dummynet(4). > > thanks, > max > > __________________________________ > Do you Yahoo!? > Free Pop-Up Blocker - Get it now > http://companion.yahoo.com/ > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >