Jump to content

Networking for dummies

From KolibriOS wiki

KolibriOS implements a TCP and IPv4 layer and includes drivers for common Ethernet adapters. It is therefore possible to connect to the internet, but only via a wired Ethernet connection. No wireless network adapters (such as Wi-Fi) are supported, due to a lack of drivers.

KolibriOS does not support point-to-point authentication protocols with an Internet service provider, such as PPP, for example. Consequently, access is only possible from a local area network (LAN), on which a router acts as the default gateway to the Internet. Nowadays, this is the standard configuration offered by Internet service providers.


On KolibriOS, three applications work together to enable IP network access:

  • Netcfg detects the hardware and loads the appropriate driver for the Ethernet adapter installed on the machine;
  • Netstat allows the user to manually configure standard IP settings specific to the subnet to which the machine is connected; its user interface also displays simple traffic statistics;
  • ZeroConf automates this configuration of IP settings by querying the DHCP server likely to be active on the local network; ZeroConfig then retrieves a local IP address allocated to the machine and the other required settings (subnet mask, gateway address, DNS address).

When the computer starts up, Netcfg and ZeroConf are automatically launched by the /sys/config/autorun.dat file to perform these tasks without user intervention.

/SYS/NETWORK/NETCFG     A    0	# Init network driver
/SYS/NETWORK/@ZEROCONF  ""   0	# Network configuration


Netcfg

Netcfg is the name of the application which is responsible for loading the network drivers that are compatible with your system. Please bear in mind that only a few common wired Ethernet adapters are currently supported. The application has a main window that appears when it is opened, displaying a list of the Ethernet adapters detected on the computer, along with their corresponding drivers, where applicable.



It is possible to load the network driver for a given network adapter by selecting the desired adapter and pressing the start device button that will appear in the upper left corner of the program. In normal circumstances however, applicable drivers will already be loaded, because as said, netcfg is executed silently at booting time.

In /sys/config/autorun.dat (to be opened with a text editor), the application is tagged with 'A':

/SYS/NETWORK/NETCFG     A    0	# Init network driver

The 'A' option causes netcfg to load all drivers and then exit immediately.


Netstat

Netstat gives an overview of the active network devices, and the various protocols running for them.




The screenshot was taken whilst booting KolibriOS in VirtualBox: it shows the standard IP settings returned by the virtual machine’s DHCP server.


ZeroConf

Zeroconf is the application in charge of getting the IPv4 settings from the DHCP server on each network interface. As mentioned earlier, it is automatically launched at startup by autorun.dat If no DHCP answer is received from the local network, zeroconf applies a default link-local IPv4 address. This address is not routable to the outside world, and therefore access to the Internet is not possible.


The user must therefore manually configure the IP settings, which can be done either:

  • using the Netstat application;
  • or by editing the configuration file /sys/config/network.ini directly.


For these manual changes to take effect, ZeroConf must then be restarted, or wait until the next time the computer is restarted.