View Single Post
Old 14th January 2010
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by joostvgh View Post
if0 = connected to router, so i would enter DCHP NONE NONE NONE in hostname.if0 .
is this correct? or do i need to put 'inet ...' in it too?
All that is required is "dhcp". This is discussed in Section 6.4.1 of the FAQ.

Your post also references hostname.if0 & hostname.if1. This is incorrect, however, you will find this in the documentation where "if" is used as a placeholder. Unlike Linux which identifies each Ethernet interface as "eth0", "eth1", etc., the *BSD family uses the specific driver used for the installed NIC. For example, in a Thinkpad laptop I use, the driver installed by the kernel is bge(4). This means that I have the following when setting up DHCP on this particular interface:

$ cat /etc/hostname.bge0
dhcp

You will find what drivers are used in your system by studying the output of dmesg(8).
Quote:
second, what ip can if1 have? is it the same range?
If this system is acting as a router, the subnets defined on each interface must be different. If you are unfamiliar with subnets, the following Wikipedia article is a start:

http://en.wikipedia.org/wiki/Subnetwork

However, note that understanding the topic well takes more than a five minute scan.
Quote:
do i need to make it static?
It will need to be static even if you have another DHCP server serving IP addresses on the internal network. The reason why is because this will be the gateway address used by all internal clients. If it is dynamically set, then all clients attached to this internal network will need to know the address if & when it ever changes. This is problematic to manage, and because of this, routers typically have statically assigned addresses.

The reason the external interface is set for a dynamic address is because this is the option your ISP is providing. You might be able to get a static IP address from your ISP, but typically static IP address mean higher monthly fees.

Most likely, you will want to use private addresses on your internal network as defined by RFC 1918:

http://www.faqs.org/rfcs/rfc1918.html

If you are unfamiliar with private addressing, read the following in Wikipedia:

http://en.wikipedia.org/wiki/Private_network
Reply With Quote