Subject: Re: Binding more than one IP to a NIC
To: Colin Raven <duiker@haggis.nl>
From: Andy Ruhl <acruhl@gmail.com>
List: port-cobalt
Date: 11/06/2004 08:12:00
On Sat, 06 Nov 2004 15:45:46 +0100, Colin Raven <duiker@haggis.nl> wrote:
> Hi all!
> This is more of a pure NetBSD question than a Cobalt specific question
> but I'm subscribed here and have absolutely *no* other exposure to
> NetBSD other than on the Qube2.
> Here's my question....
> The whole house is on a 10.0.0.x LAN, but in my office sits the qube
> with 2 NICS one PC and a laptop. I want to make the secondary NIC and
> the 2 other machines operate on the 192.168.0.x range. The Qube is going
> to serve mail, act as a caching DNS machine grab stuff via ftp and wget
> (but not serve ftp) and host a webpage or two...and that's it.
> How do I bind an additional IP's to the secondary NIC? For example I
> want it to have 192.168.1.0 and 192.168.1.1...is it as simple as making
> an extra entry in /etc/ifconfig.tlp1? and if so, how to I initialize the
> NIC once the changes have been made? rebooting the box doesn't seem a
> Unix-like thing to do somehow, so I'm wondering how to accomplish this.
> As a followup, how do I pass packets from the internal side
> (192.168.x.x) to the outbound side (and towards the router) on the
> 10.0.0.x LAN - and back, thus making the Qube2 an office gateway...BTW
> the DSL router is 10.0.0.138 of course
> The reason I want to bind 2 IP's to the secondary NIC is because of the
> Windows requirement of entering 2 DNS IP's...and does it matter that one
> of the two IP's is also known as a gateway IP?
> I hope the question is sufficiently clear, and that someone has the time
> to mess with an answer. Thanks all.
> Regards & TIA,
> -Colin

Trying to put this as gently as possible...

I think you are a little new to the unix way, and possibly even newer
to the NetBSD way.

Many of the questions you are asking here are documented in the users
guide or elsewhere on the net. But usually the biggest problem for
newer people is where to go to get this information to start.

Firewalling and forwarding are done with ipf and ipnat. Check the man
pages. The ifconfig man page has more info on configuring an
interface, and the ifconfig.if man page shows how to configure an
interface at boot time.

You're right, it's not the unix way to reboot, but it is every
computer way to keep desired changes across a reboot, so it's OK to
reboot to test it out.

I'd also like to add that the Qube is simply "another computer",
albeit one that doesn't have a VGA interface like you're probably used
to. It seems kind of boring, but this is the goal of NetBSD: to make
all hardware behave as similarly as possible in order to make a useful
computer out of it.

Another aspect of what I just said was, almost all of the
documentation written so far is going to be relevant to the Qube.
Where it isn't, ask. If you don't know which doc to use or you don't
understand the doc, ask.

Andy