no skonfigurowałem ale nie wiem czy dobrze teraz htb startuje ale po wydaniu polecenia /etc.rc.d/rchtb status dostaję to:
[root@router rc.d]# /etc/rc.d/rchtb status
Klasy na interfejsie imq1
================================
class htb 1:1 root rate 9500Kbit ceil 9500Kbit burst 13757b cburst 13757b
1 class htb 1:11 parent 1:2 leaf 801b: prio 3 rate 129Kbit ceil 129Kbit burst 1764b cburst 1764b
2 class htb 1:2 parent 1:1 rate 2007Kbit ceil 2007Kbit burst 4167b cburst 4167b
3 class htb 1:3 parent 1:1 leaf 8016: prio 5 rate 7493Kbit ceil 7493Kbit burst 11189b cburst 11189b
4 class htb 1:4 parent 1:2 leaf 8017: prio 1 rate 2007Kbit ceil 2007Kbit burst 4167b cburst 4167b
5 class htb 1:5 parent 1:2 leaf 801d: prio 4 rate 2007Kbit ceil 20Kbit burst 4167b cburst 1624b
Klasy na interfejsie imq0
===================================
class htb 2:1 root rate 250Kbit ceil 250Kbit burst 1919b cburst 1919b
1 class htb 2:11 parent 2:1 leaf 801c: prio 4 rate 110Kbit ceil 120Kbit burst 1739b cburst 1752b
2 class htb 2:2 parent 2:1 leaf 8018: prio 1 rate 100Kbit ceil 250Kbit burst 1727b cburst 1919b
3 class htb 2:3 parent 2:1 leaf 801a: prio 5 rate 15Kbit ceil 250Kbit burst 1618b cburst 1919b
4 class htb 2:4 parent 2:1 leaf 8019: prio 2 rate 25Kbit ceil 250Kbit burst 1631b cburst 1919b
5 class htb 2:5 parent 2:1 leaf 801e: prio 6 rate 110Kbit ceil 15Kbit burst 1739b cburst 1618b
co to jest to imq0 i imq1
wynik ifconfig:
[root@router rc.d]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:04:48:DC:0D
inet addr:192.168.100.1 Bcast:192.168.100.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4265756 errors:0 dropped:0 overruns:0 frame:0
TX packets:4403409 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1164267886 (1110.3 Mb) TX bytes:3175620591 (3028.5 Mb)
Interrupt:11 Base address:0xdc00
eth2 Link encap:Ethernet HWaddr 00:60:4C:48:D2:FF
UP BROADCAST RUNNING MULTICAST MTU:65535 Metric:1
RX packets:4849896 errors:0 dropped:0 overruns:0 frame:0
TX packets:4158916 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3197982108 (3049.8 Mb) TX bytes:1124541565 (1072.4 Mb)
imq0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:5558 errors:0 dropped:0 overruns:0 frame:0
TX packets:5558 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:30
RX bytes:3098053 (2.9 Mb) TX bytes:3098053 (2.9 Mb)
imq1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING NOARP MTU:1500 Metric:1
RX packets:4745 errors:0 dropped:0 overruns:0 frame:0
TX packets:4745 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:30
RX bytes:1732302 (1.6 Mb) TX bytes:1732302 (1.6 Mb)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:224 (224.0 b) TX bytes:224 (224.0 b)
ppp0 Link encap:Point-to-Point Protocol
inet addr:83.29.147.103 P-t-P:213.25.2.89 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:4763913 errors:0 dropped:0 overruns:0 frame:0
TX packets:4158608 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:3148015534 (3002.1 Mb) TX bytes:1041363288 (993.1 Mb)
htb.conf:
[root@router rc.d]# cat /etc/rchtb/htb.conf
# Konfiguracja
LANINTERFACE="eth0" # Wymien wszystkie interfejsy do lanu
WANINTERFACE=ppp0 # Interfejs do internetu
WANDOWN=2048 # Download w kbit/s
WANUP=256 # Upload w kbit/s
P2P_ON=0 # Wlaczenie klasy p2p - 1 !!Uwaga malo dopracowane!!
P2PDOWN=20 # max download p2p w kbit/s
P2PUP=15 # max upload p2p w kbit/s
LANSPD=10000 # LAN w [kbit/s]
ICMPSPD=25 # Predkosc dla klasy ICMP (rate)
SERVSPD=15 # Predkosc dla gosci (rate)
PRIOPORT=22 # Port priorytetowy
SQUID_PORT="" # Port squida jesli masz, jesli nie zostaw pusty
SFQ=ESFQ # Wybor SFQ/EFSQ
# Czas restartu/zmiany przeplywnosci
rano="0730"
wieczor="1530"
noc="2200"
# Nie zapomnij zmienić ich także w crontabie
# Koniec konfiguracji
# --------------------------------------------
# INFO
# --------------------------------------------
# Prorytert klas htb
# klasa LAN(download) WAN(upload)
# ACK 1
# ICMP 1 2
# Gry 2 3
# Userzy 3 4
# Goscie 5
# p2p 4 6
# ruch lokalny,SQUD 5
# --------------------------------------------
# Priorytety filtrow
# filtr LAN(download) WAN(upload)
# ruch lokalny 1
# ACK 1
# ICMP 2 2
# SUID 2
# Gry 3 3
# p2p 4 4
# Userzy 5 5
# Goscie 9
htb.hosts wpisałęm tylko 1 adres ip żeby sprawdzić czy działa.
[root@router rc.d]# cat /etc/rchtb/htb.hosts
#IP rano wieczor noc panic
# 07.00-16.59 17.00-22.59 23.00-06.59
# down upl down upl down upl down upl
#
# Przykładowa lista komputerów:
#
#192.168.0.2 128 120 128 120 180 160 64 16
#GRUP Grupa_1
# 192.168.0.3 180 180 180 180 180 180 64 16
# 192.168.0.4 180 180 180 180 180 180 64 16
#GRUP_END
#192.168.0.5 180 180 180 180 180 180 64 16
#
# Itd. dla wszystkich hostow, podajmy max download i upload w danej porze dnia
# mozna tworzyc grupy, grupa zaczyna sie wpisem GRUP konczy GRUP_END, grupa
# to kilka komputerow majacych wspolny transfer, liczy sie wpis transferu dla
# pierwszego kompa w grupie, tyle w sumie moga dostac komputery w grupie
192.168.100.3 128 120 129 120 180 160 64 16
P.S Sieć mam na eth0 a połączenie z internetem ppp0 neostrada 2mb