作者oocat@bbs.ee.ntu.edu.tw (果粒貓), 信區: linux
標題Re: IPX Router
時間台大電機 Maxwell BBS (Thu Jan 14 18:39:39 1999)
轉信站: GIBBS!news2.ncku!ctu-gate!news.nctu!news.cis.nctu!freebsd.ntu!bbs.ee.nt
※ 引述《alger@cs.ust.hk (Hoi Ka Kit)》之銘言:
: Hi,
: Has anyone successfully set up an IPX router on Linux? Such that the
: machine behind Linux (private net 192.168.1.*) can use IPX to communicate with
: outside. I would like to play some IPX game and do not want to use kali.
: P.S. The linux machine are on the same net with others machine but
: not the case for the one behind Linux.
: Alger Hoi
我有做過 ipx route... :)
redhat 和slackware 都弄過..
example:
首先要 cd /usr/src/linux
make config 把 ipx 的協定打開.... 在重新make 核心
(重新make 核心的方法各大bbs都有的樣子)
假設我現有二段網路 140.100.1.xx
140.100.2.xx
要做ipx route
先要裝上二片網路卡..
裝上二片網路卡的方法很多bbs站精華區都有寫
我是裝了二片 pci 網路卡 linux 蠻好抓到的
(網路卡的部份 如果linux要認得 有些需要 make 核心等..)
可以用 ifconfig eth0 和 ifconfig eth1 查看linux有沒有找到二個網路卡
每片網路卡給一個 ip address
ex: A網路卡我設成 140.100.1.30
b網路卡我設成 140.100.2.50
gateway 看你要設那一個網路卡
如果 gateway 由 a 網路卡..就設 a 網路卡的那個 gateway
假設我的 gateway 是 140.100.1.254 在 a 網路卡上面設定
slackware 大至上是要改 /etc/rc.d/rc.inet1
檔案大概如下:
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
/sbin/ifconfig eth0 140.100.1.30 broadcast 140.100.1.255 netmask 255.255.255.0
/sbin/ifconfig eth1 140.100.2.50 broadcast 140.100.2.255 netmask 255.255.255.0
/sbin/route add -net 140.100.1.0 netmask 255.255.255.0
/sbin/route add -net 140.100.2.0 netmask 255.255.255.0
/sbin/route add default gw 140.100.1.254 netmask 0.0.0.0 metric 1
redhat 大至上是要改 /etc/sysconfig/network-scripts/ 目錄下的
ifcfg-eth0 這個檔案是設定第一片網路卡的
內容是:
DEVICE=eth0
IPADDR=140.100.1.20
NETMASK=255.255.255.0
NETWORK=140.100.1.0
BROADCAST=140.100.1.255
ONBOOT=yes
ifcfg-eth1 這個檔案是設定第二片網路卡的
內容是:
DEVICE=eth1
IPADDR=140.100.2.30
NETMASK=255.255.255.0
NETWORK=140.100.2.0
BROADCAST=140.100.2.255
ONBOOT=yes
gateway 則是在 /etc/sysconfig/network 這個file 設定
ok. 二片網路卡都設好後..(當然此時網路也應該是要通的 )
接下來就要去抓 ipx route 的工具程式了
slackware 系統.. 要抓 ipx.tar.gz 和 ipxripd.tar.gz
可以到 ftp://linux.sinica.edu.tw/pub2/packages/network/ncpfs/
下有這二個檔案
1. 解開 ipx.tar.gz , make all
2. 解開 ipxripd.tar.gz , make all 做出執行檔
ipx.tar.gz 會做出 ipx_configure 等程式
ipxripd.tar.gz 裡是放 ipxd 這個程式
要跑 ipx route 有很多步驟 不過我實驗的結果發現下面二個指令最快.
1. 先執行 ipx_configure --auto_interface=on --auto_primary=on
2. 再執行 ipxd
這樣就完成了
或者你可以執行 ipxd -d 進入 debug 模式
可以 cd /proc/net/
cat ipx 和 ipx_route 等檔案是否有內容...
redhat linux 因為系統灌好就有ipx_configure 等程式
只要去抓 ipxripd.tar.gz 回來 make
做出 ipxd 程式
再依上面的方法 就可以動做了.
其他可以參考 IPX-HOWTO 文件 有中文版的樣子?!
--
※ Origin: 臺大電機 Maxwell 站 ◆ From: proxy.iis.sinica.edu.tw