Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2015-01-11 12:21:52
Size: 1431
Editor: shindep
Comment:
Revision 5 as of 2015-01-11 12:57:05
Size: 2340
Editor: shindep
Comment:
Deletions are marked like this. Additions are marked like this.
Line 7: Line 7:
The webserver depends all the modules needed to get networking working (described bellow).

== Usi
ng Networking in barrelfish ==

In order
to use networking in Barrelfish, you will need following modules in your `menu.lst`:
The webserver depends all the modules needed to get [[Networking|networking]] working, and
on top of that it needs webserver module. Following is a webserver relevant part of the
`menu.lst`
Line 14: Line 12:

# For networking
Line 17: Line 17:

# For webserver
module /x86_64/sbin/webserver e1000 10.110.4.4 /local/nfs/website/barrelfish
Line 19: Line 22:
The first line starts the e1000n driver. The next module `NGD_mng` provides services like port management,
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:
The webserver takes following commandline arguments:
 .* cardname: Used to find the network services (This value is currently hardcoded to be "e1000" and hence ignored)
 .* IP address of NFS server: Used to mount the NFS location to get the files
 .* Path on NFS server: Where the files to serve on webserver are stored
Line 25: Line 27:
{{{
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
}}}
Please refer to [[Networking|networking]] page for details about modules
related to networking.
Line 29: Line 30:
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!
=Making sure webserver works=
If everything goes fine, then you should see an output where you will see
the webserver successfully downloading all the files from the given path
on NFS share.

If you don't see such an output, then look into the output log to see
what IP address barrelfish server got from DHCP (assuming you are using
dhcp setup) and try to ping that IP-address. If you don't see any IP
address reported, or if you can't ping it, then there is a network
setup issue.


=Troubleshooting webserver=

Typical problem in running webserver is problems in network setup.
Following are the few problems that can happen, and [[Networking|networking]]
may have hints about how to deal with them.
 .* Not all the modules needed for network are started. In this case the system
     just keeps waiting for one of the service to appear.
 .* Network setup does not support DHCP protocol, and hence netd will never get
     an IP address. In this case, you may want to setup the static IP address
     by passing arguments to netd (refer[[Networking|networking]])
 .* The barrelfish machine is not reachable/pingable.
 .* NFS share IP or path is wrong, or does not have open read-only access.
 

Running webserver

Barrelfish webserver runs by fetching files over NFS share and serving them to users requesting the files. Currently it assumes that all files are in a flat directory without any subdirectories.

Modules needed

The webserver depends all the modules needed to get networking working, and on top of that it needs webserver module. Following is a webserver relevant part of the menu.lst

# For networking
module /x86_64/sbin/e1000n
module /x86_64/sbin/NGD_mng cardname=e1000
module /x86_64/sbin/netd cardname=e1000

# For webserver
module  /x86_64/sbin/webserver e1000 10.110.4.4 /local/nfs/website/barrelfish

The webserver takes following commandline arguments:

  • * cardname: Used to find the network services (This value is currently hardcoded to be "e1000" and hence ignored)
  • * IP address of NFS server: Used to mount the NFS location to get the files
  • * Path on NFS server: Where the files to serve on webserver are stored

Please refer to networking page for details about modules related to networking.

=Making sure webserver works= If everything goes fine, then you should see an output where you will see the webserver successfully downloading all the files from the given path on NFS share.

If you don't see such an output, then look into the output log to see what IP address barrelfish server got from DHCP (assuming you are using dhcp setup) and try to ping that IP-address. If you don't see any IP address reported, or if you can't ping it, then there is a network setup issue.

=Troubleshooting webserver=

Typical problem in running webserver is problems in network setup. Following are the few problems that can happen, and networking may have hints about how to deal with them.

  • * Not all the modules needed for network are started. In this case the system
    • just keeps waiting for one of the service to appear.
  • * Network setup does not support DHCP protocol, and hence netd will never get
    • an IP address. In this case, you may want to setup the static IP address

      by passing arguments to netd (refernetworking)

  • * The barrelfish machine is not reachable/pingable.
  • * NFS share IP or path is wrong, or does not have open read-only access.

BarrelfishWiki: Webserver (last edited 2015-01-11 13:02:48 by shindep)