| 
 | 
 
 楼主 |
发表于 2004-1-11 13:52:00
|
显示全部楼层
 
 
 
Coyote Linux Packages & Tools 
Coyote Traffic Control - RRDTool - Other Packages - Links 
 
Coyote Traffic Control 
10.1.2004 
- Coyote linux 2.05 QOS-enabled disk creator added 
 
13.10.2003 
- Another small update in qos init scripts 
 
12.10.2003 
- Added QOS wizard update build from original coyote linux kernel config with qos enabled (all modules included), contains updated qos init scripts. 
- Updated qos.tgz, there was bug in QOS classes priorities assignments.  
 
I have been using coyote linux with traffic control (QOS) support for some time now without any major problems. For traffic control support in coyote you will need new kernel with qos enabled, tc program from iproute2 package and probably some init scripts. You can download here qos enabled kernel, modules, tc and some init scripts that i'm using on my coyote box.  
 
1. QOS-Enabled coyote 2.05 disk creator 
Contains updated QOS init scripts for coyote linux 2.05. Disk creator supports two coyote version standard+qos and standard+qos+ide. This is updated official linux coyote disk creator and installation is the same as official one (you will need functional linux system to run this package, here are some information how to make floppy using Knoppix distribution). 
 
coyote-2.05-qos-ide.tgz 
 
You have to setup upstream/downstream limits and QOS classes hierarchy first. QOS configuration is stored in two files 
 
/etc/qos.classes - upstream/downstream limits, qos class hierarchy 
/etc/qos.filters - QOS clasification filters 
 
QOS class chain is build by /etc/rc.d/rc.traffic script, which is started automaticaly after bootup at the end of rc.inet. 
 
2. QOS integration with windows coyote wizard 2.2.3 (coyote 2.02) 
Download coyote disk creator wizard (version 2.2.3 ) and unpack it somewhere  
Download QOS-wizard update and unpack to the same directory (some files will be overwritten)  
Build coyote boot disk as usual and boot up. You should have full HTB, SFQ and CBQ qdisc support with u32 and fw filter classifiers.  
Edit /etc/qos.classes and /etc/qos.filters to suit your needs  
Run /etc/rc.d/rc.traffic to initialize your QOS setup (rc.traffic is NOT started automatically after system boot)  
QOS wizard updates: 
 
qos-wizard-2.2.3-allmods.zip  kernel-config  Wizard update with QOS support (HTB, CBQ, SFQ, cls_fw, cls_u32), includes all modules.   
qos-ide-wizard-2.2.3-allmods.zip  kernel-config  Wizard update with QOS support (HTB, CBQ, SFQ, cls_fw, cls_u32) and IDE hard drive support, includes all modules.   
 
3. Manual Setup (coyote 2.02)  
Download kernel image  
   qos-kernel.zip 
 - Simple QOS enabled kernel  
  
  qos-ide-kernel.zip 
 - QOS enabled kernel with IDE hard drive support  
  
 
Download kernel modules  
Download compiled tc binary from iproute2  
 
Build new modules.tgz using downloaded modules (do not forget to add qos modules ... sch_htb.o, sch_sfq.o, sch_cbq.o, cls_u32.o, cls_fw.o) and edit /etc/modules  
Copy tc binary to /usr/sbin/tc in root.tgz  
Replace your current kernel with downloaded one (linux file in root directory of boot device)  
Reboot ... qos should be working now.  
QOS setup and init scripts 
Here are my qos init scripts . There are three files ( /etc/qos.classes , /etc/qos.filters , /etc/rc.d/rc.traffic )  
 
qos.classes - is used to define upstream/downstream values, guaranteed bandwidth for different qos classes and actual qos class tree (it is explained there with some samples)  
qos.filters - categorization rules for qos classes (read comments in qos.classes you should know what they are then).  
rc.traffic - traffic control init script, uses qos.classes and qos.filters for configuration. If you want to run it automatically, end of rc.firewall file is good place for this.  
 
Idea behind this init script is quite simple, it uses HTB as primary queuing discipline with some SFQ classes on it's leaves. Root classes with maximum bandwidth specified as downstream/upstream are created automatically with id 1:1. You can then define class hierarchy with three types of subclasses. Each class has it's own classid /1:10-1:80/ and when you create it, you specify id of it's parent class. 
 
define_class - Simple container class which is used only as container for other classes. In is specified with guaranteed and maximum bandwidth and ip specification filter. 
define_class_sfq - Simple leaf is created with specified guaranteed and maximum allowed bandwidth and ip specification filter 
define_class_qos - Full QOS leaf with 3 priority subclasses is created.  
RRDTool 
I have created small RRD frontend for monitoring my coyote box. It uses some shell scripts to gather data for RRD databases and slightly modified RRDcgi program to visualize data in browser. RRDtool is quite big, i don't know if it fits on the floppy because i'm using old hard drive to boot coyote.  
 
This package is quite difficult  to install and needs a lot of manual setup and some basic HTML knowledge. Here are only some basic steps how does it work and what files need to be changed. 
 
    Here you can see static html snapshots taken from this monitoring front end 
If you want to give it a try, download following two coyote packages (see install notes bellow)  
 
RRDtool package (190kB)  
RRDstats package (7kB)  
   
 
Remember this is a test version, so configuration is sometimes not simple and maybe even not logical   
 
RRDtool package 
 
Contains only rrdtool and rrdcgi programs (together with needed libraries) no configuration is needed.  
 
RRDstats package 
 
Contains all shell script for reading data from ethernet adapters, QOS classes and querying link quality. QOS support is disabled by default.  
 
/etc/rrd.config  one and only configuration file. You can define database names, querying intervals, bandwidth limits,... here   
/var/rrd/script/rrd.create  script file that creates empty RRD databases, run this script after you setup rrd.config. Databases are saved with package if you save coyote linux configuration. default database directory is /var/rrd/data/   
 
at this time it's not possible to setup everything in config file. Some things must be changed by hand.  
 
line capacity  Configuration located in graph template files  
/var/rrd/www/templates/*.tpl  
 
IN/OUT and QOS graphs have predefined upper and lower limits, there limits should be set somewhat more than your actual line capacity. That values are controlled in the templates with statements 
 
   --upper-limit 300  
   --lower-limit 0  
 
There are horizontal lines at link capacity boundaries in IN/OUT and QOS graphs. In IN/OUT graph there is also link capacity displayed at the bottom of the graph. This is defined at the bottom of template files .. lines you are looking for look like this  
 
   HRULE:256#009000:""  
   HRULE:96#000090:""  
  
 
Enabling QOS support  
 
QOS graphing support is disabled by default because it requires my qos init scripts. If you installed that scripts you can try to enable qos support. At first setup QOS in rrd.config (i hope there are some samples how to set databases and data gathering)  
 
/etc/rc.d/pkgs/rc.rrdstats - at the of this file uncomment lines that run qos data gathering daemon ( /var/rrd/script/rrd.run.qos )  
/var/rrd/www/include/menu.inc - under Link quality menu there is QOS menu commented out (with examples)  
/var/rrd/www/index.cgi - if you want to have some QOS displayed in overview define it here (example is included there)  
 
Other Small Packages  
Here are some packages that i build myself, and which i am using on my coyote box. They work pretty good for me, but they have not been tested on other system setups (all compiled against uClibc 0.9.16 /eg. coyote linux 2.0/).  
 
hdparm.tgz (12kB) 
 
If you are booting coyote linux using IDE hard drive you could find this package quite useful. It sets IDE disk sleep timeout time (default is 1 minute on /dev/hda1 ) id you want to set other device or timeout edit /etc/rc.d/pkgs/rc.hdparm.  
 
ntpcli.tgz (7kB) 
 
Contains ntp client, which allows you to synchronize computer time using ntp servers. You will have to set correct time zone in /etc/TZ or TZ variable (format is described here ) otherwise it will not work properly. Time is set every 10minutes by default, you can change this behavior and also ntp server address in /etc/rc.d/pkgs/rc.ntpcli 
 
noip.tgz (14kB)  
 
No-ip.com dns updater. Updates dynamic ip address on your no-ip.com account. You have to configure updater after first boot with this package with /bin/noip2 -C  
 
iptraf.tgz (132kB)  
 
IPtraf 2.7.0 traffic analyzer. If you are connecting to coyote linux over ssh using putty and want to see iptraf console in colors, set putty's terminal type string to xterm-color.  
 
Interesting links  
 
Coyote Linux Homepage 
Claudio's coyote pages and add-ons  
 
HTB homepage |   
 
 
 
 |