next up previous contents
Next: 4.2 Receiver Usage Up: 4 Module Usage Previous: 4 Module Usage   Contents

Subsections


4.1 Router Usage

The Router module is provided as a `Queueing Discipline' to be used by the QoS feature of the kernel. The module must first be loaded into the kernel, and must then be activated using the `tc' utility.


4.1.1 Module Loading and Options

The Router module is named sch_qsize, and hence can be loaded with the command: modprobe sch_qsize. However, there are options which it can be passed, including one required option. The options are:

maxrate
- (Required) The data rate of the Router's outgoing link. Due to limitations with `tc' it is not possible to specify this separately for each interface without modifications to `tc'. The units are kilobits/sec.
bval
- The value of the constant $b$ used by the Router's calculations. The default value is 10.
q_min
- The length of the queue upon which $p(q)$ becomes non-zero. This is the point where Receiver connections start reducing their window, which slows down connections. The default value is 30.
limit
- The maximum length of the queue. This is used to set a limit to the amount of memory which the queue can use, and also to prevent excessive latency, by dropping excess packets. If this argument is set to 0, then FCM will automatically use the standard queue length. This is the default.

The options listed above are passed on the modprobe command line in the form: name=value. For example, to set the value of maxrate to 10000, and bval to 10, the following command line would be given:

modprobe sch_qsize maxrate=10000 bval=10

After being loaded, the module will still not be operational until it is attached to a network interface using tc, as described in the next section.


4.1.2 tc Usage

Once the Router module has been loaded, as described in Section 4.1.1, it can be attached to network interfaces. Doing so puts it in the path of all packets which leave the interface. These packets are, if possible, modified to transmit extra information about the status of the Router to the Receivers which are reached by the appropriate network interface.

Full usage of the `tc' command is beyond the scope of this document, however for simple cases where no extra QoS modules are used, this document's examples are sufficient. If you wish to combine QoS modules, more information can be found at http://lartc.org/howto/. Otherwise, the following command attaches the Router module to the eth0 network interface, and is suitable for all but the most exotic setups:

tc qdisc add dev eth0 root handle 1: qsize

To remove it from the interface, the following command can be used:

tc qdisc del dev eth0 root handle 1: qsize

For a network interface other than eth0, (such as ppp0 for a PPP connection), replace eth0 with the interface's name in the examples above.

4.1.3 Module Unloading

It's not usually necessary to unload the Router module, as simply running tc to remove it from an interface (as described in Section 4.1.2) prevents it from being used. However, the module can be unloaded from memory entirely. This is done with the following command:

rmmod sch_qsize

However note that before the module can be unloaded, it must be removed from use using the tc command.


next up previous contents
Next: 4.2 Receiver Usage Up: 4 Module Usage Previous: 4 Module Usage   Contents