From owner-freebsd-questions Mon Feb 21 22:44: 6 2000 Delivered-To: freebsd-questions@freebsd.org Received: from mta4.snfc21.pbi.net (mta4.snfc21.pbi.net [206.13.28.142]) by hub.freebsd.org (Postfix) with ESMTP id 6415737B5D5 for ; Mon, 21 Feb 2000 22:44:03 -0800 (PST) (envelope-from ciagon@quiknet.com) Received: from ciagon ([209.233.16.89]) by mta4.snfc21.pbi.net (Sun Internet Mail Server sims.3.5.1999.09.16.21.57.p8) with SMTP id <0FQB00BSNJWSA0@mta4.snfc21.pbi.net> for freebsd-questions@FreeBSD.ORG; Mon, 21 Feb 2000 22:41:16 -0800 (PST) Date: Mon, 21 Feb 2000 22:50:11 -0800 From: Thomas Hargrove Subject: FreeBSD as a router To: freebsd-questions@FreeBSD.ORG Message-id: <001801bf7d01$10e2c6c0$0201000a@yourmom.dhs.org> MIME-version: 1.0 X-Mailer: Microsoft Outlook Express 5.00.2314.1300 Content-type: text/plain; charset="iso-8859-1" Content-transfer-encoding: 7bit X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 X-Priority: 3 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG My roommate and I currently have 3 connections to the internet (2 DSL lines and one cable modem connection). We also have 3 independent gateways on each line doing NAT for us (2 are FreeBSD, one is Linux Mandrake 7.0). The 3 gateways do NAT for about 10 Windows machines on the internal network. Our problem lies in the fact that when you configure DHCP to give out more than one default gateway to Windows machines the system relies on the Windows machine to change when it's primary default gateway goes down. This doesn't work well (trust me from experience... we've been using this system for about a month). So, what we need is a way to change routes to the internet (through the gateways) so that when we take down one of the gateways for maintenance, the Windows machines start routing off a different gateway (connection to the internet). Here's our solution to the problem (that again doesn't fully work): We set up a 4th machine (with FreeBSD, naturally) and set it as the default gateway under DHCP for all the Windows machines. That way there's only one machine that we have to change the routes on. Also, this machine will be super stable because it will only having a couple processes running and because we do our development on our main FreeBSD gateway (77 GB fileserver/gateway). So, our problem is setting up this 4th machine to route off different gateways depending on: a) which Windows machine initiates the connection (i.e.. we want to route our neighbors off the Linux box and us off the main FreeBSD machine) b) which gateway is up and stable (sometimes the gateway might have just come back up, but only for a few seconds as we make a quick change and then reboot, so we need a way to say don't change the route unless this gateway has been up and stable for an hour or so) c) (optional) which gateway currently has the fastest connection to the internet I don't believe this has been tried with a FreeBSD machine before and probably could be implemented relatively easily with a Cisco router or something similar, but unfortunately my roommate and I don't have the funds for something that extravagant (or expensive, for that matter). Here's the breakdown of IP's and such on our local network: BSD Fileserver (our DSL) 10.0.1.11 running DHCP, NAT, DNS, Apache Linux Mandrake 7.0 (neighbors DSL) 10.0.1.1 running NAT BSD secondary gateway (cable modem) 10.0.1.101 running NAT BSD Main Gateway 10.0.1.111 Also, if anyone knows how to run a FreeBSD machine as a backup DCHP or DNS server, I'd love to know how to do that too. Thanks for the help!!! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message