Subject: Re: Binding more than one IP to a NIC
To: Andy Ruhl <acruhl@gmail.com>
From: Colin Raven <duiker@haggis.nl>
List: port-cobalt
Date: 11/06/2004 17:22:59
Andy Ruhl wrote:

>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.
>  
>
Not "new" in the "newbie" sense, I've taken care of FreeBSD webservers, 
but rarely - if ever - has anything radical been necessary - for example 
as asked below. While I'd say that's hardly plug 'n play, perhaps more 
aptly phrased as 'plug 'n carry on in the usual (non adventurous) way'. 
Plesk (and CPanel) make administering most aspects of production boxes 
fairly non invasive.
I'm *certainly* new to the NetBSD way, I already like it since I've 
learned an immense amount in the extremely short time I've been playing 
with this little box.

>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.
>  
>
Absolutely 100% correct.

>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.
>  
>
Excellent - and thanks for that!!

>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.
>  
>
Good point, well put. I never quite thought of it in those terms.

>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.
>  
>
Oh it's *far* from boring, it's completely engrossing. I feel as if I 
could play with this stuff for ever and *still* find new and intersting 
things to peek under the hood and see how it works.

>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.
>  
>
Reassuring to know, and thanks for the kind words!!

/me is heading off for a marathon RTFM session.

Regards & Thanks!!!!
-Colin