Netnice / The OS Approach in Network QoS

Netnice version 2

[Japanese| English]

Aug 8, 2003   Moved to the new project homepage

Dec 31,2002   A snapshot with a traffic control module for the Apache HTTP Server (prototype) is released

Dec 10,2002   The Alpha version for FreeBSD4.7 is relased. (Now, it comes with sh and inetd!!)

Nov 21,2002   The latest SNAP for FreeBSD4.7 is relased.

Aug 07,2002   The homepage is renewed.

What is it?

Netnice is a network control primitive on end-hosts. In version 2, it enables various traffic control and provides system protection through virtualization of network interfaces.

With Netnice, users can control network I/O of process activities, by attaching virtual network interfaces to them. The virtual network interfaces can be hierarchically structured, and attachable to sockets and process groups, as well as to process network I/O. This model provides flexible control granularity.

The virtual network interface has various parameters, such as bandwidth, queuing control mode, weight and priority. Users can choose scheduling discipline for each of the interfaces, such as packet shaping, fair queuing, priority queueing, etc. This flexibility realises various traffic controls in a single consistent scheme.

The attached virtual network interface will be inherited to the child processes, and thus, the network resource would be protected from excess use.

There have been several network control mechanisms on end-hosts. However, they are mostly unflexible and lack resource protection model. Hence, they are unqualified as an OS service. Netnice possesses desirable properties as an OS core service, and can be implemented on various operating systems.

Netnice version 2 package comes with various traffic control applications, utilizing virtual network interface mechanism.


mod_netnice is a traffic control module for the world most used web server, the Apache HTTP Server. This realizes traffic control for web sites, with simple configuration.


As indicated, configuration of mod_netnice module is done simply by specifing parameters for RootVIF, HostVIF, and DirectoryVIF. Note that, each VIF works as a packet shaper, thereby enforcing bandwidth limit, as well as a fair queueing link, contributing toward better resource utilization. This feature, utilization of virtualized network interface, makes the module innovative solution for the web traffic management.


  • mod_netnice README (txt)


sh (1)

netnice-enhanced sh realizes easy traffic control for network applications.


$ ftp @128K



netnice (8)

netnice is a command for network traffic control, through the VIF system.

With this command, users can easily isolates processes, for example, processes that are consuming bandwidth for huge file transfer.

The figure shows that a process consuming bandwidth (on the left) is wrapped with a new VIF by the command for partitioning of the traffic.


root# netnice -c -i fxp0 32Kbps $$
fxp0:       32 Kbps
root# netnice
fxp0:       32 Kbps
fxp1:      128 Kbps
ti0:       128 Kbps
lo0:       128 Kbps
ppp0:      128 Kbps
sl0:       128 Kbps
faith0:    128 Kbps
L.1 A 32Kbps VIF is created (-c option) and inserted into the network I/O for a real network interface (fxp0) of the current shell process.
L.3 Returns the list of the VIFs for each network interface on the system, connected to the current shell process.



inetd (8)

netnice-enhanced inetd realizes easy traffic control for various network daemons.


%cat /etc/inetd.conf
ftp     stream  tcp     /usr/local/libexec/ftpd ftpd -l @128K/sec
telnet  stream  tcp     /usr/libexec/telnetd    telnetd @32K/sec
shell   stream  tcp     /usr/libexec/rshd       rshd




netniced (8)

netniced is a QoS manager for cluster traffic control.

The daemon monitors processes on the system, and controls the network I/O of them, based on a configured policy, cooperating with peer daemons on the same network segment.

The traffic control policy is described in an original object oriented event-handler language, similar to Java. A powerful class library for cluster traffic control is also attached for consice description of the control behavior.




  • Version 2.05   (For FreeBSD 4.7, SNAP-12-31-2002 [tgz]
  • Version 2.04   (For FreeBSD 4.7, Alpha Release) [tgz]

Change Log

  • 2.05   (Dec 31, 2002)   SNAP with mod_netnice.c
  • 2.04   (Dec 10, 2002)   Alpha Release
  • 2.03   (Dec 05, 2002)   SNAP version with netnice applications.
  • 2.02   (Nov 21, 2002)   SNAP version with a stable kernel patch.




Copyright 2001-2002 all rights reserved.