PPP - Pedantic PPP Primer : FreeBSD System Configuration : Verifying the Ethernet Interface Configuration : Configuring your Ethernet Interface
Previous: Verifying the Ethernet Interface Configuration
Next: Enabling Packet Forwarding

3.2.1. Configuring your Ethernet Interface

*** 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 settings for the network interfaces when the system boots is in /etc/sysconfig. Use the default text editor ('ee') to edit this file.

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

# ee /etc/sysconfig

About 100 lines from the top of /etc/sysconfig is the section that describes which network interfaces should be activated when the system boots. In the default configuration file the specific line that controls this is:

network_interfaces="lo0"

You'll need to amend this line to tell FreeBSD that you want to add another device, namely the 'ed0' device. Change this line to read:

network_interfaces="lo0 ed0"

(Note the space between the definition for the loopback device ("lo0") and the Ethernet device ("ed0")!

*** Reminder: If your Ethernet card isn't named 'ed0', specify the correct device name here instead.

If you performed the installation of FreeBSD over a network connection then the 'network_interfaces=' line may already include a reference to your Ethernet adapter. If it is, verify that it is the correct device name.

Specify the Interface Settings for the Ethernet device ('ed0'):

Beneath the line that specifies which interfaces should be activated are the lines that specify the actual settings for each interface. In the default /etc/sysconfig file is a single line that says:

ifconfig_lo0="inet localhost"

You'll need to add another line after that to specify the settings for your 'ed0' device.

If you performed the installation of FreeBSD over a network connection then there may already be an 'ifconfig_ed0=' line after the loopback definition. If so, verify that it has the correct values.

For our sample configuration we'll insert a line immediately after the loopback device definition that says:

ifconfig_ed0="inet 192.168.1.1 netmask 255.255.255.0"

When you've finished editing /etc/sysconfig to specify and configure the network interfaces the section should look really close to:

---
network_interfaces="lo0 ed0"
ifconfig_lo0="inet localhost"
ifconfig_ed0="inet 192.168.1.1 netmask 0xffffff00"
---

Once all of the necessary changes to /etc/sysconfig have been made, press the 'Esc' key to invoke the control menu. Select "leave editor" and be sure to select "save changes" when prompted.


PPP - Pedantic PPP Primer : FreeBSD System Configuration : Verifying the Ethernet Interface Configuration : Configuring your Ethernet Interface
Previous: Verifying the Ethernet Interface Configuration
Next: Enabling Packet Forwarding