Using Networking in barrelfish
In order to use networking in Barrelfish, you will need following modules in your menu.lst:
module /x86_64/sbin/e1000n module /x86_64/sbin/NGD_mng cardname=e1000 module /x86_64/sbin/netd cardname=e1000
The device driver module
The first module is the network driver. In this example we are using e1000n as a driver. You can also use other drivers, and in that case you will have to change the cardname arguments to other modules. The reasoning behind it is that the NIC driver will export its services with this name which allows other modules to find the driver at runtime. As every NIC driver uses different name to export it's services, the modules need to know which service to lookup for.
You can pass other commandline parameters like bus, function, deviceid, device to exactly pinpoint which port and which device to use. Here is an example of module invocation with using many parameters:
module /x86_64/sbin/e1000n core=3 bus=129 function=0x0 deviceid=0x107d device=0x0
Network management module `NGD_mng`
The next module NGD_mng provides services like port management. This is more relevant when NICs with large number of queues is being used.
and the last module netd handles the background network traffic and provides services like ARP lookup. The netd service is also responsible for getting an IP address with DHCP server. In case you want to give a static IP address to the NIC interface then you can pass commandline parameters providing ip address, netmask, getway and DNS address to netd. Here is an example:
module /x86_64/sbin/netd cardname=e1000 do_dhcp=0 ip=192.168.2.11 nm=255.255.255.0 gw=192.168.2.1 dns=192.168.2.2
Making sure networking works
Once the system is up and running (system will print the IP address it received over DHCP) you should be able to ping the IP-address. If pings are working, then you have correctly configured network setup!