BBS水木清华站∶精华区

发信人: Hawk.bbs@Hawk.pine.ncu.edu.tw (孤鹰), 看板: Linux 
标  题: 关於接两张网路卡的设定 
发信站: 牧野鹰扬BBS站 (Wed Sep 18 03:28:51 1996) 
转信站: JoeLu!netnews.ntu!linux2.tpml!UUserv.Net!news.cs.nthu!news.csie.nctu!a 
 
 
lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0 
          UP BROADCAST LOOPBACK RUNNING  MTU:7900  Metric:1 
          RX packets:24 errors:0 dropped:0 overruns:0 
          TX packets:24 errors:0 dropped:0 overruns:0 
 
eth0      Link encap:10Mbps Ethernet  HWaddr 00:20:18:2C:1B:13 
          inet addr:140.115.210.79  Bcast:140.115.255.255  Mask:255.255.0.0 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:15355 errors:0 dropped:0 overruns:0 
          TX packets:1056 errors:0 dropped:0 overruns:0 
          Interrupt:11 Base address:0xe400 
 
eth1      Link encap:10Mbps Ethernet  HWaddr 00:00:01:12:53:48 
          inet addr:140.115.213.11  Bcast:140.115.255.255  Mask:255.255.0.0 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
          RX packets:0 errors:0 dropped:3 overruns:0 
          TX packets:0 errors:0 dropped:0 overruns:0 
          Interrupt:10 Base address:0x300 
 
============================================================================== 
 
     已经抓到两张卡了,可是却ping不到eth1,应该是routing table的问题吧! 
 
Kernel routing table 
Destination     Gateway         Genmask         Flags Metric Ref Use    Iface 
140.115.0.0     0.0.0.0         255.255.0.0     U     0      0     1761 eth0 
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0       13 lo 
0.0.0.0         140.115.1.254   0.0.0.0         UG    1      0      102 eth0 
 
============================================================================= 
 
     请问该如何在/etc/rc.d/rc.inet1做设定让第二张卡可以work呢? 
 
 
 
 
 
 -------------------------------------------------------------------------- < 
 
发信人: yaser.bbs@bbs.ee.ncu.edu.tw (yaser), 看板: Linux 
标  题: Re: 关於接两张网路卡的设定 
发信站: 中央大学松涛风情资讯站 (Wed Sep 18 20:06:25 1996) 
转信站: JoeLu!netnews.ntu!spring!News.csie.ncu!Evergreen 
 
 
 
   关於这个问题,我们实验室已经把成果报告写在网路上了 
 
   请看 http://dslab.csie.ncu.edu.tw/~colin/router.html 
 
 
 
 
 -------------------------------------------------------------------------- < 
 
发信人: chinian@mail.wownet.net (Chinian Wang), 看板: Linux 
标  题: Re: 关於接两张网路卡的设定 
发信站: WOWNET Network Service Co. (Wed Sep 18 21:04:39 1996) 
转信站: JoeLu!netnews.ntu!spring!news.wow.net.tw!news 
 
Hawk.bbs@Hawk.pine.ncu.edu.tw (孤鹰) wrote: 
 
 
 eth1      Link encap:10Mbps Ethernet  HWaddr 00:00:01:12:53:48 
           inet addr:140.115.213.11  Bcast:140.115.255.255  Mask:255.255.0.0 
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 
           RX packets:0 errors:0 dropped:3 overruns:0 
           TX packets:0 errors:0 dropped:0 overruns:0 
           Interrupt:10 Base address:0x300 
 
 Kernel routing table 
 Destination     Gateway         Genmask         Flags Metric Ref Use    Iface 
 140.115.0.0     0.0.0.0         255.255.0.0     U     0      0     1761 eth0 
 127.0.0.0       0.0.0.0         255.0.0.0       U     0      0       13 lo 
 0.0.0.0         140.115.1.254   0.0.0.0         UG    1      0      102 eth0 
 
     请问该如何在/etc/rc.d/rc.inet1做设定让第二张卡可以work呢? 
 
 
加个 route add -net 140.115.213.0 dev eth1 
 
您是要拿这部 Linux 当 router 吗? 
 
 
 
 
 -------------------------------------------------------------------------- < 
 
发信人: Wilson Peng - 彭武兴 <wilson@plan.nec.com.tw>, 看板: Linux 
标  题: Re: 关於接两张网路卡的设定 
发信站: NEC Taiwan Ltd. (Fri Sep 20 13:08:16 1996) 
转信站: JoeLu!netnews.ntu!spring!voyager.iii.org.tw!news 
 
 > : 可是您这两块卡的 network 好像不一样? 
 >       我是想说两张网路卡 两个ip 
 >       一张负责BBS and WWW 
 >       一张负责 FTP 
 >       请各位大大指点指点吧!  感激不尽罗! 
 >       Thanks! 
 
在 Kernel 中要加入 IP router 的功能 
再设定 /etc/rc.d/rc.inet1 
加入另一个 IP 的绕路方法 
 
 -------------------------------------------------------------------------- < 
 
发信人: cwhuang.bbs@physbbs.iams.sinica.edu.tw (阿伟), 看板: Linux 
标  题: Re: 关於接两张网路卡的设定 
发信站: 中国物理学会交互作用站 (Sat Sep 21 22:56:48 1996) 
转信站: JoeLu!netnews.ntu!spring!news.cc.nctu!news.sinica!Interaction 
 
==> Hawk.bbs@Hawk.pine.ncu.edu.tw (孤鹰) 提到: 
 : 可是您这两块卡的 network 好像不一样? 
       我是想说两张网路卡 两个ip 
       一张负责BBS and WWW 
       一张负责 FTP 
       请各位大大指点指点吧!  感激不尽罗! 
 
/sbin/ifconfig eth1 (your 2nd ip) netmask (your natmask) broadcast ... 
/sbin/route add -host (your 2nd ip) dev eth1 
 
这样就能让你的第二块网路卡工作了,而且分别在不同的 ip..... 
 
在 WWW 的设定上只要你的 httpd 支援 virtual host 
就没有问题,你只要令其只监听其中一个 ip 就好了! 
(NCSA or Apache 都有这样功能.......) 
 
FTP 理论上也可以做 virtual host, 不过我没试过, 
你自行 try try 吧......:) 
 
 

BBS水木清华站∶精华区