From owner-freebsd-net Wed Jul 26 13:43:48 2000 Delivered-To: freebsd-net@freebsd.org Received: from rapidnet.com (rapidnet.com [205.164.216.1]) by hub.freebsd.org (Postfix) with ESMTP id E63D837B5D3 for ; Wed, 26 Jul 2000 13:43:43 -0700 (PDT) (envelope-from nick@rapidnet.com) Received: from localhost (nick@localhost) by rapidnet.com (8.9.3/8.9.3) with ESMTP id OAA71163; Wed, 26 Jul 2000 14:43:30 -0600 (MDT) Date: Wed, 26 Jul 2000 14:43:30 -0600 (MDT) From: Nick Rogness To: Albert Chin-A-Young Cc: freebsd-net@freebsd.org Subject: Re: Routing help In-Reply-To: <20000726013652.B8690@postal.thewrittenword.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 Wed, 26 Jul 2000, Albert Chin-A-Young wrote: > I have a FreeBSD/x86 3.4 box configured with two NICs, both connected > to separate networks. I have one default route. How would I do the > following: > 1. Respond to all packets coming from NIC #1 through NIC #1 and > respond to all packages coming from NIC #2 through NIC #2. > Because I have a default route, all packages return through > only one NIC. Return from where? Are the hosts on the networks connected pointed at the FreeBSD as the default gateway? I'm not quite clear on what you mean but I would recommend some type of Interior routing protocol, like RIP or OSPF to handle your routing needs. Static routes can be a pain to manage after a while. > 2. If NIC #1 goes down and the default route is set to NIC #1, > no packets can go through on NIC #2 (only for that subnet). > Is it possible to add a second default route so when the > network on NIC #1 goes down packets are sent through > NIC #2 (this disturbs connections already on NIC #1 but > that's OK). > This discussion has come up before. You can't (yet) add the same route to a netblock that is already in the routing table. However, here is a possible solution for 2 default gateways (1 as primary and 1 as a backup): route add -net 0.0.0.0 -netmask 128.0.0.0 XXX.XXX.XXX.XXX route add -net 128.0.0.0 -netmask 128.0.0.0 XXX.XXX.XXX.XXX route add -net 0.0.0.0 -netmask 0.0.0.0 BBB.BBB.BBB.BBB Where XXX.XXX.XXX.XXX is your main gateway (primary) and BBB.BBB.BBB.BBB is your backup gateway IP. Nick Rogness - Drive defensively. Buy a tank. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message