Witam. Mam skrypt który dzieli łącze po adresach MAC. I tu jest wszystko dobrze - dzieli jak powinno. Ale jak dopisałem do skryptu żeby dzielił też po IP jest problem. Po IP dzieli dobrze ale po MAC dobrze jest tylko upload. Dowload idzie max łącza. W czym jest problem?
Oto skrypt:
TCA="tc class add dev br0"
TFA="tc filter add dev br0"
TQA="tc qdisc add dev br0"
SFQ="sfq perturb 10"
tc qdisc del dev br0 root
tc qdisc add dev br0 root handle 1: htb
tc class add dev br0 parent 1: classid 1:1 htb rate 5800kbit
$TCA parent 1:1 classid 1:10 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:11 htb rate 512kbit ceil 1050kbit prio 2
$TCA parent 1:1 classid 1:12 htb rate 512kbit ceil 1050kbit prio 2
$TCA parent 1:1 classid 1:13 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:14 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:15 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:16 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:17 htb rate 512kbit ceil 1050kbit prio 2
$TCA parent 1:1 classid 1:18 htb rate 256kbit ceil 700kbit prio 2
$TCA parent 1:1 classid 1:19 htb rate 256kbit ceil 1050kbit prio 2
$TCA parent 1:1 classid 1:20 htb rate 512kbit ceil 2200kbit prio 2
$TCA parent 1:1 classid 1:21 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:22 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:23 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:24 htb rate 256kbit ceil 5800kbit prio 2
$TCA parent 1:1 classid 1:25 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:26 htb rate 128kbit ceil 2200kbit prio 2
$TCA parent 1:1 classid 1:27 htb rate 256kbit ceil 530kbit prio 2
$TCA parent 1:1 classid 1:28 htb rate 256kbit ceil 777kbit prio 2
$TQA parent 1:10 handle 10: $SFQ
$TQA parent 1:11 handle 11: $SFQ
$TQA parent 1:12 handle 12: $SFQ
$TQA parent 1:13 handle 13: $SFQ
$TQA parent 1:14 handle 14: $SFQ
$TQA parent 1:15 handle 15: $SFQ
$TQA parent 1:16 handle 16: $SFQ
$TQA parent 1:17 handle 17: $SFQ
$TQA parent 1:18 handle 18: $SFQ
$TQA parent 1:19 handle 19: $SFQ
$TQA parent 1:20 handle 20: $SFQ
$TQA parent 1:21 handle 21: $SFQ
$TQA parent 1:22 handle 22: $SFQ
$TQA parent 1:23 handle 23: $SFQ
$TQA parent 1:24 handle 24: $SFQ
$TQA parent 1:25 handle 25: $SFQ
$TQA parent 1:26 handle 26: $SFQ
$TQA parent 1:27 handle 27: $SFQ
$TQA parent 1:28 handle 28: $SFQ
$TFA parent 1:0 prio 2 protocol ip handle 28 fw flowid 1:28
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x621DAD25 0xFFFFFFFF at -12 match u16 0x004F 0xFFFF at -14 flowid 1:10
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x62106515 0xFFFFFFFF at -12 match u16 0x004F 0xFFFF at -14 flowid 1:11
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x46C41FE9 0xFFFFFFFF at -12 match u16 0x0013 0xFFFF at -14 flowid 1:12
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x0FB3C0E3 0xFFFFFFFF at -12 match u16 0x001D 0xFFFF at -14 flowid 1:13
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x0FB3C0AE 0xFFFFFFFF at -12 match u16 0x001D 0xFFFF at -14 flowid 1:14
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x0FB3C0AD 0xFFFFFFFF at -12 match u16 0x001D 0xFFFF at -14 flowid 1:15
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x0FB3B3E1 0xFFFFFFFF at -12 match u16 0x001D 0xFFFF at -14 flowid 1:16
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x62227146 0xFFFFFFFF at -12 match u16 0x004F 0xFFFF at -14 flowid 1:17
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x62229856 0xFFFFFFFF at -12 match u16 0x004F 0xFFFF at -14 flowid 1:18
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x0FE4AEB4 0xFFFFFFFF at -12 match u16 0x001D 0xFFFF at -14 flowid 1:19
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x621C1197 0xFFFFFFFF at -12 match u16 0x004F 0xFFFF at -14 flowid 1:20
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x0FEF15D9 0xFFFFFFFF at -12 match u16 0x001D 0xFFFF at -14 flowid 1:21
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x78EE86C2 0xFFFFFFFF at -12 match u16 0x0014 0xFFFF at -14 flowid 1:22
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x0FB8842E 0xFFFFFFFF at -12 match u16 0x001D 0xFFFF at -14 flowid 1:23
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x4D56A046 0xFFFFFFFF at -12 match u16 0x001A 0xFFFF at -14 flowid 1:24
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0xA4858CF5 0xFFFFFFFF at -12 match u16 0x0014 0xFFFF at -14 flowid 1:25
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x2ECB79C5 0xFFFFFFFF at -12 match u16 0x000E 0xFFFF at -14 flowid 1:26
$TFA parent 1:0 protocol ip prio 2 u32 match u16 0x0800 0xFFFF at -2 match u32 0x6213906F 0xFFFFFFFF at -12 match u16 0x004F 0xFFFF at -14 flowid 1:27
iptables -t mangle -A POSTROUTING -d 192.168.10.221 -j MARK --set-mark 28
TCAU="tc class add dev imq0"
TFAU="tc filter add dev imq0"
TQAU="tc qdisc add dev imq0"
modprobe imq
modprobe ipt_IMQ
ip link set imq0 up
tc qdisc del dev imq0 root
tc qdisc add dev imq0 root handle 1: htb r2q 1
tc class add dev imq0 parent 1: classid 1:1 htb rate 490kbit
$TCAU parent 1:1 classid 1:10 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:11 htb rate 25kbit ceil 130kbit prio 2
$TCAU parent 1:1 classid 1:12 htb rate 25kbit ceil 130kbit prio 2
$TCAU parent 1:1 classid 1:13 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:14 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:15 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:16 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:17 htb rate 25kbit ceil 130kbit prio 2
$TCAU parent 1:1 classid 1:18 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:19 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:20 htb rate 50kbit ceil 260kbit prio 2
$TCAU parent 1:1 classid 1:21 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:22 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:23 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:24 htb rate 20kbit ceil 490kbit prio 2
$TCAU parent 1:1 classid 1:25 htb rate 20kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:26 htb rate 20kbit ceil 130kbit prio 2
$TCAU parent 1:1 classid 1:27 htb rate 25kbit ceil 80kbit prio 2
$TCAU parent 1:1 classid 1:28 htb rate 25kbit ceil 100kbit prio 2
$TQAU parent 1:10 handle 10: $SFQ
$TQAU parent 1:11 handle 11: $SFQ
$TQAU parent 1:12 handle 12: $SFQ
$TQAU parent 1:13 handle 13: $SFQ
$TQAU parent 1:14 handle 14: $SFQ
$TQAU parent 1:15 handle 15: $SFQ
$TQAU parent 1:16 handle 16: $SFQ
$TQAU parent 1:17 handle 17: $SFQ
$TQAU parent 1:18 handle 18: $SFQ
$TQAU parent 1:19 handle 19: $SFQ
$TQAU parent 1:20 handle 20: $SFQ
$TQAU parent 1:21 handle 21: $SFQ
$TQAU parent 1:22 handle 22: $SFQ
$TQAU parent 1:23 handle 23: $SFQ
$TQAU parent 1:24 handle 24: $SFQ
$TQAU parent 1:25 handle 25: $SFQ
$TQAU parent 1:26 handle 26: $SFQ
$TQAU parent 1:27 handle 27: $SFQ
$TQAU parent 1:28 handle 28: $SFQ
$TFAU parent 1:0 prio 2 protocol ip handle 10 fw flowid 1:10
$TFAU parent 1:0 prio 2 protocol ip handle 11 fw flowid 1:11
$TFAU parent 1:0 prio 2 protocol ip handle 12 fw flowid 1:12
$TFAU parent 1:0 prio 2 protocol ip handle 13 fw flowid 1:13
$TFAU parent 1:0 prio 2 protocol ip handle 14 fw flowid 1:14
$TFAU parent 1:0 prio 2 protocol ip handle 15 fw flowid 1:15
$TFAU parent 1:0 prio 2 protocol ip handle 16 fw flowid 1:16
$TFAU parent 1:0 prio 2 protocol ip handle 17 fw flowid 1:17
$TFAU parent 1:0 prio 2 protocol ip handle 18 fw flowid 1:18
$TFAU parent 1:0 prio 2 protocol ip handle 19 fw flowid 1:19
$TFAU parent 1:0 prio 2 protocol ip handle 20 fw flowid 1:20
$TFAU parent 1:0 prio 2 protocol ip handle 21 fw flowid 1:21
$TFAU parent 1:0 prio 2 protocol ip handle 22 fw flowid 1:22
$TFAU parent 1:0 prio 2 protocol ip handle 23 fw flowid 1:23
$TFAU parent 1:0 prio 2 protocol ip handle 24 fw flowid 1:24
$TFAU parent 1:0 prio 2 protocol ip handle 25 fw flowid 1:25
$TFAU parent 1:0 prio 2 protocol ip handle 26 fw flowid 1:26
$TFAU parent 1:0 prio 2 protocol ip handle 27 fw flowid 1:27
$TFAU parent 1:0 prio 2 protocol ip handle 28 fw flowid 1:28
iptables -t mangle -A PREROUTING -m mac --mac-source 00:4F:62:1D:AD:25 -j MARK --set-mark 10
iptables -t mangle -A PREROUTING -m mac --mac-source 00:4F:62:10:65:15 -j MARK --set-mark 11
iptables -t mangle -A PREROUTING -m mac --mac-source 00:13:46:C4:1F:E9 -j MARK --set-mark 12
iptables -t mangle -A PREROUTING -m mac --mac-source 00:1D:0F:B3:C0:E3 -j MARK --set-mark 13
iptables -t mangle -A PREROUTING -m mac --mac-source 00:1D:0F:B3:C0:AE -j MARK --set-mark 14
iptables -t mangle -A PREROUTING -m mac --mac-source 00:1D:0F:B3:C0:AD -j MARK --set-mark 15
iptables -t mangle -A PREROUTING -m mac --mac-source 00:1D:0F:B3:B3:E1 -j MARK --set-mark 16
iptables -t mangle -A PREROUTING -m mac --mac-source 00:4F:62:22:71:46 -j MARK --set-mark 17
iptables -t mangle -A PREROUTING -m mac --mac-source 00:4F:62:22:98:56 -j MARK --set-mark 18
iptables -t mangle -A PREROUTING -m mac --mac-source 00:1D:0F:E4:AE:B4 -j MARK --set-mark 19
iptables -t mangle -A PREROUTING -m mac --mac-source 00:4F:62:1C:11:97 -j MARK --set-mark 20
iptables -t mangle -A PREROUTING -m mac --mac-source 00:1D:0F:EF:159 -j MARK --set-mark 21
iptables -t mangle -A PREROUTING -m mac --mac-source 00:14:78:EE:86:C2 -j MARK --set-mark 22
iptables -t mangle -A PREROUTING -m mac --mac-source 00:1D:0F:B8:84:2E -j MARK --set-mark 23
iptables -t mangle -A PREROUTING -m mac --mac-source 00:1A:4D:56:A0:46 -j MARK --set-mark 24
iptables -t mangle -A PREROUTING -m mac --mac-source 00:14:A4:85:8C:F5 -j MARK --set-mark 25
iptables -t mangle -A PREROUTING -m mac --mac-source 00:0E:2E:CB:79:C5 -j MARK --set-mark 26
iptables -t mangle -A PREROUTING -m mac --mac-source 00:4F:62:13:90:6F -j MARK --set-mark 27
iptables -t mangle -A PREROUTING -s 192.168.10.221 -j MARK --set-mark 28
· Łącznie użytkowników: 24,115 · Najnowszy użytkownik: Ja
Czat
Musisz się zalogować, aby opublikować wiadomość.
Maniek91PL
06-11-2024 22:37
dzięki !
maxikaaz
29-10-2024 14:27
@Maniek91PL - Administration=> Admin Access, i tam masz "Allow Wireless Access" do zaznaczenia
Maniek91PL
26-10-2024 22:07
siemka! ktoś przypomni co się ustawiało jeśli nie mogę wejść od strony wifi do tomato? od lan działa
overflow2
04-10-2024 17:34
Kupowałem Asusy n10u albo n12d1 ale nie widzę ich, chyba już nie produkują, Chodzi o coś nowego i taniego. Transfery niewielkie.
maxikaaz
04-10-2024 09:38
@overflow2 patrząc po dostępności funkcji w nowych kompilacjach, to chyba nawet WRT54G/GL jeszcze ma OpenVPN, albo jakiś odpowiednik... zależy, na jakie transfery liczysz.
overflow2
30-09-2024 20:53
Jaki aktualnie najtańszy router do tomato do openvpn?
maxikaaz
27-07-2024 15:07
@servee - na początek router do rozebrania i obejrzenia, ciężko wróżyć tak tylko po objawach
maxikaaz
27-07-2024 14:55
@servee - cały kontroler nie pada tak sobie z powodu "zbiegu okoliczności", więc prawdopodobnie gdzieś przepięcie.
servee
25-07-2024 13:33
@maxikaaz: działało, aż pewnego pięknego dnia przestało działać. W tym dniu była też burza, ale to raczej zbieg okoliczności.
maxikaaz
25-07-2024 11:38
@servee - o ile problem jest w obrębie samych wyjść (dławiki, warystory), to naprawialne, ale jeśli w samym SoC - to nienaprawialne ze względu na koszta. A co było przyczyną?