Today we can not imagine a computer without a network connection. Adding and configuring a network card is a common task for any FreeBSD administrator.
Primarily determine the type of used card (PCI or ISA), and the model maps used therein chip. FreeBSD supports many PCI and ISA cards. Refer to the list of supported hardware of your release to see if your card is supported.
Once you've made sure that the card is supported, is required to determine the correct driver. In the files
/usr/src/sys/conf/NOTES, and is a list of network interface drivers with information about the supported chipsets / cards. If you are in doubt about which driver is fit, read the manual page of the driver. Manual page has more information on supported hardware and even the problems that may arise.
If your card is widespread, you probably will not need long to find the driver. Drivers for common cards are presented in the kernel
GENERIC, so your card should be defined at startup, like this:
dc0: <82c169 PNIC 10/100BaseTX> port 0xa000-0xa0ff mem 0xd3800000-0xd38
000ff irq 15 at device 11.0 on pci0
dc0: Ethernet address: 00:a0:cc:da:da:da
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc1: <82c169 PNIC 10/100BaseTX> port 0x9800-0x98ff mem 0xd3000000-0xd30
000ff irq 11 at device 12.0 on pci0
dc1: Ethernet address: 00:a0:cc:da:da:db
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
In this example, two cards are used in the existing system driver dc (4).
If your network card driver is not
GENERICneed to download the appropriate driver to use it. This can be done one of two ways:
The simplest way - just load the NIC kernel module using kldload (8). Not all drivers are available as modules; for example, there are no modules for ISA cards.
Instead, you can enable static maps, compiling a custom kernel. For information about what settings should be included in the kernel can be obtained from
/usr/src/sys/conf/NOTES, and driver manual pages NIC. For more information on building a custom kernel, refer to Chapter 9, Configuring the FreeBSD Kernel . If the card has been detected by your kernel ( ) at boot time, the kernel does not need to collect.