Date: Wed, 12 Oct 2005 18:17:29 +0400 From: "Andrew P." <infofarmer@gmail.com> To: Olaf Greve <o.greve@axis.nl> Cc: freebsd-questions@freebsd.org Subject: Re: How to properly set-up multiple NICs? Message-ID: <cb5206420510120717o226ee10au1cb7b70cacf04fc9@mail.gmail.com> In-Reply-To: <434D1942.7060304@axis.nl> References: <20051012104241.GA34129@dogma.freebsd-uk.eu.org> <cb5206420510120358y74caae44l3062248ae9a14b47@mail.gmail.com> <434D02AF.9@axis.nl> <cb5206420510120637g61924cb5n831cdcee55618946@mail.gmail.com> <434D1942.7060304@axis.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/12/05, Olaf Greve <o.greve@axis.nl> 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cb5206420510120717o226ee10au1cb7b70cacf04fc9>