Portál AbcLinuxu, 9. června 2025 06:55
tc qdisc del dev eth0 root tc qdisc del dev eth1 root iptables -F iptables -F -t nat iptables -F -t mangle tc qdisc add dev eth1 root handle 1: htb default 254 tc qdisc add dev eth0 root handle 1: htb default 254 tc class add dev eth1 parent 1: classid 1:1 htb rate 384kbit ceil 384kbit tc class add dev eth0 parent 1: classid 1:1 htb rate 384kbit ceil 384kbit iptables -P FORWARD DROP tc class add dev eth1 parent 1:1 classid 1:3 htb rate 64kbit ceil 384kbit tc class add dev eth0 parent 1:1 classid 1:3 htb rate 64kbit ceil 384kbit iptables -t mangle -A PREROUTING -s 192.168.100.100 -j MARK --set-mark 3 tc filter add dev eth1 protocol ip parent 1:0 prio 1 handle 3 fw flowid 1:3 tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.100.100/32 flowid 1:3 iptables -A FORWARD -s 192.168.100.100 -i eth0 -j ACCEPT iptables -A FORWARD -d 192.168.100.100 -i eth1 -j ACCEPTTC s nejvetsi pravdepodobnosti selze na tomto: tc filter add dev eth1 protocol ip parent 1:0 prio 1 handle 3 fw flowid 1:3 s odpovedi: "RTNETLINK answers: Invalid argument We have an error talking to the kernel" Jeste jsem zkousel stahnout jinou verzi tc jestli nemam nejakou nespolupracujici, ale nepomohlo. Jinak ten system bezi na Slackware tusim verze 10.2, jadro rucne kompilovana vanilka 2.4.31. Jeste pridavam vypis lsmod:
Module Size Used by Not tainted cls_fw 2072 0 (unused) ipt_MARK 760 11 (autoclean) iptable_mangle 2168 1 (autoclean) cls_u32 4604 2 (autoclean) ipt_REDIRECT 760 1 (autoclean) sch_htb 20960 2 (autoclean) iptable_nat 17902 1 (autoclean) [ipt_REDIRECT] iptable_filter 1740 1 (autoclean) ip_tables 12224 7 [ipt_MARK iptable_mangle ipt_REDIRECT iptable_nat iptable_filter] tulip 42304 1 8139too 14536 1Nevim si s tim rady, takze kazda rada dobra. Potrebuji to pomerne nutne, protoze ted dochazi k situacim kdy dva lide kteri naplno pusti bittorrent nebo DC totalne zablokuji celou sit - i kdyz maji omezeny download, tak ucpou upload takovym zpusobem ze ostatni si poradne neskrtnou. Diky za kazdou radu
Myslim, ze to na tom prikazu pada, protoze tam nema byt prio 1
Johny
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.