Adding a second network card (and compiling a…

2009-05-13 13:20:10来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


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
  • create a new kernel

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.
Like the website? Want to give back? Please visit my
wish list
!


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/4206/showart_523844.html

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:getting natd to run again

下一篇:connecting to the network