From owner-freebsd-questions@FreeBSD.ORG Wed Oct 12 14:17:31 2005 Return-Path: X-Original-To: freebsd-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 3AE5F16A420 for ; Wed, 12 Oct 2005 14:17:31 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.192]) by mx1.FreeBSD.org (Postfix) with ESMTP id 273BB43D69 for ; Wed, 12 Oct 2005 14:17:30 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by zproxy.gmail.com with SMTP id z31so115906nzd for ; Wed, 12 Oct 2005 07:17:29 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pTX4nSqFPKVDo7jEhJXKsN5Ypm62arx1/GhrFPTmZn/NEGRntS//buBABp6tK+md1zc3aGDeyVWSjXsTPQON8I2GlENhXv6Lh3lDsYrphuJSkxhQOIHJm5ZDfBRUP+3SYR3kuuddlSYmUYL8O2dt5TQ3wZpKVik4EFlCmFCPNew= Received: by 10.37.2.27 with SMTP id e27mr976987nzi; Wed, 12 Oct 2005 07:17:29 -0700 (PDT) Received: by 10.37.20.34 with HTTP; Wed, 12 Oct 2005 07:17:29 -0700 (PDT) Message-ID: Date: Wed, 12 Oct 2005 18:17:29 +0400 From: "Andrew P." To: Olaf Greve In-Reply-To: <434D1942.7060304@axis.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051012104241.GA34129@dogma.freebsd-uk.eu.org> <434D02AF.9@axis.nl> <434D1942.7060304@axis.nl> Cc: freebsd-questions@freebsd.org Subject: Re: How to properly set-up multiple NICs? 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: Wed, 12 Oct 2005 14:17:31 -0000 On 10/12/05, Olaf Greve wrote: > Hi, > > Tnx for the reply! > > > I don't think you've missed anything. > > Good! That's what I also thought, but I just wanted to be sure. :) > > > In /etc/rc.conf you can add something like: > > ifconfig_rl0=3D"inet 192.168.17.1 netmask 0xffffff00" > > ifconfig_lo0_alias0=3D"inet 172.17.0.1 netmask 0xffffffff" > > ifconfig_vge0=3D"dhcp" > > ...to give you the general idea. It's enough to bring > > the NICs up and running, but then consider DNS > > and other issues that provide for a networking environment. > > Yes, the main entry, i.e., the one for the outside world is set-up like > this: > ifconfig_rl0=3D"inet 123.45.67.89 netmask 255.255.255.0" > defaultrouter=3D"123.45.67.1" > hostname=3D"abcdef.nl" > > My other two NICs are identified as re0 and sk0. When setting up one of > them, say re0, for the local network I guess I only have to add an entry > to /etc/rc.conf like: > > ifconfig_re0=3D"inet 192.168.1.1 netmask 255.255.255.254" > > (note: the above gives a very restrictive netmask, as I'll only need the > addresses 192.168.1.1 and 192.168.1.2). > > Would the above be correct, or should there also be an additional > defaultrouter entry, next to the one for the outside traffic (e.g. > defaultrouter=3D"192.168.1.1")? This wouldn't really make sense to me, as > I guess that one would then become 'the' defaultrouter for all traffic > (be it local or outside world)... > > Cheers! > Olafo > You'll only need one router, as the neighboring server will be directly accessible (via ethernet). Good that your brought the topic of subnetting up. I'm not going to explain it (any networking book will), for 2 hosts you'll probably need netmask 255.255.255.252. Subnet address will be 192.168.1.0, servers will have xxx.1 and xxx.2, and the broadcast address will be xxx.3.