雁行 strat Linux 撰寫於文章 <3YSaCg$Ijn@bbs.mis.cycu.edu.tw>...
>【 在 netman2000. 的大作中提到: 】
>: paul-wang 撰寫於文章 <84f3f9$l4o$1@news.seed.net.tw>...
>: >請教各位高手,我在Slackware4.0安裝2片網路卡,
>: >Boot 時已可抓到,但是我要如何分別給這2片網路卡,
>: >設定IP,因為執行netconfig時,無法指定 eth0 or eth1.
>: 您可以用手工設定﹕
>: ifconfig eth0 <ip_for_eht0> netmask <mask_for_eth0>
>: ifconfig eth1 <ip_for_eht1> netmask <mask_for_eth1>
>: route add -net <net_id_for_eth0> gw <gw_for_eth0> netmask <mask_for_eth0>
>: dev eth0
>: route add -net <net_id_for_eth1> gw <gw_for_eth1> netmask <mask_for_eth1>
>: dev eth1
>
>
>                  請問這 手工設定 是到那一個檔案呢???


可以放在 /etc/rc.d/rc.inet2 修改。下面的例子是以前的朋友登出來的﹕

*************

paul-wang 撰寫於文章 <84hucj$9f2$1@news.seed.net.tw>...
>我在Slackware4.0上是用下列方式安裝成功的.
>其中步驟3是網友Song教的.
>
>SLACKWARE 上裝 2 張網路卡及 2 個 IP
>/etc/conf.modules
>               :
>alias eth0 ne                         <-- add
>alias eth1 ne                         <-- add
>options ne io=0x300,0x280  <-- add
>
>/etc/rc.d/rc.modules
>                      :
>                      :
># NE2000/NE1000 support (non PCI):
>#/sbin/modprobe ne io=0x300 # NE2000 at 0x300
>#/sbin/modprobe ne io=0x280 # NE2000 at 0x280
>#/sbin/modprobe ne io=0x320 # NE2000 at 0x320
>/sbin/modprobe eth0   <---  add
>/sbin/modprobe eth1   <---  add
>
>
>/etc/rc.d/rc.inet1
>                       :
>                       :
># Edit for your setup.
>IPADDR="210.68.74.98"   # REPLACE with YOUR IP address!
>NETMASK="255.255.255.0" # REPLACE with YOUR netmask!
>NETWORK="210.68.74.0"   # REPLACE with YOUR network address!
>BROADCAST="210.68.74.255"       # REPLACE with YOUR broadcast address, if
>you
>                        # have one. If not, leave blank and edit below.
>GATEWAY="210.68.74.254" # REPLACE with YOUR gateway address!
>###########################################################################
#
>##
>IPADDR1="192.168.1.1"                <---  add
>NETMASK1="255.255.255.0"         <--- add
>NETWORK1="192.168.1.0"            <--- add
>BROADCAST1="192.168.1.254"     <--- add
>###########################################################################
#
>##
># Uncomment the line below to configure your ethernet card.
>/sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}
>/sbin/ifconfig eth1 ${IPADDR1} broadcast ${BROADCAST1} netmask ${NETMASK1}
><---
>
>
>參考資料
>/usr/doc/Linux-HOWTOs/Ethernet-HOWTO
>3.2.  Using More than one Ethernet Card per Machine

如果您用 RedHat﹐可以到 http://go.to/study-area 之“學習 Linux”看例子。