Kto nibudj delal shaping s fwmark'om? Skript nizhe ne rabotaet. Zato rabotajet esli raskommentaritj dve poslednie strochki i zakomentaritj dve predpolsednie. V chem mozhet bytj problema?
[ ] [ ] == eth0 - Shaper - eth1 ======== - 192.168.0.10 ] [ ] [ ] #!/bin/bash iptables -t mangle -A PREROUTING -s 192.168.0.10 -j MARK --set-mark 1 iptables -t mangle -A PREROUTING -d 192.168.0.10 -j MARK --set-mark 1
# eth0 tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000 cell 8 tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit weight 1Mbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 tc class add dev eth0 parent 1:1 classid 1:28 cbq bandwidth 10Mbit rate 128Kbit weight 2Kbit prio 5 allot 1514 cell 8 maxburs t 20 avpkt 1000 bounded
# eth1 tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 10Mbit avpkt 1000 cell 8 tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 10Mbit rate 10Mbit weight 1Mbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000 tc class add dev eth1 parent 1:1 classid 1:128 cbq bandwidth 10Mbit rate 28Kbit weight 2Kbit prio 5 allot 1514 cell 8 maxburs t 20 avpkt 1000 bounded
tc filter add dev eth1 protocol ip parent 1:0 prio 100 handle 0x1 fw classid 1:128 tc filter add dev eth0 protocol ip parent 1:0 prio 100 handle 0x1 fw classid 1:28 #tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.0.10 flowid 1:128 #tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.0.10 flowid 1:28
-------------------------- Q: Want to find more? A: Try http://ftpsearch.lv