Example Network Configurations
In its most basic configuration, sugar is installed on a single computer attached to a satellite or cable modem. It can manage the bandwidth for that single computer.
sugar is controlled and monitored using a web browser (Firefox, Internet Explorer, Konqueror, or other) on the host computer. However, it may also be monitored and controlled from a remote computer on the internet.
sugar will work with DHCP, the default on almost all cable or satellite modems, or it can be configured to work with a fixed IP address.
Multi-port Satellite or Cable Modem
Some modems offer multiple network ports, so that more than one computer can be connected at once. sugar will work in this configuration, as long as each connected computer runs a copy of sugar. The multiple copies of sugar will cooperate with one another to provide an overall, combined bandwidth limit. The system will automatically adjust itself as computers are turned on and off.
However, the above configuration has a serious and significant limitation. In order to throttle bandwidth properly, sugar must remember how much bandwidth has already been used. Suppose only one computer is switched on, then it is turned off, and then the second computer is powered up. The copy of sugar in the second computer has no way of “knowing” how much bandwidth the first computer used. Therefore, this configuration only works with some modems (such as Hughes) which contain the current download allowance. It will work with other modems but only if it makes some severe, worst-case assumptions about data rates which might have been used without leaving a record.
The Host Computer as a Gateway and Router
sugar can allow the host computer to operate as a gateway and router. This requires a second network (ethernet) port on the host. It can operate as a DHCP server, or it can be used with fixed IP addresses. There is no software limit to the number of computers which can be connected to the host; the limit is dependent on the hardware capacity (because all of the traffic passes through the host), the number of ports on the hub, and the bandwidth available from the modem and ISP.
Connections to other computers can also be made through a wireless access point or wireless router. If a wireless router is used, it may be difficult for sugar to know the identity of each connected device, which interferes with quotas and other user-by-user controls, because the router doesn't pass the MAC address upstream. This may or may not be important, depending on the application. However, most wireless routers allow disabling their DHCP functionality, and can be used as simple access points; this is just a little trickier to configure, and depends on the wireless router.
Both wired and wireless computers can also be used together in the same network. One (or more) wireless access points or routers can be connected parallel to the wired machines.
Embedded Within Internet Appliance
With its minimal reliance on specialized operating system functions, sugar was designed (in the current second phase) to be embedded within internet appliances such as routers and modems. This example shows its use inside a hypothetical wireless router.
The internet usage for all of the wireless computers in the above installation will be controlled by the router or access point.
To make it easy to port sugar to such environments, the software is written in standard C, and relies on common Posix libraries. pthreads is used for tasking.
Copyright 2017 Michael Marking. All Rights Reserved.