Chapter 2 FreeBSD System Configuration

Table of Contents
2.1 Verifying the FreeBSD Host Name
2.2 Verifying the Ethernet Interface Configuration
2.3 Enabling Packet Forwarding
2.4 Creating the List of other LAN Hosts(/etc/hosts)
2.5 Testing the FreeBSD system

There are three basic pieces of information that must be known to the FreeBSD box before you can proceed with integrating the sample Local Area Network:

If you performed the installation of FreeBSD over a network connection some of this information may already be configured into your FreeBSD system.

Even if you believe that the FreeBSD system was properly configured when it was installed you should at least verify each of these bits of information to prevent trouble in subsequent steps.

2.1 Verifying the FreeBSD Host Name

It is possible that the FreeBSD host name was specified and saved when the system was initially installed. To verify that it was, enter the following command at a prompt:

    # hostname

The name of the host FreeBSD system will be displayed on a single line. If the name looks correct (this is very subjective :-) skip ahead to Section 2.2.

For example, in our sample network, we would see '' as a result of the `hostname` command if the name had been set correctly during, or after, installation. (At this point, do not worry too much about the ".my.domain" part, we will sort this out later. The important part is the name up to the first dot.)

If a host name was not specified when FreeBSD was installed you will probably see '` as a response. You will need to edit /etc/rc.conf to set the name of the machine.

2.1.1 Configuring the FreeBSD Host Name

Reminder: You must be logged in as 'root' to edit the system configuration files!

CAUTION: If you mangle the system configuration files, chances are your system WILL NOT BOOT correctly! Be careful!

The configuration file that specifies the FreeBSD system's host name when the system boots is in /etc/rc.conf. Use the default text editor ('ee') to edit this file.

Logged in as user 'root' load /etc/rc.conf into the editor with the following command:

    # ee /etc/rc.conf

Using the arrow keys, scroll down until you find the line that specifies the host name of the FreeBSD system. By default, this section says:

    ### Basic network options: ###
    hostname="" # Set this!
Change this section to say (in our example):
    ### Basic network options: ###
    hostname=""  # Set this!

Once the change to the host name has been made, press the 'Esc' key to access the command menu. Select "leave editor" and make sure to specify "save changes" when prompted.

This, and other documents, can be downloaded from

For questions about FreeBSD, read the documentation before contacting <>.
For questions about this documentation, e-mail <>.