From owner-freebsd-questions@FreeBSD.ORG Mon Jul 31 19:41:36 2006 Return-Path: X-Original-To: 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 6D5F016A501 for ; Mon, 31 Jul 2006 19:41:36 +0000 (UTC) (envelope-from fireduck@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.FreeBSD.org (Postfix) with ESMTP id 977D443D73 for ; Mon, 31 Jul 2006 19:41:01 +0000 (GMT) (envelope-from fireduck@gmail.com) Received: by nf-out-0910.google.com with SMTP id n29so6911nfc for ; Mon, 31 Jul 2006 12:40:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=CnG2B3Vqi6khBmtMgr6arHo/YBPDORp5KoeNzhRJyQKfhIHq1TgT/ntXxrJa/d+Sgbo9e/ORlVT4OVi6BoIbRyikpS8GXBnFFKARsqo/X96Q6i8E71ONrFhWvu3IRd+ZNFryDEXZrDQOyVb/yO7Rx4PUAc+Q+YVxOl5RbtdKkGE= Received: by 10.78.107.8 with SMTP id f8mr12620huc; Mon, 31 Jul 2006 12:40:51 -0700 (PDT) Received: by 10.78.129.5 with HTTP; Mon, 31 Jul 2006 12:40:51 -0700 (PDT) Message-ID: <7956f3200607311240g740c949cvbea994374967071f@mail.gmail.com> Date: Mon, 31 Jul 2006 15:40:51 -0400 From: "Joseph Gleason" To: questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: multiple interfaces on same subnet? 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: Mon, 31 Jul 2006 19:41:36 -0000 Is it possible to reach two hosts via two interfaces that are both on the same subnet? Example: em0: 172.20.0.1/16 em1: 172.20.0.2/16 And I want to reach 172.20.0.3 via em0 and 172.20.0.4 via em1. >From 'netstat -nr' I see a line like this: 172.20/14 link#1 UC 0 0 em0 This seems to say that anything on 172.20/14 should be reached on em0. Is it possible to add a rule that says that 172.20.0.4 should be reachable on em1? I only care about the path of outbound packets. I don't care which interface inbound traffic comes on. I am well aware that this is a fairly strange thing to do. My objective is to have a FreeBSD box balance outbound traffic between two NICs, while being able to select from among many routers that could be the default gateway and having the two NICs connect to different switches for fault tolerance. (I would do the fault tolerance via a watchdog script of some sort) If it weren't for the many routers aspect, it would be reasonable to create separate subnets. I need to be able to select from a group of around 10 possible default gateways and some of those routers I do not control so adding a subnet would be trouble.