From owner-freebsd-net@FreeBSD.ORG Wed Oct 5 10:47:54 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.ORG Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AC2C16A426; Wed, 5 Oct 2005 10:47:54 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23E1143D48; Wed, 5 Oct 2005 10:47:52 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (xabufw@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.1/8.13.1) with ESMTP id j95Alpku091129; Wed, 5 Oct 2005 12:47:51 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.1/8.13.1/Submit) id j95Alp81091128; Wed, 5 Oct 2005 12:47:51 +0200 (CEST) (envelope-from olli) Date: Wed, 5 Oct 2005 12:47:51 +0200 (CEST) Message-Id: <200510051047.j95Alp81091128@lurza.secnetix.de> From: Oliver Fromme To: freebsd-amd64@FreeBSD.ORG, freebsd-net@FreeBSD.ORG In-Reply-To: <43439F3B.1040903@axis.nl> X-Newsgroups: list.freebsd-amd64 User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.11-RELEASE (i386)) Cc: Subject: Re: How to best set-up a small local 'sync' network next to the live network? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-net@FreeBSD.ORG List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2005 10:47:54 -0000 Hi, (This doesn't seem to be AMD64-specific, so I think it should be moved to the -net mailing list.) Olaf Greve wrote: > [Setting up two machines with fall-back] > > Primary server: > - Runs FreeBSD 5.4-Release AMD64 > - Connected to outside world via NIC 1 @ a real IP address; say > 123.45.67.89, publicly available as webserver incl. DNS mappings, etc. > - Connected via a cross-wire cable to fall-back machine via NIC 2 ; > using address 192.168.1.1 > > Fall-back server: > - Runs FreeBSD 5.2.1-Release i386 > - Connected to outside world via NIC 1 @ a real IP address; say > 123.45.67.88, "privately" available by IP address only (mainly for SSH > access, serves as fall-back and staging machine) > - Connected via a cross-wire cable to primary server machine via NIC 2 ; > using address 192.168.1.2 > > [...] > -How can I best set-up such a dual network configuration, such that one > network will not interfere with the other? You machines have different IP addresses, so there is no conflict. It should work fine. > -Can I somehow 'force' the machines to automatically interpret anything > in the 192.168.1.x range to be local, and hence automatically use NIC 2, > instead of using the NIC 1 adapter (which handles my outside world traffic)? That will happen automatically. When you ifconfig an IP on your NIC 2, it will automatically add an appropriate route for that subnet on that NIC. > -Is it sufficient to set-up the Rsync daemon on the primary machine to > only allow connections from 192.168.1.2, and to run as root, such that I > can easily use the cross-wire as a kind of direct tunnel to perform the > syncing? Yes. You should make sure that rsync is blocked on the outside interfaces (using IPFW, IPFilter or PF). Personally I don't think that rsync is the best way to perform such a mirror. There are other possibilities. But if you prefer rsync, it should work. > -What is the nicest MySQL replication mechanism? Presently I use a > mechanism that dumps the MySQL DB instances, and will then push them > over an SSH tunnel to the fall-back machine, directly loading them into > the MySQL DB on that machine. Is MySQL's master-slave syncing perhaps a > better choice? My personal recommendation is to use PostgreSQL 8. Its WAL logging feature is very well suited to synchronize one or more slave machines, and it's rock stable and fast. However, if you application is Mysql-specific and cannot easily be ported to PostgreSQL, then I'm afraid that wasn't the answer you expected. :-) Mysql supports some sort of replication, too, though. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "... there are two ways of constructing a software design: One way is to make it so simple that there are _obviously_ no deficiencies and the other way is to make it so complicated that there are no _obvious_ deficiencies." -- C.A.R. Hoare, ACM Turing Award Lecture, 1980