Aros/使用者/網路
AROSTCP 是 AROS 基於計算機的首選 TCP/IP 協議棧。
它是 Neil Cafferkey 將 AmigaOS AmiTCP TCP/IP 子系統移植到 AROS 的成果。
自最初移植以來,它已經根據 AROS 開發人員的工作以及從它衍生的 MorphOS 埠(Pavel Fedin - SonicAmiga)的反向移植的更改進行了多次更改。
AROS 在 Prefs 目錄中有一個網路首選項。請使用它來設定網際網路/乙太網使用。
AROSTCP 位於“Extras/Networking/Stacks/”。它包含以下目錄和檔案
C/ 包含網路可執行檔案,大多與 UNIX/Linux 中的相同。
AROSTCP The AROSTCP executable. Don't run directly, use startnet/stopnet instead (see below). arp dhclient hostname ifconfig logger ping resolve route
S/ 包含啟動和停止指令碼
Package-Startup startnet stopnet
db/ 包含配置檔案,請參閱 AROSTCP 配置資料庫。
general.config group hosts inet.access inetd.conf interfaces netdb netdb-myhost netdb-myhost.example networks passwd protocols services static-routes
AROSTCP 使用一些 Env: 設定來控制其最基本的操作。
目前存在以下選項..
SYS/Packages/AROSTCP
This is an AROS package file which tells the AROS package subsystem where
AROSTCP is installed. If it is incorrect AROSTCP will fail to load.
During system boot this variable is used to set up paths and
assigns needed by an application.
AROSTCP/Config
Points to the location of AROSTCP's configuration files.
These will be used to configure the stack to a users preference.
By default the configuration is in <AROSTCP DIR>/db but it is
preferred to copy these files and customise them to suit -
see "AROSTCP Configuration Database"
AROSTCP/AutoRun
when set to true this causes the AROSTCP stack to load during boot.
by default it isn't enabled so that users may manually configure the stack
and confirm it is working before enabling boot time operation.
If you don't use the AutoRun feature you should start AROSTCP by going
to its directory and typing "execute s/startnet"
檔案:AROSTCP-Warning.jpg 目前 SetEnv 命令不會使 AROSTCP 抽屜儲存設定 - 因此您可能需要事先手動建立它們,方法是使用
>makedir ENV:AROSTCP >makedir ENVARC:AROSTCP
預設情況下,配置檔案安裝到“<AROSTCP DIR>/db” - 並且除非設定了“AROSTCP/Config”Env 變數,否則 AROSTCP 將嘗試從那裡載入它們。
但是,最好保留這些檔案,並自定義一份副本,該副本在更新 AROS/AROSTCP 時不會被覆蓋。從現在起,我們將此位置稱為 <db Dir>。
為此,請在 shell 提示符下輸入以下內容..
>cd <AROSTCP DIR>
>makedir <db Dir>
>copy db <db Dir> ALL
>SetEnv SAVE AROSTCP/Config <db Dir>
.. 用 AROSTCP 安裝到的位置替換 <AROSTCP DIR>(例如,預設情況下為“SYS:Extras/Networking/AROSTCP”),並用您選擇的個性化配置檔案的位置替換 <db Dir>(例如,"SYS:Storage/NetConfig")。
大多數現代家庭網路提供 DHCP 地址/配置以簡化使用者網際網路訪問的設定。如果您在您的網路上使用它 - 或者不確定,那麼這應該是您最有可能使用的配置選項。
對於更高階/有經驗的使用者,有一個手動 IP 配置,它簡要概述了使 AROSTCP 與自定義 IP 地址等一起工作的必要配置選項。
AROS 在 Prefs 目錄中有一個網路首選項。請使用它來設定網際網路/乙太網使用。
AROS 在 Prefs 目錄中有一個網路首選項。請使用它來設定網際網路/乙太網使用。
至少需要編輯以下檔案才能在您的網路上啟用操作。
<db Dir>/interfaces <db Dir>/static-routes <db Dir>/netdb-myhost
這些將提供必要的 資訊以使 AROSTCP 正確配置您的硬體和網路環境。
此檔案包含用於配置系統上的網路硬體的 行。每行包含以下內容
<interface name> DEV=<hardware driver> UNIT=<hardware driver unit no.> <further configuration data>
例如:
eth0 DEV=pcnet32.device UNIT=0 IP=192.168.0.10 UP
將提供一個名為“eth0”的介面,它使用 pcnet32.device(相容 PCNet32 的控制器)的單元 0,為其配置 IP 地址 192.168.0.10,並將裝置設定為立即啟用 (UP)。
目前,此檔案只提供閘道器裝置的 IP 地址(預設閘道器) - 因此請確保將其更改為適合您的網路。
您可以將網路需要的任何路由新增到此檔案。
netdb-myhost 為您的網路環境提供名稱解析詳細資訊。如果您的 IP 地址的 DNS 名稱無法從名稱伺服器解析,那麼您需要在此處指定它。
目前需要以下資料
HOST 192.168.0.10 thisarosbox.mynetwork thisarosbox
指定我們在 <db Dir>/interfaces 中配置的介面的主機名,該介面具有 IP 地址 192.168.0.10
DOMAIN mynetwork 192.168.0.
這是我們的機器所屬的網路。
NAMESERVER 192.168.0.2
NAMESERVER 選項允許我們指定 AROSTCP 將用於解析名稱(例如 www.aros.org)的 DNS 伺服器。
根據您的配置,它將設定為以下內容之一 -
- 您私有網路的 DNS 伺服器 IP
- 如果您的路由器可以轉發 DNS 請求,則為您的路由器的 IP 地址
- 您的 ISP 提供的 DNS 伺服器地址。
注意:在多行中列出多個 DNS 伺服器是完全合法的。
為了能夠在 AROS Linux 託管下使用網路,已建立了“tap.device”,它將託管機器上的 Linux 隧道裝置附加到託管 AROS 系統內部的 AROSTCP。
你需要使用 “tunctl” 命令在 Linux 下建立隧道網路裝置。你可能需要安裝它 - 它可以作為 uml-utilities 包的一部分找到。
建立裝置的命令列可能如下所示
tunctl -b -u arosuser -t aros0
這允許名為 “arosuser” 的使用者訪問一個新建立的網路裝置,名為 “aros0”。
接下來,為裝置分配 IP 地址並啟動它
ifconfig aros0 192.168.0.20 ifconfig aros0 up
tunctl 還會建立一個 Linux 檔案系統條目,例如 /dev/net/tun(有關更多資訊,請參見 tunctl 幫助),你可能需要為你的使用者設定訪問許可權,例如:
chmod 666 /dev/net/tun
這允許所有使用者進行讀寫訪問。
現在你已準備好執行 AROS。
最後,在執行 AROS 並啟動 AROSTCP 後,你可能需要設定到託管 AROS 系統的路由。使用你的 <db Dir>/interfaces 配置中的 IP 地址(例如 192.168.0.188)
route add -host 192.168.0.188 dev aros0
一般的配置與往常一樣(參見部分 基本配置 - 手動 IP)。
在適當的地方使用這些值
- <db Dir>/interfaces : “tap.device” 應作為介面裝置驅動程式使用。單元號與使用 tunctl 建立的 Linux 網路裝置的號相同。
- <db Dir>/static-routes : 要使用的預設閘道器地址是 Linux 下隧道裝置的 IP 地址。
待續...
AROSTCP 已在以下系統上成功編譯和測試-
- x86 32 位
- x86 64 位
- SAM440EP
AROS 包含許多驅動程式來支援網路硬體。網路驅動程式預設情況下安裝到 “DEVS:Networks/” 中,當前支援的驅動程式列表包括..
- etherlink3.device
- 適用於幾乎所有 3Com 網絡卡
- intelpro100.device
- 適用於基於 Intel Pro/100 控制器系列的網絡卡,包括
- 0x8086, 0x1229 - Intel i82558 10/100 PCI 乙太網控制器(未測試)
- pcnet32.device
- 適用於與 PCNet32 控制器系列相容的網絡卡,包括
- 0x1022, 0x2000 - 79c970 AMD Lance/PCI(未測試)
- 0x1022, 0x2001 - 79c978 AMD Lance/HomePNA(未測試)
- 0x1022, 0x2625 - AMD Lance/PCI PCNet/32(未測試)
- viarhine.device
- 適用於與 VIA Rhine 介面卡相容的晶片組,包括
- 0x1106, 0x6100 - VIA VT86C100A Rhine-II(未測試)
- 0x1106, 0x3043 - VIA VT3042 Rhine(未測試)
- 0x1106, 0x3065 - VIA VT6102 Rhine-II/VT6103 Tahoe 10/100M 快速乙太網介面卡(未測試)
- 0x1106, 0x3106 - VIA VT6105 Rhine-III 管理介面卡(未測試)
- 0x1106, 0x3053 - VIA VT6105M Rhine-III 管理介面卡(未測試)
- sis900.device
- SiS900/SiS7016 網絡卡驅動程式
- 0x1039, 0x8168 - SiS 900 PCI 快速乙太網(已測試 - 在 i386 上工作)
- 0x1039, 0x7016 - SiS 7016 PCI 快速乙太網(未測試)
- rtl8168.device
- Realtek 8168/8111 網絡卡系列驅動程式
- 0x10ec, 0x8168 - Realtek 8168B/8111B PCI-e 千兆乙太網(已測試 - 在 amd64 上不工作(在引導時捕獲驅動程式載入))
- 0x10ec, 0x8168 - Realtek 8168C/8111C PCI-e 千兆乙太網(已測試 - 在 i386 上工作)
- 0x10ec, 0x8168 - Realtek 8168CP/8111CP PCI-e 千兆乙太網(未測試)
- 0x10ec, 0x8168 - Realtek 8168D/8111D PCI-e 千兆乙太網(未測試)
- rtl8139.device
- Realtek 8139 網絡卡系列驅動程式
- 0x10ec, 0x8129 - RealTek RTL8129(未測試)
- 0x10ec, 0x8138 - RealTek RTL8139(未測試)
- 0x10ec, 0x8139 - RealTek RTL8139(未測試)
- 0x10ec, 0x8139 Rev:20 - RealTek RTL8139C(未測試)
- 0x1113, 0x1211 - Accton EN-1207D 快速乙太網(未測試)
- 0x1186, 0x1300 - D-Link DFE-538TX(已測試 - 在 amd64 上工作)
- 0x018a, 0x0106 - LevelOne FPC-0106Tx(未測試)
- 0x018a, 0x0106 - Compaq HNE-300(未測試)
- nforce.device
- 適用於基於 nVidias NForce 控制器系列的網絡卡,包括
- (pci _ id) - 網絡卡名稱(已測試)
- (pci _ id) - 網絡卡名稱(未測試)
- prm-rtl8029.device
- 適用於基於 Realtek RTL8029 控制器系列的網絡卡,包括
- (pci _ id) - 網絡卡名稱(已測試)
- (pci _ id) - 網絡卡名稱(未測試)
- prism2.device
- 適用於基於 Prism II 晶片組的 WLAN 介面卡
- (pci _ id) - 網絡卡名稱(已測試)
- (pci _ id) - 網絡卡名稱(未測試)
請參見此處 https://wikibook.tw/wiki/Aros/Platforms/AROS_USB_support
tap.device - pseudo-hardware driver which attaches a Linux tunneling device in AROS Linux hosted version:
emac.device - Supports NIC used in the PowerPC 4x0 series of embedded processors (SOC), like e.g. the AMCC440EP CPU used in the Samantha board.
e1000.device - Intel Gigabit NIC driver
0x8086, 0x1000 - Intel 82542 (untested)
0x8086, 0x1001 - Intel 82543GC [Fiber] (untested)
0x8086, 0x1004 - Intel 82543GC [Copper] (untested)
0x8086, 0x1008 - Intel 82544EI [Copper] (untested)
0x8086, 0x1009 - Intel 82544EI [Fiber] (untested)
0x8086, 0x100C - Intel 82544GC [Copper} (untested)
0x8086, 0x100D - Intel 82544GC [LOM] (untested)
0x8086, 0x100E - Intel 82540EM (untested)
0x8086, 0x100F - Intel 82545EM [Copper (untested)
0x8086, 0x1010 - Intel 82546EB [Copper (untested)
0x8086, 0x1011 - Intel 82545EM [Fiber] (untested)
0x8086, 0x1012 - Intel 82546EB [Fiber] (untested)
0x8086, 0x1013 - Intel 82541EI (untested)
0x8086, 0x1014 - Intel 82541ER [LOM] (untested)
0x8086, 0x1015 - Intel 82540EM [LOM] (untested)
0x8086, 0x1016 - Intel 82540EP [LOM] (untested)
0x8086, 0x1017 - Intel 82540EP (untested)
0x8086, 0x1018 - Intel 82541EI [Mobile] (untested)
0x8086, 0x1019 - Intel 82547EI (untested)
0x8086, 0x101A - Intel 82547EI [Mobile] (untested)
0x8086, 0x101D - Intel 82546EB [Quad Copper] (untested)
0x8086, 0x101E - Intel 82540EP [LP] (untested)
0x8086, 0x1026 - Intel 82545GM [Copper] (untested)
0x8086, 0x1027 - Intel 82545GM [Fiber] (untested)
0x8086, 0x1028 - Intel 82545GM [Serdes] (untested)
0x8086, 0x1075 - Intel 82547GI (untested)
0x8086, 0x1076 - Intel 82541GI (untested)
0x8086, 0x1077 - Intel 82541GI [Mobile] (untested)
0x8086, 0x1078 - Intel 82541ER (untested)
0x8086, 0x1079 - Intel 82546GB [Copper] (untested)
0x8086, 0x107A - Intel 82546GB [Fiber] (untested)
0x8086, 0x107B - Intel 82546GB [Serdes] (untested)
0x8086, 0x107C - Intel 82541GI [LF] (untested)
0x8086, 0x108A - Intel 82546GB [PCI-e] (untested)
0x8086, 0x1099 - Intel 82546GB [Quad Copper] (untested)
0x8086, 0x10B5 - Intel 82546GB [Quad Copper KSP3] (untested)
在做任何事情之前,最好檢查 AROSTCP 是否具有正確的 ENV 設定
# Check the package file ENV:SYS/Packages/AROSTCP points to the location AROSTCP is installed to. # Check that ENV:AROSTCP/ exists # Check if ENV:AROSTCP/Config is set and points to your network config. # Check if the ENV:AROSTCP/AutoRun option is set and disable to manually test.
檢查後,更改到 AROSTCP 安裝的目錄並輸入
>execute s/startnet
AROSTCP 現在應該載入,並返回你到命令提示符。
現在你可能希望使用以下命令驗證你的網絡卡是否正常工作
>ifconfig -a
它應該輸出類似於以下內容
lo0: flags=8<LOOPBACK> mtu 1536
inet 127.0.0.1 netmask 0x0
eth0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX> mtu 1500
address: 00:0c:29:37:ef:6d
inet 192.168.0.10 netmask 0xffffff00 broadcast 192.168.0.255
尋找 “UP” 標誌,它將告訴你你的介面是否正在執行,如果沒有,請檢查 inet 是否為 0.0.0.0。如果是這種情況,AROSTCP 可能無法載入你的介面的驅動程式,因此請檢查你的 interfaces 檔案是否為你的硬體正確配置。
如果您的網路介面配置了正確的 IP 地址,但狀態不是“UP”,請嘗試以下命令。
>ifconfig <the interface name .. i.e. eth0> <the inet address to use> UP
然後再次檢查您的網路介面。
如果您透過路由器連線到網際網路,其 IP 地址應儲存在 <db Dir>/static-routes 中。
我們可以透過嘗試 ping 路由器來檢查它是否正常工作。
>ping <ip address of gateway/router>
您應該會收到來自路由器的回覆,並告知您接收到的資料包(即返回的資料包)。
如果您沒有收到回覆,請檢查您的線纜連線是否正確。
下一步需要一個外部 IP 地址(即來自網際網路的 IP 地址),這裡我將使用 www.yahoo.com 的當前 IP 地址 [69.147.114.210]。
>ping 69.147.114.210
您應該會收到來自該操作的回覆,並告知您接收到的資料包,這表示成功。
如果返回“無法路由到主機”,則您可能在 db/static-routes 中存在錯誤設定,或網路介面配置錯誤,請檢查。
DNS 伺服器儲存在您的 <db Dir>/netdb-myhost 檔案中。
要測試它們是否正常工作,只需透過名稱 ping 一個外部網站…
> ping www.yahoo.com
您應該會收到回覆資料包。