Date: Fri, 31 Jan 2003 19:10:29 -0500 From: Bill Moran <wmoran@potentialtech.com> To: Thaddeus Quintin <tq101100@ohio.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: A twisted home network Message-ID: <3E3B1075.3000902@potentialtech.com> References: <3E3B05AD.90805@attbi.com> <188996853.1044039149@[192.168.0.2]>
next in thread | previous in thread | raw e-mail | index | archive | help
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 192.168.0.1 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 192.168.0.1 and the dc0 card on the FreeBSD box to be 192.168.0.2 Disable DHCP on the dlink for the time being. Configure the ep1 nic on FreeBSD to be 172.16.0.1 ... be sure to enable forwarding on the FreeBSD box (gateway_enable="yes" in rc.conf) The default gateway on the FreeBSD machine should be 192.168.0.1 Give the rest of your computers 172.16.0.* addresses with 172.16.0.1 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 http://www.potentialtech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E3B1075.3000902>