Thaddeus Quintin wrote:
There's plenty of information on how to install two network cards (done that), how to enable a FreeBSD box to run as a gateway, do NAT, DHCP, etc. However, I'm having a mental block with how the cards should be configured.

Here's how I want my network setup-
CABLE MODEM-> D-link DI-701 Residential Gateway->
FreeBSD NIC dc0 -> FreeBSD NIC ep1 -> hub -> other computers...

I'd like to leave the D-Link in place, since it has a built-in firewall and I'm not ready to start testing out my rules for ipfw. The D-Link assigns IP addresses Dynamically, or I can specify them statically. By default, the D-link has an IP address of and the IP pool goes up from there.

Where I get confused is how configure my network cards. Do I need a new IP prefix for the inner network? If the FreeBSD is a gateway, technically each NIC is connected to a different subnet, right? The card that will connect to the hub will need a Static IP address, since nothing is there to give an IP address. Does each NIC know of the other, or are the routing tables separate?

This seems like a simple problem, but I've been scouring the handbook, freebsd diary, and the man pages, but I can't find any good examples.
The reason that you're not seeing examples, is because the FreeBSD box
is not needed in your setup.  You could eliminate it altogether.

I'm assuming your want to use it as a gateway so you can learn and
eventually get rid of the d-link, so here's the easiest way.

The physical layout you describe above is OK (as to what connects to what)
Set up the dlink to be and the dc0 card on the FreeBSD box to
be Disable DHCP on the dlink for the time being.  Configure
the ep1 nic on FreeBSD to be ... be sure to enable forwarding
on the FreeBSD box (gateway_enable="yes" in rc.conf) The default gateway
on the FreeBSD machine should be
Give the rest of your computers 172.16.0.* addresses with
as their gateway.
Everything should work.
When you're ready to remove the dlink, you'll change dc0 to get its IP
from DHCP (from your ISP) and enable nat on the FreeBSD box.  Then remove
the dlink and plug the FreeBSD box directly into the cable modem.  Be sure
to adjust any firewall rules to match the changes in IP address.

Bill Moran
Potential Technologies

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to