class
niceshaper class file generator
Because I found rather impossible to write almost 100 entries into my class.ns file (form niceshaper 0.6), I did really easy oneliner to to this :)… proof of concept, but you can easly use it.
for i in `seq 10 100`; do echo -e “class download eth1 computer$i \n match dstip 192.168.2.$i \n htb prio 2 \nclass upload eth0 computer$i \n match srcip 192.168.2.$i \n htb prio 2 \n”; done >> class.nc
and the output simple output looks like this (one entry)
class download eth1 computer11
match dstip 192.168.2.11
htb prio 2
class upload eth0 computer11
match srcip 192.168.2.11
htb prio 2
you need explanation? OK…
seq x y - make sequential output from x to y, so if your IP class is from 22 to 38 change it to seq 22 38
everything else is based at number generated from seq so the computerXX identifier is same as its end of IP address, which for me is not a big problem, but there is no problem to take an entries form cat users.txt