Subject: Re: Router, gateway, or something like that
To: Evan Fletcher <evan@router.ecmhs.org>
From: Christopher Brown <chrsbrwn@mindspring.com>
List: port-mac68k
Date: 05/22/1999 23:58:39
Evan Fletcher wrote:
> LAN --->  HUB ---> [NetBSD ae0] ---> [some software] ---> [NetBSD
> ae1] ---> [cable modem]
> 
> *It is important to note that I do not need NAT, since the cable
> company doesn't care (or seem to notice) how many IP addresses I use.
> 

This is exactly my setup, (IIci, two ethernet cards, hub, cable modem),
so I hope that I can be of help to you.

It's probably not safe to assume that you can use IP numbers not
actually assigned to you by your ISP. Using numbers that their routers
don't know about can cause Bad Things to happen :)  I would at least
give them a heads up and make sure that the numbers you use are ok.

There are two ways to accomplish what you want to do. NAT actually works
extremely well for situations like yours and mine. Typically, only one
IP address is assigned to each ethernet interface in a computer. NAT
will translate the ip numbers from the subnet that one interface is on
to that of the other. There is a good HOW-TO regarding NAT on NetBSD at:

<http://radon.moof.ai.mit.edu/~armenb/ipnat.html>

The other way of doing it would be to use the route command (man route
for details) to add a route between the network number assigned to the
internal ethernet, and the external ethernet. How to choose between the
two methods: 

Use NAT if your service provider, like mine, only wants to give you one
IP number (mine charges $10 a month extra for each IP number beyond the first).

Use the route command if your service provider is willing to give you a
CIDR (Classless Internet Domain Routing) block of several numbers (that
come from and are approved by your ISP) to assign to your internal
network as a subnet.

My guess is that your cable company might be incompetent or
understaffed, and so might not care; but their upstream provider would
probably be extremely peeved if they started giving out blocks of
addresses, rather than single IP numbers. Or if you started using
numbers that weren't explicitly assigned to you.

-- 
Chris Brown -- Macintosh networking/Web development
<chrsbrwn@mindspring.com> <http://www.mindspring.com/~chrsbrwn>