The FreeBSD Diary |
(TM) | Providing practical examples since 1998If you buy from Amazon USA, please support us by using this link. |
Adding a second network card (and compiling a kernel)
29 August 1998
|
My FreeBSD box will act as a gateway. It will do this using two network
cards. One card (ed0) will talk to the outside world. The other
card (ed1) will talk to my subnet.. The system needs to know about the new device. There are two steps this this.
|
Add the interface to the list
|
In /etc/rc.conf, you need to add the new device to the list of network
interfaces. You will need an entry similar to the following: network_interfaces="ed0 ed1 lo0" |
Create a new kernel
|
For instructions on how to create a new kernel, refer to Configuring the FreeBSD Kernel
section in the FreeBSD handbook. Pay
special attention to the section on Building and Installing
a Custom Kernel. Don't forget to create a device for your new NIC. In my case, I'm adding a second NE2000 card to create ed1. Here's what I made sure the kernel contained: device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000 vector edintr device ed1 at isa? port 0x300 net irq 5 iomem 0xd8000 vector edintr You will need to add a similar entry according to the type of device you are adding. Remember to set the IRQ and IOMEM settings correctly. The above settings are based on the settings on your physical network card. Many cards come with a floppy disk which allows you to set the values. Others are Plug and Play. I'm sorry, but I don't have more information on card settings. |
Testing the new interface
|
In connecting to the network, there is a section dealing with testing the new interface. I suggest you use that for the remainder of this task. |