You need to edit the following files in /etc:
myname
This is the name of your machine. If you are setting up a
machine as "foo.friendly.com", then you would insert "foo" here.
Alternatively, you can edit /etc/rc.conf and add the line:
hostname="mybox"
mygate
This is the address of your default router. If you have a
firewall at home, put its IP address here.
Alternatively, you can edit /etc/rc.conf and add the line:
defaultroute="192.168.1.1"
hosts
This is the table of hosts. It is often used for local network
information. It only needs to have localhost defined,
but you can be as liberal with the entries as you desire. My
setup looks like:
# RFC 1918 specifies that these networks are "internal".
# 10.0.0.0 10.255.255.255
# 172.16.0.0 172.31.255.255
# 192.168.0.0 192.168.255.255
127.0.0.1 localhost localhost.warthog.com
192.168.12.1 titan tapehost www
192.168.12.100 voyager
192.168.12.101 pioneer
192.168.12.110 dasher console loghost
resolv.conf
DNS "resolver configuration file". This file dictates the rules
of your system DNS binding. A simple setup for me is:
lookup file bind
nameserver 192.168.12.110
nameserver 206.132.88.1
domain warthog.com
search warthog.com
Where 192.168.12.110 is my own nameserver and
206.132.88.1 is a nameserver out on the internet. An
easy way to check to find out what your provider's DNS server's
numeric IP address is, try (from any already-setup *nix machine)
"nslookup -type=soa ns.myisp.com".
For information on the other lines, see "man resolv.conf"
ifconfig.* (hostname.* for 1.2 and older)
This needs to be set up if you have an ethernet card in your
system. My i386 machine has an NE2000-compatable ethernet card,
so the file I have is /etc/ifconfig.ne0. If you have a
hard time figuring out which one is yours, "dmesg" may
be able to help, just look for "address" with some hex-typed
numbers in pairs separated with `:'. An example is:
ne0 at isa0 port 0x340-0x35f irq 10
ne0: NE2000 Ethernet
ne0: Ethernet address 00:80:48:85:29:5e
Therefore, I have a file called "hostname.ne0" to match the
device-type of my ethernet card, and it contains:
"inet dasher netmask 0xffffff00"
/etc/rc.d/network has a block that describes the proper syntax
for /etc/ifconfig.* files. In a nutshell, it is "addr_family
hostname netmask netmask broadcast_addr
options" with netmask being in hex (0xffffff00 is 255.255.255.0).