From owner-freebsd-net Tue Mar 9 10:41:34 1999 Delivered-To: freebsd-net@freebsd.org Received: from Homer.Web-Ex.com (homer.web-ex.com [209.54.66.254]) by hub.freebsd.org (Postfix) with ESMTP id 3DE5D14F29 for ; Tue, 9 Mar 1999 10:41:19 -0800 (PST) (envelope-from jim@web-ex.com) Received: from localhost (jim@localhost) by Homer.Web-Ex.com (8.9.1/8.9.1) with ESMTP id NAA02485; Tue, 9 Mar 1999 13:36:01 -0500 (EST) (envelope-from jim@web-ex.com) X-Authentication-Warning: Homer.Web-Ex.com: jim owned process doing -bs Date: Tue, 9 Mar 1999 13:36:01 -0500 (EST) From: Jim Cassata To: Chris Watson Cc: freebsd-net@FreeBSD.ORG Subject: Re: Route add question In-Reply-To: <001901be6a56$3aa2c4b0$3d01a8c0@nt-trash.omaha.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 9 Mar 1999, Chris Watson wrote: > I was trying to figure out today how to add a default route to an interface > that is in a box with another interface that has a default route. > > I.e > > 3 nic cards in a box. > > xl0 > fxp0 > fxp1 > If xl0 is ifconfig'd first then it gets the default route on bootup correct? Incorrect. Think about what a default route or a route is. You are telling the machine where to deliver packets. The machine can only speak to an interface to which it is directly connected. The default route simply says "If I have packets addressed to destinations that are not in my route table (and so I don't know where they go) give them to this interface" It will do this for one interface only. > What I was trying to do was assign the default route to fxp0 after bootup > after xl0 was configured. > I thought ifconfig xl0 delete might work. Then I could assign a the same > default route to fxp0 that *was* assigned to xl0. > But it kept useing xl0 as the interface. > The default route is going to be routed through the interface that directly connects to the default gateway. take for example: route add default 209.100.100.1 if I have ed0 ifconfig'ed for 209.100.100.5 with a netmask of 255.255.255.0 then this will be the interface used. Jim Cassata 516.421.6000 jim@web-ex.com Web Express 20 Broadhollow Road Suite 3011 Melville, NY 11747 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message