Aros/User/Networking

AROSTCP is the TCP/IP stack of choice for AROS based computers.

It is a port of the AmigaOS AmiTCP TCP/IP subsystem to AROS by Neil Cafferkey.

Since its initial port it has undergone a number of changes based on work by AROS developers, as well as backported changes from the MorphOS port (Pavel Fedin - SonicAmiga) it spawned.

AROSTCP FilesEdit

AROS has a Network prefs located in the Prefs directory. Please use it to set up internet/ethernet use.

AROSTCP is located in 'Extras/Networking/Stacks/'. It consists of the following directories and files:

C/ contains networking executables, mostly as known from 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/ contains start and stop scripts

Package-Startup
startnet
stopnet

db/ contains configuration files, see AROSTCP Configuration Database.

general.config
group
hosts
inet.access
inetd.conf
interfaces
netdb
netdb-myhost
netdb-myhost.example
networks
passwd
protocols
services
static-routes

AROSTCP Environment VariablesEdit

AROSTCP uses a few Env: settings to control its most basic operation.

Currently the following options exist..

 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"


File:AROSTCP-Warning.jpg Presently the SetEnv command wont make the AROSTCP drawers to store the settings in - so you may need to manually create them before hand using

   >makedir ENV:AROSTCP
   >makedir ENVARC:AROSTCP

AROSTCP Configuration DatabaseEdit

Configuration Database Location(s)Edit

The Configuration files are installed to "<AROSTCP DIR>/db" by default - and unless the "AROSTCP/Config" Env variable is set, AROSTCP will attempt to load them from there.

It is preferable however to leave these files, and customize a copy which will not get overwritten when updating AROS/AROSTCP. From hereon in we will refer to this location as <db Dir>.

To do this enter the following at a shell prompt..

    >cd <AROSTCP DIR>
    >makedir <db Dir>
    >copy db <db Dir> ALL
    >SetEnv SAVE AROSTCP/Config <db Dir>

.. substituting <AROSTCP DIR> with the location AROSTCP is installed to (for instance "SYS:Extras/Networking/AROSTCP" by default), and <db Dir> with a location of your choice for your personalised config files (i.e. "SYS:Storage/NetConfig").

Customising the Configuration DatabaseEdit

Most modern home networks provide DHCP addressing/configuration to ease setup of internet access for users. If you use this on your network - or arent sure then this is the configuration option you should most likely use.

For more advanced/experienced users there is manual ip configuration for a brief summary of configuration options required to get AROSTCP working with custom IP address etc.

Basic Configuration - DHCPEdit

AROS has a Network prefs located in the Prefs directory. Please use it to set up internet/ethernet use.


Basic Configuration - Manual IPEdit

AROS has a Network prefs located in the Prefs directory. Please use it to set up internet/ethernet use.


At a bare minimum the following files will need to be edited to enable operation on your network.

 <db Dir>/interfaces
 <db Dir>/static-routes
 <db Dir>/netdb-myhost

These will provide the necessary information to allow AROSTCP to correctly configure your hardware and network environment.

<db Dir>/interfacesEdit

This file contains lines to configure the network hardware on your system. each line consists of the following:

 <interface name> DEV=<hardware driver> UNIT=<hardware driver unit no.> <further configuration data>

i.e.

 eth0 DEV=pcnet32.device UNIT=0 IP=192.168.0.10 UP

Would provide an interface named "eth0" which uses unit 0 of pcnet32.device (PCNet32 compatible controllers), configures it for the IP address 192.168.0.10, and sets the device to go active (UP) immediately.

<db Dir>/static-routesEdit

At the moment this file only provides the IP address of your gateway device (DEFAULT GATEWAY) - so make sure and change it to suit your network.

You can add any routes your network needs to this file.

<db Dir>/netdb-myhostEdit

netdb-myhost provides name resolution details for your network environment. If your IP address' DNS name cannot be resolved from the nameservers, then you will need to specify it in here.

presently the following data is needed:

 HOST 192.168.0.10 thisarosbox.mynetwork thisarosbox

specifies the hostname for the interface we configured in <db Dir>/interfaces which has the IP address 192.168.0.10

 DOMAIN mynetwork 192.168.0.

This is the network our machine belongs to.

 NAMESERVER 192.168.0.2

The NAMESERVER option lets us specify DNS servers which AROSTCP will use to resolve names (such as www.aros.org)

depending on your configuration this will be set to one of the following -:

  1. Your private network's DNS servers IP
  2. Your routers IP address if it can forward DNS requests
  3. DNS server address's provided by your ISP.

N.B: It is perfectly legal to list more than one NAMESERVER line for multiple DNS servers.

Basic Configuration - Linux hosted: tap.deviceEdit

To be able to use networking under AROS Linux hosted, a "tap.device" has been created, which attaches a Linux tunneling device on the hosting machine to AROSTCP inside the hosted AROS system.

Linux Tap/Tun ConfigurationEdit

You need 'tunctl' to create a tunneling network device under Linux. You might need to install it - it can be found e.g. as part of the uml-utilities package.

A command line to create the device might look like this:

 tunctl -b -u arosuser -t aros0

This allows a user called 'arosuser' access to a newly created network device called 'aros0'.

Next, assign an IP address to the device, and bring it up:

 ifconfig aros0 192.168.0.20
 ifconfig aros0 up

tunctl also creates a linux filesystem entry, e.g. /dev/net/tun (see tunctl help for more), you might need to set access privileges for your user, e.g.:

 chmod 666 /dev/net/tun

This allows read and write access for all users.

Now you're ready to run AROS.

Finally, after running AROS and starting AROSTCP, you might need to set a route to the hosted AROS system. Use the IP address from your <db Dir>/interfaces configuration (e.g. 192.168.0.188):

 route add -host 192.168.0.188 dev aros0
AROSTCP Configuration for tap.deviceEdit

The general configuration is done as usual (see section Basic Configuration - Manual IP).

Use these values where appropriate:

  • <db Dir>/interfaces : "tap.device" should be used as the interface device driver. The unit number is the same as the Linux network device's number that was created with tunctl.
  • <db Dir>/static-routes : The DEFAULT GATEWAY Address to be used is the IP address of the tunneling device under Linux.

Advanced ConfigurationEdit

To be written ..

AROSTCP Supported PlatformsEdit

AROSTCP has been successfully compiled and tested on the following systems-:

  • x86 32bit
  • x86 64bit
  • SAM440EP

AROSTCP Supported HardwareEdit

AROS contains a number of drivers to support network hardware. Networking drivers are installed to "DEVS:Networks/" by default, and currently the list of supported drivers include..

PCI NIC DriversEdit

etherlink3.device
For almost all 3Com NICs
intelpro100.device
For NICs based on the Intel Pro/100 family of controllers including:
0x8086, 0x1229 - Intel i82558 10/100 PCI Ethernet Controller (untested)
pcnet32.device
For NICs compatable with the PCNet32 family of controllers including:
0x1022, 0x2000 - 79c970 AMD Lance/PCI (untested)
0x1022, 0x2001 - 79c978 AMD Lance/HomePNA (untested)
0x1022, 0x2625 - AMD Lance/PCI PCNet/32 (untested)
viarhine.device
For Chipsets compatable with VIA Rhine Adaptors including:
0x1106, 0x6100 - VIA VT86C100A Rhine-II (untested)
0x1106, 0x3043 - VIA VT3042 Rhine (untested)
0x1106, 0x3065 - VIA VT6102 Rhine-II/VT6103 Tahoe 10/100M Fast Ethernet Adapter (untested)
0x1106, 0x3106 - VIA VT6105 Rhine-III Management Adapter (untested)
0x1106, 0x3053 - VIA VT6105M Rhine-III Management Adapter (untested)
sis900.device
SiS900/SiS7016 NIC Driver
0x1039, 0x8168 - SiS 900 PCI Fast Ethernet (tested - working on i386)
0x1039, 0x7016 - SiS 7016 PCI Fast Ethernet (untested)
rtl8168.device
Realtek 8168/8111 NIC family driver
0x10ec, 0x8168 - Realtek 8168B/8111B PCI-e Gigabit Ethernet (tested - not working on amd64 (trapping at driver load when booting))
0x10ec, 0x8168 - Realtek 8168C/8111C PCI-e Gigabit Ethernet (tested - working on i386)
0x10ec, 0x8168 - Realtek 8168CP/8111CP PCI-e Gigabit Ethernet (untested)
0x10ec, 0x8168 - Realtek 8168D/8111D PCI-e Gigabit Ethernet (untested)
rtl8139.device
Realtek 8139 NIC family driver
0x10ec, 0x8129 - RealTek RTL8129 (untested)
0x10ec, 0x8138 - RealTek RTL8139 (untested)
0x10ec, 0x8139 - RealTek RTL8139 (untested)
0x10ec, 0x8139 Rev:20 - RealTek RTL8139C (untested)
0x1113, 0x1211 - Accton EN-1207D Fast Ethernet (untested)
0x1186, 0x1300 - D-Link DFE-538TX (tested - working on amd64)
0x018a, 0x0106 - LevelOne FPC-0106Tx (untested)
0x018a, 0x0106 - Compaq HNE-300 (untested)
nforce.device
For NICs based on the nVidias NForce family of controllers including:
(pci _ id) - Card Name (tested)
(pci _ id) - Card Name (untested)
prm-rtl8029.device
For NICs based on the Realtek RTL8029 family of controllers including:
(pci _ id) - Card Name (tested)
(pci _ id) - Card Name (untested)
prism2.device
For WLAN Adaptors based on the Prism II chipset:
(pci _ id) - Card Name (tested)
(pci _ id) - Card Name (untested)

USB Nic DriversEdit

See here http://en.wikibooks.org/wiki/Aros/Platforms/AROS_USB_support

Custom DriversEdit

Hosted NIC DriversEdit

   tap.device          - pseudo-hardware driver which attaches a Linux tunneling device
                         in AROS Linux hosted version:

SAM440EPEdit

   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.

Drivers in DevelopmentEdit

PCI NicsEdit

   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)

EfikaEdit

Network TroubleshootingEdit

Configuration and Basic connectivity issuesEdit

Check your environmentEdit

Before doing anything, its best to check AROSTCP has the correct ENV settings

 # 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.

After checking, change to the directory AROSTCP is installed to and type

 >execute s/startnet

AROSTCP should now load, and return you to the command prompt.

Check your InterfacesEdit

Now you may wish to verify your network card is operational using

 >ifconfig -a

which should output something similar to the following

 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

Look for the "UP" flag which will tell you if your interface is running, and if not check if inet = 0.0.0.0. If this is the case AROSTCP likely couldn't load the driver for your interface so check your interfaces file is configured correctly for your hardware.

If there is a correct inet address but the interface isn't "UP" - try the following command.

 >ifconfig <the interface name .. i.e. eth0> <the inet address to use> UP

Then check your interfaces again.

Check your GatewayEdit

If your connected to the internet via a router its IP address should be stored in <db Dir>/static-routes.

We can check if its working by trying to ping it

 >ping <ip address of gateway/router>

Which should respond and inform us of received packets (ones sent back)

If you do not get packets back then check your cabling is correct.

The next step requires an external IP address (i.e. one from an internet based site) here I will use www.yahoo.com's current IP [69.147.114.210]

 >ping 69.147.114.210

Again, you should get packets received from this operation signaling success.

If it returns "no route to host", you may have an incorrect setting in db/static-routes or an incorrectly configured interface - so please check.

Check Name resolutionEdit

DNS server s are stored in your <db Dir>/netdb-myhost file

To test they are working simply ping an external site by name ..

 > ping www.yahoo.com

And you should get returned packets.

Last modified on 15 June 2012, at 12:36